Hi Hongyon,
I am running PGF90version 6.2 on a linux cluster. The cluster has two processors per node. I am trying to run the OpenMp on one node (the master node).
Below is an example of the code:
Below is a typical common block declaration
COMMON /INIT/TEXTC,TEXER,DEXT,ISUM,IPG(5000),IPGN(5000),
1 KSTPSV(5000),ITETNSAV(5000),ND1,ND2,ND3
Below are the declarations for the private common blocks. These produce private copies of the common block for each processor.
C$OMP THREADPRIVATE(/TRAJCOM/,/INIT/,/XSID/,/IPACHK/,/IMPC/)
C$OMP THREADPRIVATE(/GCELS/,/VELNC/,/DISTSTUFF/,/IMREC/,/TRAJWRIT/)
C$OMP THREADPRIVATE(/DVDQSTUFF/,/TRAJSTC/,/RESTAR/,/CELLIT/,/CHOICE/)
.
.
.
Below is the first parallel region
C$OMP PARALLEL
C$OMP+ COPYIN(/TRAJCOM/,/IMPC/,/INIT/,/XSID/,/IPACHK/)
C$OMP+ COPYIN(/GCELS/,/DISTSTUFF/,/IMREC/,/TRAJWRIT/,/TRAJSTC/)
C$OMP+ COPYIN(/DVDQSTUFF/,/VELNC/,/RESTAR/,/CHOICE/)
C$OMP DO SCHEDULE(DYNAMIC,1)
C$OMP+ PRIVATE (XW,YW,ZW,IIN,XSIN,YSIN,ZSIN,XSOUT,YSOUT,ZSOUT)
DO 10 I=IPR,IP
CALL CONFAC(OUTPUT,JOBSUM,TEMP24,TEMP25,RESTRT,GFILE,
1 ISC,ICONFAUTO,XW,YW,ZW,XSIN,YSIN,ZSIN,
1 XSOUT,YSOUT,ZSOUT,IERC)
10 CONTINUE
C$OMP END PARALLEL
As an example the variable TEXTC in Common Block INIT above was initialized to 1.1 before entering the parallel region. It was not changed during the parallel region. After the parallel region its value was changed and was not usable.