I am struggling with the OpenMP. Through a pdf file "Parallel Programming: OpenMP + FORTRAN" by John Burkardt, I began with a simple "hello world" program.
program main USE IFPORT implicit none LOGICAL(4) success INTEGER(4) length CHARACTER(80) val success = SETENVQQ("OMP_NUM_THREADS=2") length = GETENVQQ("OMP_NUM_THREADS", val) write(*,*) "val=",val write(*,*) success write ( *, * ) 'A sequential hello to you!' !$omp parallel write ( *, * ) ' Parallel hello''s to you!' !$omp end parallel stop end
I Set the concole properties->Fortran->Language->Process OpenMP Directives to "/Qopenmp", But i still get the four line of "Parallel hello''s to you" no matter i Set the number of OMP_NUM_THREADS.
I use the Intel Parallel Studio XE 2011 + VS2010 + Win 7 64bit + Intel i5-2400 (4 Cores)
Please Help me! Thank you!