100 |
ELSEIF ( pidIO .EQ. myProcId ) THEN |
ELSEIF ( pidIO .EQ. myProcId ) THEN |
101 |
C-- Write multi-process format |
C-- Write multi-process format |
102 |
C PRINT can be called by several threads simultaneously. |
C PRINT can be called by several threads simultaneously. |
103 |
C The write statement may need to ne marked as a critical section. |
C The write statement may need to be marked as a critical section. |
104 |
#ifndef FMTFTN_IO_THREAD_SAFE |
#ifndef FMTFTN_IO_THREAD_SAFE |
105 |
# ifdef USE_OMP_THREADING |
# ifdef USE_OMP_THREADING |
106 |
C$OMP CRITICAL |
C$OMP CRITICAL |
116 |
WRITE(unit,'(A,A,A,A,A,A,A)',ERR=999) |
WRITE(unit,'(A,A,A,A,A,A,A)',ERR=999) |
117 |
& '(',PROCESS_HEADER,' ',idString,')',' ',message(iStart:iEnd) |
& '(',PROCESS_HEADER,' ',idString,')',' ',message(iStart:iEnd) |
118 |
ENDIF |
ENDIF |
119 |
|
IF ( debugMode ) THEN |
120 |
|
CALL MDS_FLUSH( unit, myThid ) |
121 |
|
ENDIF |
122 |
GOTO 1000 |
GOTO 1000 |
123 |
999 CONTINUE |
999 CONTINUE |
124 |
ioErrorCount(myThid) = ioErrorCount(myThid)+1 |
ioErrorCount(myThid) = ioErrorCount(myThid)+1 |
242 |
c & message(iStart:iEnd) |
c & message(iStart:iEnd) |
243 |
ENDIF |
ENDIF |
244 |
ENDIF |
ENDIF |
245 |
|
IF ( debugMode ) THEN |
246 |
|
CALL MDS_FLUSH( errorMessageUnit, myThid ) |
247 |
|
ENDIF |
248 |
GOTO 1000 |
GOTO 1000 |
249 |
999 CONTINUE |
999 CONTINUE |
250 |
ioErrorCount(myThid) = ioErrorCount(myThid)+1 |
ioErrorCount(myThid) = ioErrorCount(myThid)+1 |