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

run-suite:Option to specify install director and by defualt use cwd #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sohansharma
Copy link
Collaborator

Hi Askel, I added an option to specify the install directory and by default it uses cwd. It will solve the problem where run-suite is running itself as a benchmark and gives the option to specify any install directory. I will remove print statements if you think this change is fine.

@@ -147,6 +153,7 @@ if __name__ == '__main__':
for filename in files:
benchmark_name = filename
benchmark_executable = os.path.realpath(filename)
print install_dir, benchmark_name, benchmark_executable, filename
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use python3 syntax ;) print(...).
If you execute the script with python 2, this might be an explanation why some things such as the detection whether the script executes itself don't work correctly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it was a python version problem. The script tries to run itself if you use a different directory than sycl-bench/bin to install benchmark binaries. Try it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just made a run with python2 and it worked - so that's not the culprit. Not sure what you mean - I have my installed script and benchmark in $ROOT/cmake-build/install/bin and it works fine. Can you please describe how your setup looks like? Where do you install to?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try by specifying -DCMAKE_INSTALL_PREFIX=build-dir during cmake.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried this, still working ;) Maybe there is a symlink or something like that in your path? Anyway, having thought about it I now believe just moving the benchmarks to a subdirectory is the most elegant solution.

@illuhad
Copy link
Collaborator

illuhad commented Feb 3, 2020

We could also rename the script from run-suite to run-suite.py - this will also prevent the issue with it calling itself (which I still could not reproduce)

@illuhad
Copy link
Collaborator

illuhad commented Feb 3, 2020

Doesn't this only fix the issue if you don't execute the script from the install directory (that's where cmake installs it), but use another copy, e.g. from the build directory? I think this would be a rather confusing solution.
Maybe we should just install all the benchmarks to bin/benchmarks, then the script would also be happy.

@sohansharma
Copy link
Collaborator Author

We could also rename the script from run-suite to run-suite.py - this will also prevent the issue with it calling itself (which I still could not reproduce)

I think this will also solve the problem.

@illuhad
Copy link
Collaborator

illuhad commented Feb 3, 2020

I would like to propose pr #24 as a solution.

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

Successfully merging this pull request may close these issues.

2 participants