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 annotating on function out of several #13

Open
mastino opened this issue May 19, 2017 · 3 comments
Open

Error when annotating on function out of several #13

mastino opened this issue May 19, 2017 · 3 comments

Comments

@mastino
Copy link

mastino commented May 19, 2017

I have a simple set of linear algebra functions written in C. I added tuning annotations to the add_matrix (~line# 180) function, leaving the others in the file. When I used orcc it errored out with python looking messages; however, when I moved the function and annotations to a unique file it worked fine.
orio_issue.zip

@mahdifani14
Copy link

mahdifani14 commented May 21, 2017

I think your issue is similar to mine, have a look on #12 .
It's a long time that I'm struggling with Orio and could figure out several constraints of the tool. Actually, as you stated, when you have the annotated portion of the code in another file instead of the main file, Orio cannot do the optimization procedure regards to several options and flags because Orio executes the code with GCC compiler each time during its testing procedure while checking the options and profiles the results. At the end, it chooses the options with the least execution time as the best options.
When you annotate the code outside of the main file, it cannot compile the code with GCC to compute the execution time and profile its result because it's not a complete code and does not have the main function to be executable. Thereby, you must move your function inside the main file and then separate your optimized function code outside of the main file, I know it's not a clean way but the only solution that I could find.
I would be appreciated if you have any opinion or other solution to share, good luck.

@mastino
Copy link
Author

mastino commented May 22, 2017

@mahdifani14
Thanks for the feedback! From my highly limited experience it seems that it is not necessary to have a main function to do the tuning, but it can be useful to initialize data. There are a bunch of good examples in the testsuite/SPAPT directory of the repo as well.

@mahdifani14
Copy link

mahdifani14 commented May 27, 2017

@mastino
Thanks for your info,
I would be appreciated to let me know if you could find any solution and I will do too.

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

No branches or pull requests

2 participants