1 |
C $Header$ |
C $Header$ |
2 |
|
C $Name$ |
3 |
|
|
4 |
#include "CPP_EEOPTIONS.h" |
#include "CPP_EEOPTIONS.h" |
5 |
|
|
14 |
C | directives set so that no multi-processing is initialised| |
C | directives set so that no multi-processing is initialised| |
15 |
C | This is OK and should work fine. | |
C | This is OK and should work fine. | |
16 |
C \==========================================================/ |
C \==========================================================/ |
17 |
|
IMPLICIT NONE |
18 |
|
|
19 |
C == Global variables == |
C == Global variables == |
20 |
#include "SIZE.h" |
#include "SIZE.h" |
39 |
C No thread should reach this loop before all threads have set |
C No thread should reach this loop before all threads have set |
40 |
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 |
41 |
C in the code or the behaviour of the parallel compiler directives |
C in the code or the behaviour of the parallel compiler directives |
42 |
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 |
43 |
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 |
44 |
C need a different parallel compiler for main.F |
C bug or you may need a different parallel compiler for main.F |
45 |
nThreadsDone = 0 |
nThreadsDone = 0 |
46 |
DO I = 1, nThreads |
DO I = 1, nThreads |
47 |
IF ( threadIsComplete(I) ) nThreadsDone = nThreadsDone+1 |
IF ( threadIsComplete(I) ) nThreadsDone = nThreadsDone+1 |
48 |
ENDDO |
ENDDO |
49 |
IF ( nThreadsDone .LT. nThreads ) THEN |
IF ( nThreadsDone .LT. nThreads ) THEN |
50 |
WRITE(msgBuf,'(A,I,A,I,A)') |
WRITE(msgBuf,'(A,I5,A,I5,A)') |
51 |
& 'S/R EEDIE: Only ',nThreadsDone, |
& 'S/R EEDIE: Only ',nThreadsDone, |
52 |
& ' threads have completed, ',nThreads,' are expected for this configuration!' |
& ' threads have completed, ',nThreads, |
53 |
|
& ' are expected for this configuration!' |
54 |
WRITE(0,*) msgBuf |
WRITE(0,*) msgBuf |
55 |
WRITE(0,*) 'Possibly you have different values of setenv PARALLEL and nThreads?' |
WRITE(0,*) |
56 |
|
& 'Possibly you have different setenv PARALLEL and nThreads?' |
57 |
eeEndError = .TRUE. |
eeEndError = .TRUE. |
58 |
fatalError = .TRUE. |
fatalError = .TRUE. |
59 |
ENDIF |
ENDIF |
69 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
70 |
eeEndError = .TRUE. |
eeEndError = .TRUE. |
71 |
fatalError = .TRUE. |
fatalError = .TRUE. |
72 |
WRITE(msgBuf,'(A,I)') |
WRITE(msgBuf,'(A,I5)') |
73 |
& 'S/R FIN_PROCS: MPI_FINALIZE return code', |
& 'S/R FIN_PROCS: MPI_FINALIZE return code', |
74 |
& mpiRC |
& mpiRC |
75 |
CALL PRINT_ERROR( msgBuf, 1 ) |
CALL PRINT_ERROR( msgBuf, 1 ) |