/[MITgcm]/MITgcm/eesupp/src/eedie.F
ViewVC logotype

Diff of /MITgcm/eesupp/src/eedie.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2 by cnh, Thu Apr 23 20:37:30 1998 UTC revision 1.4 by adcroft, Tue May 18 17:39:21 1999 UTC
# Line 13  C     | Note: This routine can also be c Line 13  C     | Note: This routine can also be c
13  C     | directives set so that no multi-processing is initialised|  C     | directives set so that no multi-processing is initialised|
14  C     | This is OK and should work fine.                         |  C     | This is OK and should work fine.                         |
15  C     \==========================================================/  C     \==========================================================/
16          IMPLICIT NONE
17    
18  C     == Global variables ==  C     == Global variables ==
19  #include "SIZE.h"  #include "SIZE.h"
# Line 37  C--   Check that all the threads have en Line 38  C--   Check that all the threads have en
38  C     No thread should reach this loop before all threads have set  C     No thread should reach this loop before all threads have set
39  C     threadIsComplete to TRUE. If they do then either there is a bug  C     threadIsComplete to TRUE. If they do then either there is a bug
40  C     in the code or the behaviour of the parallel compiler directives  C     in the code or the behaviour of the parallel compiler directives
41  C     are not right for this code. In the latter case different directives  C     are not right for this code. In the latter case different
42  C     may be available or the compiler itself may have a bug or you may  C     directives may be available or the compiler itself may have a
43  C     need a different parallel compiler for main.F  C     bug or you may need a different parallel compiler for main.F
44        nThreadsDone = 0        nThreadsDone = 0
45        DO I = 1, nThreads        DO I = 1, nThreads
46         IF ( threadIsComplete(I) ) nThreadsDone = nThreadsDone+1         IF ( threadIsComplete(I) ) nThreadsDone = nThreadsDone+1
47        ENDDO        ENDDO
48        IF ( nThreadsDone .LT. nThreads ) THEN        IF ( nThreadsDone .LT. nThreads ) THEN
49         WRITE(msgBuf,'(A,I,A,I,A)')         WRITE(msgBuf,'(A,I5,A,I5,A)')
50       & 'S/R EEDIE: Only ',nThreadsDone,       & 'S/R EEDIE: Only ',nThreadsDone,
51       & ' threads have completed, ',nThreads,' are expected for this configuration!'       & ' threads have completed, ',nThreads,
52         & ' are expected for this configuration!'
53         WRITE(0,*) msgBuf         WRITE(0,*) msgBuf
54         WRITE(0,*) 'Possibly you have different values of setenv PARALLEL and nThreads?'         WRITE(0,*)
55         & 'Possibly you have different setenv PARALLEL and nThreads?'
56         eeEndError = .TRUE.         eeEndError = .TRUE.
57         fatalError = .TRUE.         fatalError = .TRUE.
58        ENDIF        ENDIF
# Line 65  C--   ================================== Line 68  C--   ==================================
68         IF ( mpiRC .NE. MPI_SUCCESS ) THEN         IF ( mpiRC .NE. MPI_SUCCESS ) THEN
69          eeEndError = .TRUE.          eeEndError = .TRUE.
70          fatalError = .TRUE.          fatalError = .TRUE.
71          WRITE(msgBuf,'(A,I)')          WRITE(msgBuf,'(A,I5)')
72       &       'S/R FIN_PROCS: MPI_FINALIZE return code',       &       'S/R FIN_PROCS: MPI_FINALIZE return code',
73       &       mpiRC       &       mpiRC
74          CALL PRINT_ERROR( msgBuf, 1 )          CALL PRINT_ERROR( msgBuf, 1 )

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22