Hi
I am writing FORTRAN/OpenMP code on a NEC-SX-8 and am trying to find out how many threads are being used in a parallel region.
I have the code like;
!$OMP PARALLEL DO
!$OMP&PRIVATE(...,nt)
!$OMP&SHARED(...)
nt=OMP_GET_NUM_THREADS()
PRINT *, 'threads= ', nt
DO A
DO B
loads of work
B CONTINUE
A CONTINUE
!$OMP END PARALLEL DO
When I compile with "sxf90 source.f -P openmp" I get the error message "OpenMP directive is appeared inappropriately".
Now when I replace the two lines between the shared directive and the first do statement with a simple print hello statement I get the same error message.
Is there a rule that states you can't put any statement between a shared directive and a do, or is there another way of doing what I want to do?
Chris
