openMP question

I am working on the windows 7 visual studio2011.
I have 8 core cpu. But omp_get_num_procs returns 2. Why is that? Thank you

Hi leonado2003,

Can you please post an example? On my system, I get the correct value of 8.

  • Mat
PGI$ cat test.f90

program testme

use omp_lib
  implicit none
  integer numproc
  numproc=-1
  numproc=omp_get_num_procs()
  print *, numproc
end program testme
PGI$ pgf90 -mp test.f90 -V11.3 -o test.exe; test.exe
            8