-
Notifications
You must be signed in to change notification settings - Fork 33
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
Why do we need to compile with openmp flag? #758
Comments
…f OMPFLAGS is set externally to an empty string (madgraph5#758)
…setting OMPFLAGS= as implemented in madgraph5#758)
Hi @oliviermattelaer good point. I have implemented a simple mechanism whereby you can disable OpenMP if you externally set OMPFLAGS= as an empoty string See cb67911 Conversely, if OMPFLAGS is set externally to something else, for the moment I prefer to ignore this and keep control. |
…externally to an empty string (madgraph5#758)
Perfect thanks, I think that we should have an agreement on how we handle OpenMP by default from the madgraph5 interface. Cheers, Olivier |
Thanks a lot Olivier! As discussed in #874 (that I just merged), I reopen this so that we can discuss waht to do... assign it also to you so you remember to provide more suggestions |
I wanted to know yours and @roiser opinion On my side, I would naively move for OMP OFF by default. |
Yes, having multiple processes hammering the GPU is better, but I'm not sure its really needed for the real world use case where we can control how many processes we want to run via the mg5_configuration.txt with nb_core. This is also what I partly (re)exercised when doing the A100/H100 comparison (slides on the indico of the last MG5 dev meeting). |
I think that this is a complex issue that requires tests and optimizations. And the experiments are doing a lot of this on their own (and we may help them). We had introduced OMP because it is a one-liner way to use many threads, then people used it claiming it was our best thing, while it was a 5-minute game. I would disable OMP by default, mainly because it makes debugging easier. Then I would not remove the OMP code, which sometimes may be useful. So yes I vote to disable OMP by default. Let me know, I can implement that. |
… enable OpenMP only if USEOPENMP=1 (madgraph5#758)
… OpenMP only if USEOPENMP=1 (madgraph5#758)
Following yesterday's discussion I changed this: OpenMP is disabled by default now in PR #900 (pening Olivier's review). It is enabled only if USEOPENMP=1. (This internally checks also if the O/S compiler etc allow this, therefore OMPFLAGS is not set externally but internally depending on USEOPENMP) |
…ault madgraph5#758) into gtest
…f OMPFLAGS is set externally to an empty string (madgraph5#758)
… enable OpenMP only if USEOPENMP=1 (madgraph5#758)
…from fpe PR madgraph5#874 and omp PR madgraph5#900 for OpenMP issue madgraph5#758 - bldall and runTest succeds
…, disable OpenMP by default unless USEOPENMP=1
…ph5#758 (keep OMP disabled but add the option to enable it)
…annelid in MatrixElementKernelBase, and replace OMPFLAGS by USEOPENMP madgraph5#758
Should we remove the openmp flag completely?
or have a way to compile with it on request?
I had to change a makefile to compile on my mac (but will likely create issue with the CI)
The text was updated successfully, but these errors were encountered: