OMP_NUM_THREADS environment variable. (OpenMP is implemented via cython without any special considerations http://docs.cython.org/en/latest/src/userguide/parallelism.html.)On Oct 21, 2019, at 3:01 PM, Charly Empereur-mot <charly....@gmail.com> wrote:Unfortunately this does not work when I use functions from another python module.I tried using decorators to set the environment variable each time I call the functions that use OpenMP backend, but that does not help.
If you have other suggestions, I would very much like to ear them !Otherwise, I imagine these cython calls would just need to receive argument num_threads.I guess if I Ctrl+F "cython.parallel.prange" in the MDA code, I will have some place to start doing this, right ?
On Monday, October 21, 2019 at 10:23:33 PM UTC+2, Charly Empereur-mot wrote:Thank you, this works.I used:import osos.environ['OMP_NUM_THREADS'] = str(nb_threads)
before MDA usage.
On Monday, October 21, 2019 at 9:51:46 PM UTC+2, Oliver Beckstein wrote:Hi,Try setting theOMP_NUM_THREADSenvironment variable. (OpenMP is implemented via cython without any special considerations http://docs.cython.org/en/latest/src/userguide/parallelism.html.)OliverOn Oct 21, 2019, at 12:48 PM, Charly Empereur-mot <charly....@gmail.com> wrote:Hello,I would like to limit the number of threads that MDAnalysis is allowed to use when I specify backend OpenMP.Are there arguments currently implemented for this ? Or a known work-around that would do the job ?It is not convenient that all cores are systematically used, for example if we run analysis scripts on clusters.Thank you very much for any help you might provide !
--
You received this message because you are subscribed to the Google Groups "MDnalysis discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/7e48d704-5f70-4252-9012-f7344bc4bcde%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-discussion+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/7e48d704-5f70-4252-9012-f7344bc4bcde%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/7e48d704-5f70-4252-9012-f7344bc4bcde%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "MDnalysis discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/054B85D4-2DAE-4ED2-BC2B-1EB76C597A47%40googlemail.com.