Ignore:
Timestamp:
Aug 14, 2025, 5:20:31 PM (11 days ago)
Author:
emillour
Message:

Dynamics-physics interface:
Minor cleaning and prettyfying: use "is_master" when possible,
remove unecessary memory-hungry calls to check_buffer_r in omp_transfert,
and convert comments to English in transfert_para.
EM

Location:
trunk/LMDZ.COMMON/libf/phy_common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/phy_common/ioipsl_getin_p_mod.F90

    r2290 r3896  
    1010USE ioipsl_getincom, ONLY: getin
    1111#endif
    12 USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
    13 USE mod_phys_lmdz_omp_data, ONLY :  is_omp_root
     12USE mod_phys_lmdz_para, ONLY :  is_master
    1413USE mod_phys_lmdz_transfert_para, ONLY : bcast
    1514!-
     
    4241
    4342!$OMP BARRIER
    44     IF (is_mpi_root .AND. is_omp_root) THEN
     43    IF (is_master) THEN
    4544        CALL getin(VarIn,VarOut)
    4645    ENDIF
     
    5655
    5756!$OMP BARRIER
    58     IF (is_mpi_root .AND. is_omp_root) THEN
     57    IF (is_master) THEN
    5958        CALL getin(VarIn,VarOut)
    6059    ENDIF
     
    7271
    7372!$OMP BARRIER
    74     IF (is_mpi_root .AND. is_omp_root) THEN
     73    IF (is_master) THEN
    7574        CALL getin(VarIn,VarOut)
    7675    ENDIF
     
    8483
    8584!$OMP BARRIER
    86     IF (is_mpi_root .AND. is_omp_root) THEN
     85    IF (is_master) THEN
    8786        CALL getin(VarIn,VarOut)
    8887    ENDIF
     
    9695
    9796!$OMP BARRIER
    98     IF (is_mpi_root .AND. is_omp_root) THEN
     97    IF (is_master) THEN
    9998        CALL getin(VarIn,VarOut)
    10099    ENDIF
     
    110109
    111110!$OMP BARRIER
    112     IF (is_mpi_root .AND. is_omp_root) THEN
     111    IF (is_master) THEN
    113112        CALL getin(VarIn,VarOut)
    114113    ENDIF
     
    122121
    123122!$OMP BARRIER
    124     IF (is_mpi_root .AND. is_omp_root) THEN
     123    IF (is_master) THEN
    125124        CALL getin(VarIn,VarOut)
    126125    ENDIF
     
    134133
    135134!$OMP BARRIER
    136     IF (is_mpi_root .AND. is_omp_root) THEN
     135    IF (is_master) THEN
    137136        CALL getin(VarIn,VarOut)
    138137    ENDIF
     
    148147
    149148!$OMP BARRIER
    150     IF (is_mpi_root .AND. is_omp_root) THEN
     149    IF (is_master) THEN
    151150        CALL getin(VarIn,VarOut)
    152151    ENDIF
     
    160159
    161160!$OMP BARRIER
    162     IF (is_mpi_root .AND. is_omp_root) THEN
     161    IF (is_master) THEN
    163162        CALL getin(VarIn,VarOut)
    164163    ENDIF
     
    172171
    173172!$OMP BARRIER
    174     IF (is_mpi_root .AND. is_omp_root) THEN
     173    IF (is_master) THEN
    175174        CALL getin(VarIn,VarOut)
    176175    ENDIF
  • trunk/LMDZ.COMMON/libf/phy_common/mod_phys_lmdz_omp_transfert.F90

    r3888 r3896  
    556556    REAL,INTENT(OUT),DIMENSION(:) :: VarOut
    557557
    558     CALL Check_buffer_r(size(VarOut))   
    559558    CALL gather_omp_rgen(VarIn,Varout,1)
    560559   
     
    568567    REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
    569568
    570     CALL Check_buffer_r(size(VarOut))   
    571569    CALL gather_omp_rgen(VarIn,Varout,Size(VarIn,2))
    572570       
     
    580578    REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
    581579   
    582     CALL Check_buffer_r(size(VarOut))   
    583580    CALL gather_omp_rgen(VarIn,Varout,Size(VarIn,2)*Size(VarIn,3))
    584581   
     
    592589    REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
    593590
    594     CALL Check_buffer_r(size(VarOut))       
    595591    CALL gather_omp_rgen(VarIn,Varout,Size(VarIn,2)*Size(VarIn,3)*Size(VarIn,4))
    596592   
  • trunk/LMDZ.COMMON/libf/phy_common/mod_phys_lmdz_transfert_para.F90

    r3011 r3896  
    5050
    5151!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    52 !! Definition des Broadcast --> 4D   !!
     52!! Definition of Broadcasts --> 4D   !!
    5353!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    5454
    55 !! -- Les chaine de charactère -- !!
     55!! -- Strings -- !!
    5656
    5757  SUBROUTINE bcast_c(var)
     
    6666  END SUBROUTINE bcast_c
    6767
    68 !! -- Les entiers -- !!
     68!! -- Integers -- !!
    6969 
    7070  SUBROUTINE bcast_i(var)
    7171  IMPLICIT NONE
    7272    INTEGER,INTENT(INOUT) :: Var
     73
    7374!$OMP MASTER
    7475    CALL bcast_mpi(Var)
     
    150151
    151152
    152 !! -- Les reels -- !!
     153!! -- Reals -- !!
    153154 
    154155  SUBROUTINE bcast_r(var)
     
    235236
    236237
    237 !! -- Les booleens -- !!
     238!! -- Logicals -- !!
    238239 
    239240  SUBROUTINE bcast_l(var)
    240241  IMPLICIT NONE
    241242    LOGICAL,INTENT(INOUT) :: Var
     243
    242244!$OMP MASTER
    243245    CALL bcast_mpi(Var)
     
    320322
    321323!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    322 !! Definition des Scatter   --> 4D   !!
     324!! Definition for Scatter   --> 4D   !!
    323325!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    324326
     
    533535
    534536!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    535 !! Definition des Gather   --> 4D   !!
     537!! Definition for Gather   --> 4D   !!
    536538!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    537539 
    538 !!!!! --> Les entiers
     540!!!!! --> For integers
    539541
    540542  SUBROUTINE gather_i(VarIn, VarOut)
     
    606608
    607609
    608 !!!!! --> Les reels
     610!!!!! --> For reals
    609611
    610612  SUBROUTINE gather_r(VarIn, VarOut)
     
    676678
    677679
    678 !!!!! --> Les booleens
     680!!!!! --> For logicals
    679681
    680682  SUBROUTINE gather_l(VarIn, VarOut)
     
    747749
    748750!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    749 !! Definition des Scatter2D   --> 4D   !!
     751!! Definition for Scatter2D   --> 4D   !!
    750752!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    751753
    752754
    753 !!!!! --> Les entiers
     755!!!!! --> For integers
    754756
    755757  SUBROUTINE scatter2D_i(VarIn, VarOut)
     
    821823 
    822824
    823 !!!!! --> Les reels
     825!!!!! --> For reals
    824826
    825827  SUBROUTINE scatter2D_r(VarIn, VarOut)
     
    891893   
    892894   
    893 !!!!! --> Les booleens
     895!!!!! --> For logicals
    894896
    895897
     
    963965
    964966!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    965 !! Definition des Gather2D   --> 4D   !!
     967!! Definition for Gather2D   --> 4D   !!
    966968!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    967969
    968 !!!!! --> Les entiers
     970!!!!! --> For integers
    969971
    970972  SUBROUTINE gather2D_i(VarIn, VarOut)
     
    10361038
    10371039
    1038 !!!!! --> Les reels
     1040!!!!! --> For reals
    10391041
    10401042  SUBROUTINE gather2D_r(VarIn, VarOut)
     
    11061108 
    11071109
    1108 !!!!! --> Les booleens
     1110!!!!! --> For logicals
    11091111
    11101112  SUBROUTINE gather2D_l(VarIn, VarOut)
     
    11771179
    11781180!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1179 !! Definition des reduce_sum   --> 4D   !!
     1181!! Definition for reduce_sum   --> 4D   !!
    11801182!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    11811183
    1182 ! Les entiers
     1184! For integers
    11831185
    11841186  SUBROUTINE reduce_sum_i(VarIn, VarOut)
     
    12621264
    12631265
    1264 ! Les reels
     1266! For reals
    12651267
    12661268  SUBROUTINE reduce_sum_r(VarIn, VarOut)
Note: See TracChangeset for help on using the changeset viewer.