- Timestamp:
- Mar 31, 2017, 11:31:38 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phy_common/mod_phys_lmdz_omp_data.F90
r1657 r1682 1 1 ! 2 !$Id: mod_phys_lmdz_omp_data.F90 2 326 2015-07-10 12:24:29Z emillour$2 !$Id: mod_phys_lmdz_omp_data.F90 2429 2016-01-27 12:43:09Z fairhead $ 3 3 ! 4 4 MODULE mod_phys_lmdz_omp_data … … 7 7 INTEGER,SAVE :: omp_rank 8 8 LOGICAL,SAVE :: is_omp_root 9 LOGICAL,SAVE :: is_omp_master ! alias of is_omp_root 9 10 LOGICAL,SAVE :: is_using_omp 11 LOGICAL,SAVE :: is_north_pole_phy, is_south_pole_phy 10 12 11 13 INTEGER,SAVE,DIMENSION(:),ALLOCATABLE :: klon_omp_para_nb … … 16 18 INTEGER,SAVE :: klon_omp_begin 17 19 INTEGER,SAVE :: klon_omp_end 18 !$OMP THREADPRIVATE(omp_rank,klon_omp,is_omp_root,klon_omp_begin,klon_omp_end) 20 !$OMP THREADPRIVATE(omp_rank,klon_omp,is_omp_root,is_omp_master,klon_omp_begin,klon_omp_end) 21 !$OMP THREADPRIVATE(is_north_pole_phy, is_south_pole_phy) 19 22 20 23 CONTAINS 21 24 22 25 SUBROUTINE Init_phys_lmdz_omp_data(klon_mpi) 23 USE dimphy 26 USE dimphy 27 USE mod_phys_lmdz_mpi_data, ONLY : is_north_pole_dyn, is_south_pole_dyn 24 28 IMPLICIT NONE 25 29 INTEGER, INTENT(in) :: klon_mpi … … 43 47 omp_size=OMP_GET_NUM_THREADS() 44 48 !$OMP END MASTER 49 !$OMP BARRIER 45 50 omp_rank=OMP_GET_THREAD_NUM() 46 51 #else … … 56 61 ELSE 57 62 abort_message = 'ANORMAL : OMP_MASTER /= 0' 58 !-- abort_gcm only in the dynamics 59 !CALL abort_gcm (modname,abort_message,1) 60 print *,modname,abort_message 61 STOP 63 CALL abort_physic (modname,abort_message,1) 62 64 ENDIF 63 65 !$OMP END MASTER 64 66 is_omp_master=is_omp_root 65 67 66 68 !$OMP MASTER 69 67 70 ALLOCATE(klon_omp_para_nb(0:omp_size-1)) 68 71 ALLOCATE(klon_omp_para_begin(0:omp_size-1)) … … 83 86 !$OMP END MASTER 84 87 !$OMP BARRIER 88 89 if ((is_north_pole_dyn) .AND. (omp_rank == 0 )) then 90 is_north_pole_phy = .TRUE. 91 else 92 is_north_pole_phy = .FALSE. 93 endif 94 if ((is_south_pole_dyn) .AND. (omp_rank == omp_size-1)) then 95 is_south_pole_phy = .TRUE. 96 else 97 is_south_pole_phy = .FALSE. 98 endif 85 99 86 100 klon_omp=klon_omp_para_nb(omp_rank) … … 93 107 94 108 SUBROUTINE Print_module_data 109 USE print_control_mod, ONLY: lunout 95 110 IMPLICIT NONE 96 INCLUDE "iniprint.h"97 111 98 112 !$OMP CRITICAL
Note: See TracChangeset
for help on using the changeset viewer.