source: LMDZ6/trunk/libf/phylmd/mod_synchro_omp.F90 @ 5222

Last change on this file since 5222 was 5145, checked in by Laurent Fairhead, 4 months ago

Rolling back revision 5057 while we try to understand why it caused a 'Houston' error in mod_synchro_omp on irene.

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 980 bytes
RevLine 
[3531]1!
2! $Id: mod_synchro_omp.F90 5145 2024-07-30 12:26:10Z abarral $
3!
[987]4MODULE mod_synchro_omp
5
[1905]6    INTEGER,SAVE :: exit_omp 
7
[987]8CONTAINS
9
10  SUBROUTINE Init_synchro_omp
11  USE mod_phys_lmdz_para
12  IMPLICIT NONE
13
[5145]14  CALL omp_barrier
[1905]15!$OMP MASTER
16  exit_omp=0
17!$OMP END MASTER   
[5145]18  CALL omp_barrier
[1905]19
[987]20  END SUBROUTINE Init_Synchro_omp
21 
[1905]22  SUBROUTINE Synchro_omp 
[987]23  USE mod_phys_lmdz_para
24  IMPLICIT NONE
[1905]25  LOGICAL :: out
[3531]26  CHARACTER (LEN=20) :: modname='synchro_omp'
27  CHARACTER (LEN=80) :: abort_message
[987]28 
[1905]29    out=.FALSE.
[987]30!$OMP BARRIER
[5145]31!$OMP BARRIER
32!$OMP ATOMIC 
[1905]33    exit_omp=exit_omp+1
34!$OMP BARRIER
[5145]35!$OMP BARRIER
[1905]36    IF (exit_omp==omp_size) THEN
37      out=.TRUE.
38    ENDIF
39   
40    DO WHILE (.NOT. out)
41!$OMP BARRIER
42      IF (exit_omp==omp_size) out=.TRUE.
43!$OMP BARRIER
[987]44    ENDDO
[1905]45
[987]46!$OMP BARRIER
[1905]47!$OMP MASTER
48    exit_omp=0
49!$OMP END MASTER
50!$OMP BARRIER
[987]51
[1905]52    IF (exit_omp/=0) THEN
[3531]53       abort_message='synchro_omp'
54       CALL abort_physic(modname,abort_message,1)
[1905]55    ENDIF
[987]56
[1905]57  END SUBROUTINE Synchro_omp
58
59
[987]60END MODULE mod_synchro_omp
Note: See TracBrowser for help on using the repository browser.