Last change
on this file since 5119 was
5111,
checked in by abarral, 4 months ago
|
Put abort_physic into a module
Remove -g option from makelmdz_fcm, since that option is linked to a header file that isn't included anywhere.
(lint) light lint on traversed files
|
-
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:
1.0 KB
|
Line | |
---|
1 | ! $Id: mod_synchro_omp.F90 5111 2024-07-24 10:17:33Z abarral $ |
---|
2 | |
---|
3 | MODULE mod_synchro_omp |
---|
4 | |
---|
5 | INTEGER, SAVE :: exit_omp |
---|
6 | |
---|
7 | CONTAINS |
---|
8 | |
---|
9 | SUBROUTINE Init_synchro_omp |
---|
10 | USE lmdz_phys_para |
---|
11 | USE lmdz_abort_physic, ONLY: abort_physic |
---|
12 | IMPLICIT NONE |
---|
13 | |
---|
14 | !$OMP BARRIER |
---|
15 | !$OMP MASTER |
---|
16 | exit_omp = 0 |
---|
17 | !$OMP END MASTER |
---|
18 | !$OMP BARRIER |
---|
19 | |
---|
20 | END SUBROUTINE Init_Synchro_omp |
---|
21 | |
---|
22 | SUBROUTINE Synchro_omp |
---|
23 | USE lmdz_phys_para |
---|
24 | IMPLICIT NONE |
---|
25 | LOGICAL :: out |
---|
26 | CHARACTER (LEN = 20) :: modname = 'synchro_omp' |
---|
27 | CHARACTER (LEN = 80) :: abort_message |
---|
28 | |
---|
29 | out = .FALSE. |
---|
30 | !$OMP BARRIER |
---|
31 | !$OMP ATOMIC |
---|
32 | exit_omp = exit_omp + 1 |
---|
33 | !$OMP BARRIER |
---|
34 | IF (exit_omp==omp_size) THEN |
---|
35 | out = .TRUE. |
---|
36 | ENDIF |
---|
37 | |
---|
38 | DO WHILE (.NOT. out) |
---|
39 | !$OMP BARRIER |
---|
40 | IF (exit_omp==omp_size) out = .TRUE. |
---|
41 | !$OMP BARRIER |
---|
42 | ENDDO |
---|
43 | |
---|
44 | !$OMP BARRIER |
---|
45 | !$OMP MASTER |
---|
46 | exit_omp = 0 |
---|
47 | !$OMP END MASTER |
---|
48 | !$OMP BARRIER |
---|
49 | |
---|
50 | IF (exit_omp/=0) THEN |
---|
51 | abort_message = 'synchro_omp' |
---|
52 | CALL abort_physic(modname, abort_message, 1) |
---|
53 | ENDIF |
---|
54 | |
---|
55 | END SUBROUTINE Synchro_omp |
---|
56 | |
---|
57 | |
---|
58 | END MODULE mod_synchro_omp |
---|
Note: See
TracBrowser
for help on using the repository browser.