Hi there,
We got PGI workstation 6.0 installed on a 64-bit linux
SUSE LINUX Enterprise Server 9 (x86_64) - Kernel 2.6.5-7.193-smp (3).
I tested a code like below but just cannot have it show
thread_1 results. From the display, you can see that all
lines get thread_0 from OMP_get_thread_num().
Is “pgf90 -mp -L/usr/pgi/linux86-64/6.0/lib try6.f” correct for
the compiling? Was PGI fortran built properly?
Any opioion is very much appreciated.
Reggie
reggie@cluster:~/temp/pgf90>
reggie@cluster:~/temp/pgf90> cat try6.f
c use omp_lib
real r1
isum = 0.0
i_get_thread = OMP_get_num_threads()
write(,) ’ i_get_thread = ', i_get_thread
C$OMP PARALLEL DO
do k=1,6
ithread = OMP_get_thread_num()
write(,) 'ithread = ', ithread
enddo
C$OMP END PARALLEL DO
end
reggie@cluster:~/temp/pgf90>
reggie@cluster:~/temp/pgf90> pgf90 -mp -L/usr/pgi/linux86-64/6.0/lib try6.f -o
try6.out
reggie@cluster:~/temp/pgf90>
reggie@cluster:~/temp/pgf90> env|grep OMP_
OMP_NUM_THREADS=2
reggie@cluster:~/temp/pgf90>
reggie@cluster:~/temp/pgf90> try6.out
i_get_thread = 0
ithread = 0
ithread = 0
ithread = 0
ithread = 0
ithread = 0
ithread = 0
reggie@cluster:~/temp/pgf90>