July 5, 2007
12:01 p.m.
hi all, I'm using f2py to compile a f90 function, parallelized with openmp, into a shared object, that I can import in python. the question is: when I call the function from python, how can I specify the number of threads to use? the usual way of doing it, with a common fortran executable, is setting the enviroment variable OMP_NUM_THREADS to the desired value. using os.environ to set it from python does not seem to work: the function is always executed using 4 processors (that is quite strange in itself: where does "4" comes from?). any hints? thank you all in advance, lorenzo.
6895
Age (days ago)
6895
Last active (days ago)
0 comments
1 participants
participants (1)
-
lorenzo bolla