-
Notifications
You must be signed in to change notification settings - Fork 23
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
Code runs slower when openmp is used #28
Comments
There is probably too little work to hide openmp overhead. The only place in the library OMP is used is this: Line 366 in 9091b67
|
Is there need for commenting since I think that compilers are suppose to ignore pragmas they do not understand? |
I thought you want to keep using openmp in your outside project, but remove it from the mba code |
I also noticed that the MBA does not give always same result if OpenMP is used in compilation. How that can be possible? If I do not use openMP or If I use older commits where openMP is not utilized this does not happen. |
The only reason I can think of is that when using openmp the order of summation is unpredictable here: Lines 414 to 419 in 3b296b2
This could produce slightly different results with floating point arithmetic. |
For some reason, the code gets slower when OpenMP is used together with the release build compared to case when I just comment target_link_libraries(example PUBLIC OpenMP::OpenMP_CXX) in my cmakelist. Is there some reason for this?
The text was updated successfully, but these errors were encountered: