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

Diff of /MITgcm/eesupp/src/check_threads.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:29 1998 UTC revision 1.6 by heimbach, Wed Jun 21 20:44:06 2000 UTC
# Line 24  C     | and allow a programmer to modify Line 24  C     | and allow a programmer to modify
24  C     | barrier code to allow threads to be scheduled more       |  C     | barrier code to allow threads to be scheduled more       |
25  C     | appropriately.                                           |  C     | appropriately.                                           |
26  C     \==========================================================/  C     \==========================================================/
27          IMPLICIT NONE
28    
29  C     === Global data ===  C     === Global data ===
30  #include "SIZE.h"  #include "SIZE.h"
# Line 59  C Line 60  C
60        IF ( nChecks .GT. 10 ) THEN        IF ( nChecks .GT. 10 ) THEN
61         thError(myThid) = .TRUE.         thError(myThid) = .TRUE.
62         eeBootError     = .TRUE.         eeBootError     = .TRUE.
63         WRITE(msgBuffer,'(A,I,A,I,A)')         WRITE(msgBuffer,'(A,I5,A,I5,A)')
64       &  'S/R INI_CHECK_THREADS: Only ',numberThreadsRunning,       &  'S/R INI_CHECK_THREADS: Only ',numberThreadsRunning,
65       &  ' thread(s), ',nThreads,' are needed for this configuration!'       &  ' thread(s), ',nThreads,' are needed for this configuration!'
66          CALL PRINT_ERROR( msgBuffer , myThid)          CALL PRINT_ERROR( msgBuffer , myThid)
67  C--     Not enough threads are running so halt the program.  C--     Not enough threads are running so halt the program.
68  C       I didn't want this here but it is the only place I have found that  C       I did not want this here but it is the only place I have found that
69  C       KAP deadlocks if it there are fewer threads than iterations in a BLOCKED(1)  C       KAP deadlocks if it there are fewer threads than iterations in a BLOCKED(1)
70  C       loop. The deadlock appears to be in the routine mppjoin which never  C       loop. The deadlock appears to be in the routine mppjoin which never
71  C       returns. I tried putting the STOP in main or breaking out of the loop in main  C       returns. I tried putting the STOP in main or breaking out of the loop in main
# Line 75  C       but this causes KAP to insert a Line 76  C       but this causes KAP to insert a
76         GOTO 11         GOTO 11
77        ENDIF        ENDIF
78        IF ( numberThreadsRunning .NE. nThreads ) THEN        IF ( numberThreadsRunning .NE. nThreads ) THEN
79    #ifndef TARGET_T3E
80    #ifndef TARGET_CRAY_VECTOR
81         CALL SYSTEM('sleep 1')         CALL SYSTEM('sleep 1')
82    #endif
83    #endif
84         GOTO 10         GOTO 10
85        ENDIF        ENDIF
86     11 CONTINUE     11 CONTINUE

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

  ViewVC Help
Powered by ViewVC 1.1.22