1 |
C $Id$ |
C $Header$ |
2 |
|
|
3 |
#include "CPP_EEOPTIONS.h" |
#include "CPP_EEOPTIONS.h" |
4 |
|
|
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" |
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 |
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 ) |