Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running autoperf with examples #29

Open
evaxeon opened this issue Feb 27, 2021 · 2 comments
Open

Error when running autoperf with examples #29

evaxeon opened this issue Feb 27, 2021 · 2 comments
Assignees

Comments

@evaxeon
Copy link

evaxeon commented Feb 27, 2021

Hi! I get the following error while running autoperf with any of the examples from autoperf/examples directory:
Traceback (most recent call last): File "/usr/local/bin/autoperf", line 299, in <module> main() File "/usr/local/bin/autoperf", line 294, in main autoperf = Autoperf() File "/usr/local/bin/autoperf", line 38, in __init__ if uname['system'] == 'Darwin': subdir = 'apple' TypeError: tuple indices must be integers or slices, not str

I use Python 3.5.2, Ubuntu 16.04, CMake 3.15.2.

@evaxeon evaxeon changed the title Error when running autoperf on examples Error when running autoperf with examples Feb 27, 2021
@brnorris03
Copy link
Contributor

Hi there! Unfortunately, we haven't had a chance to convert autoperf to python3, so it still requires python 2.7. If you have that, you can give it a try. I will try to find time to get it converted in the next month or so.

@brnorris03 brnorris03 self-assigned this Feb 27, 2021
@evaxeon
Copy link
Author

evaxeon commented Mar 30, 2021

Hi again! I've tried launching autoperf with python2.7, but the following syntax error shows up:
File "/usr/local/bin/autoperf", line 125 def get_experiment_list(self, allow_duplicates: bool = True) -> list: ^ SyntaxError: invalid syntax

This is python3 syntax, therefore this led me back to using python3. I've fixed the os.uname() function calls (which returns a tuple):
uname = os.uname()
if uname.sysname == 'Darwin': subdir = 'apple'
else: subdir = uname.machine

Still, a new error shows up:

Traceback (most recent call last): 
File "/usr/local/bin/autoperf", line 299, in <module>                                                                    
    main()                                                                                                               
File "/usr/local/bin/autoperf", line 295, in main                                                                         
    autoperf.run()                                                                                                        
File "/usr/local/bin/autoperf", line 284, in run                                                                          
    self.run_experiments()                                                                                                
File "/usr/local/bin/autoperf", line 150, in run_experiments                                                             
    experiment = Experiment(self.config, exp)                                                                             
File "/usr/local/lib/python3.5/dist-packages/autoperf/experiment.py", line 74, in __init__                                
    self.is_mpi = self.config.getboolean("%s.mpi" % self.longname, False)                                                 
File "/usr/local/lib/python3.5/dist-packages/autoperf/utils/config.py", line 178, in getboolean                           
    return self.get(spec, default, "boolean")                                                                             
File "/usr/local/lib/python3.5/dist-packages/autoperf/utils/config.py", line 153, in get                                  
    return self._strip_comments(self.cfg_parser.getboolean(section, option))                                              
File "/usr/local/lib/python3.5/dist-packages/autoperf/utils/config.py", line 65, in _strip_comments                       
    if line.find(c) > 0:                                                                                                
AttributeError: 'bool' object has no attribute 'find'  

Not sure if the actual reason for this is not fully completed python3 conversion, but thought this might be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants