Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
21 Views

OPENMP Error in Fortran 11.1 build 048

Now, i'm testing the intel fortran compiler ( 11.1.048 )

With openmp, I have a correct results in the previous version(10.1.013), Now, there's some problem
OS : Windows XP SP3
VS : 2005
-------------------------------------------------------
Integer omp_get_max_threads, nprocs
nprocs = omp_get_max_threads()


--------------------------------------------------------
In 10.1.013, nprocs = 8, but, in 11.1.048, I have nprocs = 32768
What should i do????









0 Kudos
2 Replies
Highlighted
Black Belt
21 Views

Try correcting the program, declaring the omp_ functions by
USE OMP_LIB
rather than guessing their data types and hoping that the compiler will handle empty argument lists by accident.
0 Kudos
Highlighted
21 Views


Also, do not assume omp_max_threads() returns the number of procs (processors I assume) on the system. It returns the maximum number of softwarethreads permitted which can be more or less than the number of "processors".

Per IVF doc
omp_max_threads() returns the number of threads available to subsequent parallel regions created by the calling thread. This function returns the value inherited by the calling thread from the OMP_SET_NUM_THREADS() function.
(or inherited from environment variable, or inhereted from omp runtime initialization to number of hardware thread on system or to number of hardware threads available to process).

And, the number returned is not necessarily the number of threads that will be created (and used) in the next parallel region. (you must test for this inside the region)

Jim Dempsey

0 Kudos