Changeset 1543 for trunk/LMDZ.GENERIC/libf/phy_common
- Timestamp:
- Apr 22, 2016, 9:02:11 AM (9 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phy_common
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phy_common/ioipsl_getin_p_mod.F90
r1521 r1543 12 12 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 13 13 USE mod_phys_lmdz_omp_data, ONLY : is_omp_root 14 use mod_phys_lmdz_para, only: bcast14 USE mod_phys_lmdz_transfert_para, ONLY : bcast 15 15 !- 16 16 IMPLICIT NONE -
trunk/LMDZ.GENERIC/libf/phy_common/mod_grid_phy_lmdz.F90
r1521 r1543 1 1 ! 2 !$ Header$2 !$Id $ 3 3 ! 4 4 MODULE mod_grid_phy_lmdz … … 7 7 PRIVATE :: grid1dTo2d_glo_igen, grid1dTo2d_glo_rgen, grid1dTo2d_glo_lgen, & 8 8 grid2dTo1d_glo_igen, grid2dTo1d_glo_rgen, grid2dTo1d_glo_lgen 9 9 10 INTEGER,PARAMETER :: unstructured=0 11 INTEGER,PARAMETER :: regular_lonlat=1 12 13 INTEGER,SAVE :: grid_type 14 INTEGER,SAVE :: nvertex 10 15 INTEGER,SAVE :: nbp_lon ! == iim 11 INTEGER,SAVE :: nbp_lat ! == jjmp1 16 INTEGER,SAVE :: nbp_lat ! == jjmp1 (or == 1 if running 1D model) 12 17 INTEGER,SAVE :: nbp_lev ! == llm 13 INTEGER,SAVE :: klon_glo 14 !$OMP THREADPRIVATE(nbp_lon,nbp_lat,nbp_lev,klon_glo) 18 INTEGER,SAVE :: klon_glo ! total number of atmospheric columns 15 19 16 20 INTERFACE grid1dTo2d_glo … … 33 37 34 38 35 SUBROUTINE init_grid_phy_lmdz( iim,jjp1,llm)39 SUBROUTINE init_grid_phy_lmdz(grid_type_,nvertex_,nbp_lon_,nbp_lat_,nbp_lev_) 36 40 IMPLICIT NONE 37 INTEGER, INTENT(in) :: iim 38 INTEGER, INTENT(in) :: jjp1 39 INTEGER, INTENT(in) :: llm 40 41 nbp_lon=iim 42 nbp_lat=jjp1 43 nbp_lev=llm 44 klon_glo=(iim*jjp1)-2*(iim-1) 45 46 ! Ehouarn: handle 1D case: 47 if ((iim.eq.1).and.(jjp1.eq.2)) then 48 nbp_lat=1 49 klon_glo=1 50 endif 41 INTEGER,INTENT(IN) :: grid_type_ 42 INTEGER,INTENT(IN) :: nvertex_ 43 INTEGER, INTENT(IN) :: nbp_lon_ 44 INTEGER, INTENT(IN) :: nbp_lat_ 45 INTEGER, INTENT(IN) :: nbp_lev_ 46 47 grid_type = grid_type_ 48 nvertex = nvertex_ 49 nbp_lon = nbp_lon_ 50 nbp_lat = nbp_lat_ 51 nbp_lev = nbp_lev_ 52 53 IF (nbp_lon*nbp_lat==1) THEN 54 klon_glo=1 55 ELSE 56 klon_glo=(nbp_lon*nbp_lat)-2*(nbp_lon-1) 57 ENDIF 51 58 52 59 END SUBROUTINE init_grid_phy_lmdz … … 284 291 285 292 !---------------------------------------------------------------- 286 ! fonctions generiques (privees)293 ! Generic (private) fonctions 287 294 !---------------------------------------------------------------- 295 288 296 SUBROUTINE grid1dTo2d_glo_igen(VarIn,VarOut,dimsize) 297 289 298 IMPLICIT NONE 290 299 … … 321 330 322 331 SUBROUTINE grid1dTo2d_glo_rgen(VarIn,VarOut,dimsize) 332 323 333 IMPLICIT NONE 324 334 … … 354 364 355 365 SUBROUTINE grid1dTo2d_glo_lgen(VarIn,VarOut,dimsize) 366 356 367 IMPLICIT NONE 357 368 … … 387 398 388 399 SUBROUTINE grid2dTo1d_glo_igen(VarIn,VarOut,dimsize) 400 389 401 IMPLICIT NONE 390 402 … … 409 421 410 422 SUBROUTINE grid2dTo1d_glo_rgen(VarIn,VarOut,dimsize) 423 411 424 IMPLICIT NONE 412 425 … … 431 444 432 445 SUBROUTINE grid2dTo1d_glo_lgen(VarIn,VarOut,dimsize) 446 433 447 IMPLICIT NONE 434 448 -
trunk/LMDZ.GENERIC/libf/phy_common/mod_phys_lmdz_mpi_data.F90
r1521 r1543 3 3 ! 4 4 MODULE mod_phys_lmdz_mpi_data 5 USE mod_const_mpi, only: MPI_REAL_LMDZ, COMM_LMDZ 5 ! USE mod_const_mpi 6 6 7 7 INTEGER,SAVE :: ii_begin … … 16 16 INTEGER,SAVE :: klon_mpi_end 17 17 INTEGER,SAVE :: klon_mpi 18 !!$OMP THREADPRIVATE(ii_begin,ii_end,jj_begin,jj_end,jj_nb,ij_begin,&19 ! !$OMP ij_end,ij_nb,klon_mpi_begin,klon_mpi_end,klon_mpi)20 18 21 19 INTEGER,SAVE,ALLOCATABLE,DIMENSION(:) :: jj_para_nb … … 33 31 INTEGER,SAVE,ALLOCATABLE,DIMENSION(:) :: klon_mpi_para_begin 34 32 INTEGER,SAVE,ALLOCATABLE,DIMENSION(:) :: klon_mpi_para_end 35 !!$OMP THREADPRIVATE(jj_para_nb,jj_para_begin,jj_para_end,ii_para_begin,ii_para_end,&36 ! !$OMP ij_para_nb,ij_para_begin,ij_para_end,klon_mpi_para_nb,klon_mpi_para_begin,&37 ! !$OMP klon_mpi_para_end)38 33 39 34 40 35 INTEGER,SAVE :: mpi_rank 41 36 INTEGER,SAVE :: mpi_size 42 INTEGER,SAVE :: mpi_root 37 INTEGER,SAVE :: mpi_master 38 ! INTEGER,SAVE :: mpi_root 43 39 LOGICAL,SAVE :: is_mpi_root 44 40 LOGICAL,SAVE :: is_using_mpi 45 !!$OMP THREADPRIVATE(mpi_rank,mpi_size,mpi_root,is_mpi_root,is_using_mpi)46 41 47 42 … … 49 44 LOGICAL,SAVE :: is_south_pole 50 45 INTEGER,SAVE :: COMM_LMDZ_PHY 51 !!$OMP THREADPRIVATE(is_north_pole,is_south_pole,COMM_LMDZ_PHY) 46 INTEGER,SAVE :: MPI_REAL_LMDZ ! MPI_REAL8 52 47 53 48 CONTAINS 54 49 55 SUBROUTINE Init_phys_lmdz_mpi_data(iim,jjp1,nb_proc,distrib) 56 USE mod_const_mpi, ONLY : COMM_LMDZ 50 ! SUBROUTINE Init_phys_lmdz_mpi_data(iim,jjp1,nb_proc,distrib) 51 SUBROUTINE init_phys_lmdz_mpi_data(nbp, nbp_lon, nbp_lat, communicator) 52 ! USE mod_const_mpi, ONLY : COMM_LMDZ 57 53 IMPLICIT NONE 58 INTEGER,INTENT(in) :: iim 59 INTEGER,INTENT(in) :: jjp1 60 INTEGER,INTENT(in) :: nb_proc 61 INTEGER,INTENT(in) :: distrib(0:nb_proc-1) 62 54 #ifdef CPP_MPI 55 INCLUDE 'mpif.h' 56 #endif 57 INTEGER,INTENT(in) :: nbp 58 INTEGER,INTENT(in) :: nbp_lon 59 INTEGER,INTENT(in) :: nbp_lat 60 INTEGER,INTENT(in) :: communicator 61 62 INTEGER,ALLOCATABLE :: distrib(:) 63 63 INTEGER :: ierr 64 64 INTEGER :: klon_glo … … 71 71 #endif 72 72 73 if ( iim.eq.1) then73 if ((nbp_lon.eq.1).and.(nbp_lat.eq.1)) then ! running 1D column model 74 74 klon_glo=1 75 75 else 76 klon_glo=iim*(jjp1-2)+2 76 ! The usual global physics grid: 1 point for each pole and nbp_lon points 77 ! for all other latitudes 78 klon_glo=nbp_lon*(nbp_lat-2)+2 77 79 endif 78 80 79 COMM_LMDZ_PHY= COMM_LMDZ81 COMM_LMDZ_PHY=communicator 80 82 81 83 IF (is_using_mpi) THEN 82 84 #ifdef CPP_MPI 85 MPI_REAL_LMDZ=MPI_REAL8 83 86 CALL MPI_COMM_SIZE(COMM_LMDZ_PHY,mpi_size,ierr) 84 87 CALL MPI_COMM_RANK(COMM_LMDZ_PHY,mpi_rank,ierr) … … 89 92 ENDIF 90 93 94 ALLOCATE(distrib(0:mpi_size-1)) 95 96 IF (is_using_mpi) THEN 97 #ifdef CPP_MPI 98 CALL MPI_ALLGATHER(nbp,1,MPI_INTEGER,distrib,1,MPI_INTEGER,COMM_LMDZ_PHY,ierr) 99 #endif 100 ELSE 101 distrib(:)=nbp 102 ENDIF 103 104 91 105 IF (mpi_rank == 0) THEN 92 mpi_ root= 0106 mpi_master = 0 93 107 is_mpi_root = .true. 94 108 ENDIF … … 122 136 123 137 124 klon_mpi_para_nb(0:mpi_size-1)=distrib(0: nb_proc-1)138 klon_mpi_para_nb(0:mpi_size-1)=distrib(0:mpi_size-1) 125 139 126 140 DO i=0,mpi_size-1 … … 139 153 ij_para_begin(i) = 1 140 154 ELSE 141 ij_para_begin(i) = klon_mpi_para_begin(i)+ iim-1155 ij_para_begin(i) = klon_mpi_para_begin(i)+nbp_lon-1 142 156 ENDIF 143 157 144 jj_para_begin(i) = (ij_para_begin(i)-1)/ iim+ 1145 ii_para_begin(i) = MOD(ij_para_begin(i)-1, iim) + 1158 jj_para_begin(i) = (ij_para_begin(i)-1)/nbp_lon + 1 159 ii_para_begin(i) = MOD(ij_para_begin(i)-1,nbp_lon) + 1 146 160 147 161 148 ij_para_end(i) = klon_mpi_para_end(i)+iim-1 149 jj_para_end(i) = (ij_para_end(i)-1)/iim + 1 150 ii_para_end(i) = MOD(ij_para_end(i)-1,iim) + 1 151 152 ! Ehouarn: handle 1D case: 153 if (klon_glo.eq.1) then 154 klon_mpi_para_end(i) = 1 155 klon_mpi_para_nb(i) = 1 156 ij_para_end(i) = 1 157 jj_para_end(i) = 1 158 ii_para_end(i) = 1 159 endif 162 ij_para_end(i) = klon_mpi_para_end(i)+nbp_lon-1 163 jj_para_end(i) = (ij_para_end(i)-1)/nbp_lon + 1 164 ii_para_end(i) = MOD(ij_para_end(i)-1,nbp_lon) + 1 165 160 166 161 167 ij_para_nb(i) = ij_para_end(i)-ij_para_begin(i)+1 … … 181 187 182 188 SUBROUTINE print_module_data 189 ! USE print_control_mod, ONLY: lunout 183 190 IMPLICIT NONE 184 !INCLUDE "iniprint.h"185 186 WRITE( *,*) 'ii_begin =', ii_begin187 WRITE( *,*) 'ii_end =', ii_end188 WRITE( *,*) 'jj_begin =',jj_begin189 WRITE( *,*) 'jj_end =', jj_end190 WRITE( *,*) 'jj_nb =', jj_nb191 WRITE( *,*) 'ij_begin =', ij_begin192 WRITE( *,*) 'ij_end =', ij_end193 WRITE( *,*) 'ij_nb =', ij_nb194 WRITE( *,*) 'klon_mpi_begin =', klon_mpi_begin195 WRITE( *,*) 'klon_mpi_end =', klon_mpi_end196 WRITE( *,*) 'klon_mpi =', klon_mpi197 WRITE( *,*) 'jj_para_nb =', jj_para_nb198 WRITE( *,*) 'jj_para_begin =', jj_para_begin199 WRITE( *,*) 'jj_para_end =', jj_para_end200 WRITE( *,*) 'ii_para_begin =', ii_para_begin201 WRITE( *,*) 'ii_para_end =', ii_para_end202 WRITE( *,*) 'ij_para_nb =', ij_para_nb203 WRITE( *,*) 'ij_para_begin =', ij_para_begin204 WRITE( *,*) 'ij_para_end =', ij_para_end205 WRITE( *,*) 'klon_mpi_para_nb =', klon_mpi_para_nb206 WRITE( *,*) 'klon_mpi_para_begin =', klon_mpi_para_begin207 WRITE( *,*) 'klon_mpi_para_end =', klon_mpi_para_end208 WRITE( *,*) 'mpi_rank =', mpi_rank209 WRITE( *,*) 'mpi_size =', mpi_size210 WRITE( *,*) 'mpi_root =', mpi_root211 WRITE( *,*) 'is_mpi_root =', is_mpi_root212 WRITE( *,*) 'is_north_pole =', is_north_pole213 WRITE( *,*) 'is_south_pole =', is_south_pole214 WRITE( *,*) 'COMM_LMDZ_PHY =', COMM_LMDZ_PHY191 INCLUDE "iniprint.h" 192 193 WRITE(lunout,*) 'ii_begin =', ii_begin 194 WRITE(lunout,*) 'ii_end =', ii_end 195 WRITE(lunout,*) 'jj_begin =',jj_begin 196 WRITE(lunout,*) 'jj_end =', jj_end 197 WRITE(lunout,*) 'jj_nb =', jj_nb 198 WRITE(lunout,*) 'ij_begin =', ij_begin 199 WRITE(lunout,*) 'ij_end =', ij_end 200 WRITE(lunout,*) 'ij_nb =', ij_nb 201 WRITE(lunout,*) 'klon_mpi_begin =', klon_mpi_begin 202 WRITE(lunout,*) 'klon_mpi_end =', klon_mpi_end 203 WRITE(lunout,*) 'klon_mpi =', klon_mpi 204 WRITE(lunout,*) 'jj_para_nb =', jj_para_nb 205 WRITE(lunout,*) 'jj_para_begin =', jj_para_begin 206 WRITE(lunout,*) 'jj_para_end =', jj_para_end 207 WRITE(lunout,*) 'ii_para_begin =', ii_para_begin 208 WRITE(lunout,*) 'ii_para_end =', ii_para_end 209 WRITE(lunout,*) 'ij_para_nb =', ij_para_nb 210 WRITE(lunout,*) 'ij_para_begin =', ij_para_begin 211 WRITE(lunout,*) 'ij_para_end =', ij_para_end 212 WRITE(lunout,*) 'klon_mpi_para_nb =', klon_mpi_para_nb 213 WRITE(lunout,*) 'klon_mpi_para_begin =', klon_mpi_para_begin 214 WRITE(lunout,*) 'klon_mpi_para_end =', klon_mpi_para_end 215 WRITE(lunout,*) 'mpi_rank =', mpi_rank 216 WRITE(lunout,*) 'mpi_size =', mpi_size 217 WRITE(lunout,*) 'mpi_master =', mpi_master 218 WRITE(lunout,*) 'is_mpi_root =', is_mpi_root 219 WRITE(lunout,*) 'is_north_pole =', is_north_pole 220 WRITE(lunout,*) 'is_south_pole =', is_south_pole 221 WRITE(lunout,*) 'COMM_LMDZ_PHY =', COMM_LMDZ_PHY 215 222 216 223 END SUBROUTINE print_module_data -
trunk/LMDZ.GENERIC/libf/phy_common/mod_phys_lmdz_mpi_transfert.F90
r1521 r1543 9 9 bcast_mpi_i,bcast_mpi_i1,bcast_mpi_i2,bcast_mpi_i3,bcast_mpi_i4, & 10 10 bcast_mpi_r,bcast_mpi_r1,bcast_mpi_r2,bcast_mpi_r3,bcast_mpi_r4, & 11 11 bcast_mpi_l,bcast_mpi_l1,bcast_mpi_l2,bcast_mpi_l3,bcast_mpi_l4 12 12 END INTERFACE 13 13 … … 15 15 MODULE PROCEDURE scatter_mpi_i,scatter_mpi_i1,scatter_mpi_i2,scatter_mpi_i3, & 16 16 scatter_mpi_r,scatter_mpi_r1,scatter_mpi_r2,scatter_mpi_r3, & 17 17 scatter_mpi_l,scatter_mpi_l1,scatter_mpi_l2,scatter_mpi_l3 18 18 END INTERFACE 19 19 … … 22 22 MODULE PROCEDURE gather_mpi_i,gather_mpi_i1,gather_mpi_i2,gather_mpi_i3, & 23 23 gather_mpi_r,gather_mpi_r1,gather_mpi_r2,gather_mpi_r3, & 24 24 gather_mpi_l,gather_mpi_l1,gather_mpi_l2,gather_mpi_l3 25 25 END INTERFACE 26 26 … … 28 28 MODULE PROCEDURE scatter2D_mpi_i,scatter2D_mpi_i1,scatter2D_mpi_i2,scatter2D_mpi_i3, & 29 29 scatter2D_mpi_r,scatter2D_mpi_r1,scatter2D_mpi_r2,scatter2D_mpi_r3, & 30 30 scatter2D_mpi_l,scatter2D_mpi_l1,scatter2D_mpi_l2,scatter2D_mpi_l3 31 31 END INTERFACE 32 32 … … 34 34 MODULE PROCEDURE gather2D_mpi_i,gather2D_mpi_i1,gather2D_mpi_i2,gather2D_mpi_i3, & 35 35 gather2D_mpi_r,gather2D_mpi_r1,gather2D_mpi_r2,gather2D_mpi_r3, & 36 36 gather2D_mpi_l,gather2D_mpi_l1,gather2D_mpi_l2,gather2D_mpi_l3 37 37 END INTERFACE 38 38 … … 45 45 MODULE PROCEDURE grid1dTo2d_mpi_i,grid1dTo2d_mpi_i1,grid1dTo2d_mpi_i2,grid1dTo2d_mpi_i3, & 46 46 grid1dTo2d_mpi_r,grid1dTo2d_mpi_r1,grid1dTo2d_mpi_r2,grid1dTo2d_mpi_r3, & 47 47 grid1dTo2d_mpi_l,grid1dTo2d_mpi_l1,grid1dTo2d_mpi_l2,grid1dTo2d_mpi_l3 48 48 END INTERFACE 49 49 … … 51 51 MODULE PROCEDURE grid2dTo1d_mpi_i,grid2dTo1d_mpi_i1,grid2dTo1d_mpi_i2,grid2dTo1d_mpi_i3, & 52 52 grid2dTo1d_mpi_r,grid2dTo1d_mpi_r1,grid2dTo1d_mpi_r2,grid2dTo1d_mpi_r3, & 53 53 grid2dTo1d_mpi_l,grid2dTo1d_mpi_l1,grid2dTo1d_mpi_l2,grid2dTo1d_mpi_l3 54 54 END INTERFACE 55 55 … … 514 514 515 515 SUBROUTINE scatter2D_mpi_i(VarIn, VarOut) 516 USE mod_grid_phy_lmdz , only: klon_glo, grid2dTo1d_glo516 USE mod_grid_phy_lmdz 517 517 IMPLICIT NONE 518 518 … … 528 528 529 529 SUBROUTINE scatter2D_mpi_i1(VarIn, VarOut) 530 USE mod_grid_phy_lmdz , only: klon_glo, grid2dTo1d_glo530 USE mod_grid_phy_lmdz 531 531 IMPLICIT NONE 532 532 … … 541 541 542 542 SUBROUTINE scatter2D_mpi_i2(VarIn, VarOut) 543 USE mod_grid_phy_lmdz , only: klon_glo, grid2dTo1d_glo543 USE mod_grid_phy_lmdz 544 544 IMPLICIT NONE 545 545 … … 555 555 556 556 SUBROUTINE scatter2D_mpi_i3(VarIn, VarOut) 557 USE mod_grid_phy_lmdz , only: klon_glo, grid2dTo1d_glo557 USE mod_grid_phy_lmdz 558 558 IMPLICIT NONE 559 559 … … 570 570 571 571 SUBROUTINE scatter2D_mpi_r(VarIn, VarOut) 572 USE mod_grid_phy_lmdz , only: klon_glo, grid2dTo1d_glo572 USE mod_grid_phy_lmdz 573 573 IMPLICIT NONE 574 574 … … 585 585 586 586 SUBROUTINE scatter2D_mpi_r1(VarIn, VarOut) 587 USE mod_grid_phy_lmdz , only: klon_glo, grid2dTo1d_glo587 USE mod_grid_phy_lmdz 588 588 IMPLICIT NONE 589 589 REAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn … … 599 599 600 600 SUBROUTINE scatter2D_mpi_r2(VarIn, VarOut) 601 USE mod_grid_phy_lmdz , only: klon_glo, grid2dTo1d_glo601 USE mod_grid_phy_lmdz 602 602 IMPLICIT NONE 603 603 … … 613 613 614 614 SUBROUTINE scatter2D_mpi_r3(VarIn, VarOut) 615 USE mod_grid_phy_lmdz , only: klon_glo, grid2dTo1d_glo615 USE mod_grid_phy_lmdz 616 616 IMPLICIT NONE 617 617 … … 628 628 629 629 SUBROUTINE scatter2D_mpi_l(VarIn, VarOut) 630 USE mod_grid_phy_lmdz , only: klon_glo, grid2dTo1d_glo630 USE mod_grid_phy_lmdz 631 631 IMPLICIT NONE 632 632 … … 643 643 644 644 SUBROUTINE scatter2D_mpi_l1(VarIn, VarOut) 645 USE mod_grid_phy_lmdz , only: klon_glo, grid2dTo1d_glo645 USE mod_grid_phy_lmdz 646 646 IMPLICIT NONE 647 647 … … 658 658 659 659 SUBROUTINE scatter2D_mpi_l2(VarIn, VarOut) 660 USE mod_grid_phy_lmdz , only: klon_glo, grid2dTo1d_glo660 USE mod_grid_phy_lmdz 661 661 IMPLICIT NONE 662 662 … … 672 672 673 673 SUBROUTINE scatter2D_mpi_l3(VarIn, VarOut) 674 USE mod_grid_phy_lmdz , only: klon_glo, grid2dTo1d_glo674 USE mod_grid_phy_lmdz 675 675 IMPLICIT NONE 676 676 … … 691 691 692 692 SUBROUTINE gather2D_mpi_i(VarIn, VarOut) 693 USE mod_grid_phy_lmdz , only: klon_glo, grid1dTo2d_glo693 USE mod_grid_phy_lmdz 694 694 IMPLICIT NONE 695 695 … … 705 705 706 706 SUBROUTINE gather2D_mpi_i1(VarIn, VarOut) 707 USE mod_grid_phy_lmdz , only: klon_glo, grid1dTo2d_glo707 USE mod_grid_phy_lmdz 708 708 IMPLICIT NONE 709 709 … … 719 719 720 720 SUBROUTINE gather2D_mpi_i2(VarIn, VarOut) 721 USE mod_grid_phy_lmdz , only: klon_glo, grid1dTo2d_glo721 USE mod_grid_phy_lmdz 722 722 IMPLICIT NONE 723 723 … … 733 733 734 734 SUBROUTINE gather2D_mpi_i3(VarIn, VarOut) 735 USE mod_grid_phy_lmdz , only: klon_glo, grid1dTo2d_glo735 USE mod_grid_phy_lmdz 736 736 IMPLICIT NONE 737 737 … … 749 749 750 750 SUBROUTINE gather2D_mpi_r(VarIn, VarOut) 751 USE mod_grid_phy_lmdz , only: klon_glo, grid1dTo2d_glo751 USE mod_grid_phy_lmdz 752 752 IMPLICIT NONE 753 753 … … 763 763 764 764 SUBROUTINE gather2D_mpi_r1(VarIn, VarOut) 765 USE mod_grid_phy_lmdz , only: klon_glo, grid1dTo2d_glo765 USE mod_grid_phy_lmdz 766 766 IMPLICIT NONE 767 767 … … 777 777 778 778 SUBROUTINE gather2D_mpi_r2(VarIn, VarOut) 779 USE mod_grid_phy_lmdz , only: klon_glo, grid1dTo2d_glo779 USE mod_grid_phy_lmdz 780 780 IMPLICIT NONE 781 781 … … 791 791 792 792 SUBROUTINE gather2D_mpi_r3(VarIn, VarOut) 793 USE mod_grid_phy_lmdz , only: klon_glo, grid1dTo2d_glo793 USE mod_grid_phy_lmdz 794 794 IMPLICIT NONE 795 795 … … 807 807 808 808 SUBROUTINE gather2D_mpi_l(VarIn, VarOut) 809 USE mod_grid_phy_lmdz , only: klon_glo, grid1dTo2d_glo809 USE mod_grid_phy_lmdz 810 810 IMPLICIT NONE 811 811 … … 821 821 822 822 SUBROUTINE gather2D_mpi_l1(VarIn, VarOut) 823 USE mod_grid_phy_lmdz , only: klon_glo, grid1dTo2d_glo823 USE mod_grid_phy_lmdz 824 824 IMPLICIT NONE 825 825 … … 835 835 836 836 SUBROUTINE gather2D_mpi_l2(VarIn, VarOut) 837 USE mod_grid_phy_lmdz , only: klon_glo, grid1dTo2d_glo837 USE mod_grid_phy_lmdz 838 838 IMPLICIT NONE 839 839 … … 849 849 850 850 SUBROUTINE gather2D_mpi_l3(VarIn, VarOut) 851 USE mod_grid_phy_lmdz , only: klon_glo, grid1dTo2d_glo851 USE mod_grid_phy_lmdz 852 852 IMPLICIT NONE 853 853 … … 1236 1236 1237 1237 SUBROUTINE bcast_mpi_cgen(var,nb) 1238 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1238 USE mod_phys_lmdz_mpi_data 1239 1239 IMPLICIT NONE 1240 1240 … … 1250 1250 1251 1251 #ifdef CPP_MPI 1252 CALL MPI_BCAST(Var,nb,MPI_CHARACTER,mpi_ root_x,COMM_LMDZ_PHY,ierr)1252 CALL MPI_BCAST(Var,nb,MPI_CHARACTER,mpi_master,COMM_LMDZ_PHY,ierr) 1253 1253 #endif 1254 1254 … … 1258 1258 1259 1259 SUBROUTINE bcast_mpi_igen(var,nb) 1260 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root 1261 IMPLICIT NONE 1262 1260 USE mod_phys_lmdz_mpi_data 1261 IMPLICIT NONE 1262 1263 INTEGER,INTENT(IN) :: nb 1263 1264 INTEGER,DIMENSION(nb),INTENT(INOUT) :: Var 1264 INTEGER,INTENT(IN) :: nb1265 1265 1266 1266 #ifdef CPP_MPI … … 1272 1272 1273 1273 #ifdef CPP_MPI 1274 CALL MPI_BCAST(Var,nb,MPI_INTEGER,mpi_ root_x,COMM_LMDZ_PHY,ierr)1274 CALL MPI_BCAST(Var,nb,MPI_INTEGER,mpi_master,COMM_LMDZ_PHY,ierr) 1275 1275 #endif 1276 1276 … … 1281 1281 1282 1282 SUBROUTINE bcast_mpi_rgen(var,nb) 1283 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root 1284 IMPLICIT NONE 1285 1283 USE mod_phys_lmdz_mpi_data 1284 IMPLICIT NONE 1285 1286 INTEGER,INTENT(IN) :: nb 1286 1287 REAL,DIMENSION(nb),INTENT(INOUT) :: Var 1288 1289 #ifdef CPP_MPI 1290 INCLUDE 'mpif.h' 1291 #endif 1292 INTEGER :: ierr 1293 1294 IF (.not.is_using_mpi) RETURN 1295 1296 #ifdef CPP_MPI 1297 CALL MPI_BCAST(Var,nb,MPI_REAL_LMDZ,mpi_master,COMM_LMDZ_PHY,ierr) 1298 #endif 1299 1300 END SUBROUTINE bcast_mpi_rgen 1301 1302 1303 1304 1305 SUBROUTINE bcast_mpi_lgen(var,nb) 1306 USE mod_phys_lmdz_mpi_data 1307 IMPLICIT NONE 1308 1287 1309 INTEGER,INTENT(IN) :: nb 1310 LOGICAL,DIMENSION(nb),INTENT(INOUT) :: Var 1288 1311 1289 1312 #ifdef CPP_MPI … … 1295 1318 1296 1319 #ifdef CPP_MPI 1297 CALL MPI_BCAST(Var,nb,MPI_REAL_LMDZ,mpi_root_x,COMM_LMDZ_PHY,ierr) 1298 #endif 1299 1300 END SUBROUTINE bcast_mpi_rgen 1301 1302 1303 1304 1305 SUBROUTINE bcast_mpi_lgen(var,nb) 1306 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root 1307 IMPLICIT NONE 1308 1309 LOGICAL,DIMENSION(nb),INTENT(INOUT) :: Var 1310 INTEGER,INTENT(IN) :: nb 1311 1312 #ifdef CPP_MPI 1313 INCLUDE 'mpif.h' 1314 #endif 1315 INTEGER :: ierr 1316 1317 IF (.not.is_using_mpi) RETURN 1318 1319 #ifdef CPP_MPI 1320 CALL MPI_BCAST(Var,nb,MPI_LOGICAL,mpi_root_x,COMM_LMDZ_PHY,ierr) 1321 if (ierr.ne.MPI_SUCCESS) then 1322 write(*,*) "bcast_mpi error: ierr=",ierr 1323 stop 1324 endif 1320 CALL MPI_BCAST(Var,nb,MPI_LOGICAL,mpi_master,COMM_LMDZ_PHY,ierr) 1325 1321 #endif 1326 1322 … … 1330 1326 1331 1327 SUBROUTINE scatter_mpi_igen(VarIn, VarOut, dimsize) 1332 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1328 USE mod_phys_lmdz_mpi_data 1333 1329 USE mod_grid_phy_lmdz 1334 1330 IMPLICIT NONE … … 1369 1365 #ifdef CPP_MPI 1370 1366 CALL MPI_SCATTERV(VarTmp,counts,displs,MPI_INTEGER,VarOut,klon_mpi*dimsize, & 1371 MPI_INTEGER,mpi_ root_x, COMM_LMDZ_PHY,ierr)1367 MPI_INTEGER,mpi_master, COMM_LMDZ_PHY,ierr) 1372 1368 #endif 1373 1369 … … 1375 1371 1376 1372 SUBROUTINE scatter_mpi_rgen(VarIn, VarOut, dimsize) 1377 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1373 USE mod_phys_lmdz_mpi_data 1378 1374 USE mod_grid_phy_lmdz 1379 1375 IMPLICIT NONE … … 1413 1409 #ifdef CPP_MPI 1414 1410 CALL MPI_SCATTERV(VarTmp,counts,displs,MPI_REAL_LMDZ,VarOut,klon_mpi*dimsize, & 1415 MPI_REAL_LMDZ,mpi_ root_x, COMM_LMDZ_PHY,ierr)1411 MPI_REAL_LMDZ,mpi_master, COMM_LMDZ_PHY,ierr) 1416 1412 1417 1413 #endif … … 1421 1417 1422 1418 SUBROUTINE scatter_mpi_lgen(VarIn, VarOut, dimsize) 1423 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1419 USE mod_phys_lmdz_mpi_data 1424 1420 USE mod_grid_phy_lmdz 1425 1421 IMPLICIT NONE … … 1459 1455 #ifdef CPP_MPI 1460 1456 CALL MPI_SCATTERV(VarTmp,counts,displs,MPI_LOGICAL,VarOut,klon_mpi*dimsize, & 1461 MPI_LOGICAL,mpi_ root_x, COMM_LMDZ_PHY,ierr)1457 MPI_LOGICAL,mpi_master, COMM_LMDZ_PHY,ierr) 1462 1458 #endif 1463 1459 … … 1468 1464 1469 1465 SUBROUTINE gather_mpi_igen(VarIn, VarOut, dimsize) 1470 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1466 USE mod_phys_lmdz_mpi_data 1471 1467 USE mod_grid_phy_lmdz 1472 1468 IMPLICIT NONE … … 1497 1493 displs(rank)=Index-1 1498 1494 counts(rank)=nb*dimsize 1499 1495 Index=Index+nb*dimsize 1500 1496 ENDDO 1501 1497 … … 1504 1500 #ifdef CPP_MPI 1505 1501 CALL MPI_GATHERV(VarIn,klon_mpi*dimsize,MPI_INTEGER,VarTmp,counts,displs, & 1506 MPI_INTEGER,mpi_ root_x, COMM_LMDZ_PHY,ierr)1507 #endif 1508 1509 1502 MPI_INTEGER,mpi_master, COMM_LMDZ_PHY,ierr) 1503 #endif 1504 1505 1510 1506 IF (is_mpi_root) THEN 1511 1507 Index=1 … … 1514 1510 DO i=1,dimsize 1515 1511 VarOut(klon_mpi_para_begin(rank):klon_mpi_para_end(rank),i)=VarTmp(Index:Index+nb-1) 1516 1512 Index=Index+nb 1517 1513 ENDDO 1518 1514 ENDDO … … 1522 1518 1523 1519 SUBROUTINE gather_mpi_rgen(VarIn, VarOut, dimsize) 1524 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1520 USE mod_phys_lmdz_mpi_data 1525 1521 USE mod_grid_phy_lmdz 1526 1522 IMPLICIT NONE … … 1546 1542 displs(rank)=Index-1 1547 1543 counts(rank)=nb*dimsize 1548 1544 Index=Index+nb*dimsize 1549 1545 ENDDO 1550 1546 ENDIF … … 1557 1553 #ifdef CPP_MPI 1558 1554 CALL MPI_GATHERV(VarIn,klon_mpi*dimsize,MPI_REAL_LMDZ,VarTmp,counts,displs, & 1559 MPI_REAL_LMDZ,mpi_ root_x, COMM_LMDZ_PHY,ierr)1560 #endif 1561 1555 MPI_REAL_LMDZ,mpi_master, COMM_LMDZ_PHY,ierr) 1556 #endif 1557 1562 1558 IF (is_mpi_root) THEN 1563 1559 Index=1 … … 1566 1562 DO i=1,dimsize 1567 1563 VarOut(klon_mpi_para_begin(rank):klon_mpi_para_end(rank),i)=VarTmp(Index:Index+nb-1) 1568 1564 Index=Index+nb 1569 1565 ENDDO 1570 1566 ENDDO … … 1574 1570 1575 1571 SUBROUTINE gather_mpi_lgen(VarIn, VarOut, dimsize) 1576 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1572 USE mod_phys_lmdz_mpi_data 1577 1573 USE mod_grid_phy_lmdz 1578 1574 IMPLICIT NONE … … 1603 1599 displs(rank)=Index-1 1604 1600 counts(rank)=nb*dimsize 1605 1601 Index=Index+nb*dimsize 1606 1602 ENDDO 1607 1603 ENDIF … … 1610 1606 #ifdef CPP_MPI 1611 1607 CALL MPI_GATHERV(VarIn,klon_mpi*dimsize,MPI_LOGICAL,VarTmp,counts,displs, & 1612 MPI_LOGICAL,mpi_ root_x, COMM_LMDZ_PHY,ierr)1613 #endif 1614 1608 MPI_LOGICAL,mpi_master, COMM_LMDZ_PHY,ierr) 1609 #endif 1610 1615 1611 IF (is_mpi_root) THEN 1616 1612 Index=1 … … 1619 1615 DO i=1,dimsize 1620 1616 VarOut(klon_mpi_para_begin(rank):klon_mpi_para_end(rank),i)=VarTmp(Index:Index+nb-1) 1621 1617 Index=Index+nb 1622 1618 ENDDO 1623 1619 ENDDO … … 1629 1625 1630 1626 SUBROUTINE reduce_sum_mpi_igen(VarIn,VarOut,nb) 1631 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1627 USE mod_phys_lmdz_mpi_data 1632 1628 USE mod_grid_phy_lmdz 1633 1629 IMPLICIT NONE … … 1637 1633 #endif 1638 1634 1635 INTEGER,INTENT(IN) :: nb 1639 1636 INTEGER,DIMENSION(nb),INTENT(IN) :: VarIn 1640 1637 INTEGER,DIMENSION(nb),INTENT(OUT) :: VarOut 1641 INTEGER,INTENT(IN) :: nb1642 1638 INTEGER :: ierr 1643 1639 … … 1649 1645 1650 1646 #ifdef CPP_MPI 1651 CALL MPI_REDUCE(VarIn,VarOut,nb,MPI_INTEGER,MPI_SUM,mpi_ root_x,COMM_LMDZ_PHY,ierr)1647 CALL MPI_REDUCE(VarIn,VarOut,nb,MPI_INTEGER,MPI_SUM,mpi_master,COMM_LMDZ_PHY,ierr) 1652 1648 #endif 1653 1649 … … 1655 1651 1656 1652 SUBROUTINE reduce_sum_mpi_rgen(VarIn,VarOut,nb) 1657 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1653 USE mod_phys_lmdz_mpi_data 1658 1654 USE mod_grid_phy_lmdz 1659 1655 … … 1664 1660 #endif 1665 1661 1662 INTEGER,INTENT(IN) :: nb 1666 1663 REAL,DIMENSION(nb),INTENT(IN) :: VarIn 1667 1664 REAL,DIMENSION(nb),INTENT(OUT) :: VarOut 1668 INTEGER,INTENT(IN) :: nb1669 1665 INTEGER :: ierr 1670 1666 … … 1675 1671 1676 1672 #ifdef CPP_MPI 1677 CALL MPI_REDUCE(VarIn,VarOut,nb,MPI_REAL_LMDZ,MPI_SUM,mpi_ root_x,COMM_LMDZ_PHY,ierr)1673 CALL MPI_REDUCE(VarIn,VarOut,nb,MPI_REAL_LMDZ,MPI_SUM,mpi_master,COMM_LMDZ_PHY,ierr) 1678 1674 #endif 1679 1675 … … 1711 1707 DO ij=1,nbp_lon 1712 1708 VarOut(ij,i)=VarIn(1,i) 1713 1709 ENDDO 1714 1710 ENDDO 1715 1711 ENDIF … … 1719 1715 DO ij=nbp_lon*(jj_nb-1)+1,nbp_lon*jj_nb 1720 1716 VarOut(ij,i)=VarIn(klon_mpi,i) 1721 1717 ENDDO 1722 1718 ENDDO 1723 1719 ENDIF … … 1755 1751 DO ij=1,nbp_lon 1756 1752 VarOut(ij,i)=VarIn(1,i) 1757 1753 ENDDO 1758 1754 ENDDO 1759 1755 ENDIF … … 1763 1759 DO ij=nbp_lon*(jj_nb-1)+1,nbp_lon*jj_nb 1764 1760 VarOut(ij,i)=VarIn(klon_mpi,i) 1765 1761 ENDDO 1766 1762 ENDDO 1767 1763 ENDIF … … 1800 1796 DO ij=1,nbp_lon 1801 1797 VarOut(ij,i)=VarIn(1,i) 1802 1798 ENDDO 1803 1799 ENDDO 1804 1800 ENDIF … … 1808 1804 DO ij=nbp_lon*(jj_nb-1)+1,nbp_lon*jj_nb 1809 1805 VarOut(ij,i)=VarIn(klon_mpi,i) 1810 1806 ENDDO 1811 1807 ENDDO 1812 1808 ENDIF … … 1905 1901 1906 1902 END MODULE mod_phys_lmdz_mpi_transfert 1903 -
trunk/LMDZ.GENERIC/libf/phy_common/mod_phys_lmdz_omp_data.F90
r1521 r1543 1 1 ! 2 !$Id: mod_phys_lmdz_omp_data.F90 1575 2011-09-21 13:57:48Z jghattas$2 !$Id: mod_phys_lmdz_omp_data.F90 2326 2015-07-10 12:24:29Z emillour $ 3 3 ! 4 4 MODULE mod_phys_lmdz_omp_data … … 91 91 SUBROUTINE Print_module_data 92 92 IMPLICIT NONE 93 !INCLUDE "iniprint.h"93 INCLUDE "iniprint.h" 94 94 95 95 !$OMP CRITICAL 96 WRITE( *,*)'--------> TASK ',omp_rank97 WRITE( *,*)'omp_size =',omp_size98 WRITE( *,*)'omp_rank =',omp_rank99 WRITE( *,*)'is_omp_root =',is_omp_root100 WRITE( *,*)'klon_omp_para_nb =',klon_omp_para_nb101 WRITE( *,*)'klon_omp_para_begin =',klon_omp_para_begin102 WRITE( *,*)'klon_omp_para_end =',klon_omp_para_end103 WRITE( *,*)'klon_omp =',klon_omp104 WRITE( *,*)'klon_omp_begin =',klon_omp_begin105 WRITE( *,*)'klon_omp_end =',klon_omp_end96 WRITE(lunout,*)'--------> TASK ',omp_rank 97 WRITE(lunout,*)'omp_size =',omp_size 98 WRITE(lunout,*)'omp_rank =',omp_rank 99 WRITE(lunout,*)'is_omp_root =',is_omp_root 100 WRITE(lunout,*)'klon_omp_para_nb =',klon_omp_para_nb 101 WRITE(lunout,*)'klon_omp_para_begin =',klon_omp_para_begin 102 WRITE(lunout,*)'klon_omp_para_end =',klon_omp_para_end 103 WRITE(lunout,*)'klon_omp =',klon_omp 104 WRITE(lunout,*)'klon_omp_begin =',klon_omp_begin 105 WRITE(lunout,*)'klon_omp_end =',klon_omp_end 106 106 !$OMP END CRITICAL 107 107 -
trunk/LMDZ.GENERIC/libf/phy_common/mod_phys_lmdz_omp_transfert.F90
r1521 r1543 25 25 bcast_omp_i,bcast_omp_i1,bcast_omp_i2,bcast_omp_i3,bcast_omp_i4, & 26 26 bcast_omp_r,bcast_omp_r1,bcast_omp_r2,bcast_omp_r3,bcast_omp_r4, & 27 27 bcast_omp_l,bcast_omp_l1,bcast_omp_l2,bcast_omp_l3,bcast_omp_l4 28 28 END INTERFACE 29 29 … … 31 31 MODULE PROCEDURE scatter_omp_i,scatter_omp_i1,scatter_omp_i2,scatter_omp_i3, & 32 32 scatter_omp_r,scatter_omp_r1,scatter_omp_r2,scatter_omp_r3, & 33 33 scatter_omp_l,scatter_omp_l1,scatter_omp_l2,scatter_omp_l3 34 34 END INTERFACE 35 35 … … 38 38 MODULE PROCEDURE gather_omp_i,gather_omp_i1,gather_omp_i2,gather_omp_i3, & 39 39 gather_omp_r,gather_omp_r1,gather_omp_r2,gather_omp_r3, & 40 40 gather_omp_l,gather_omp_l1,gather_omp_l2,gather_omp_l3 41 41 END INTERFACE 42 42 … … 48 48 49 49 50 PUBLIC bcast_omp,scatter_omp,gather_omp,reduce_sum_omp 50 PUBLIC bcast_omp,scatter_omp,gather_omp,reduce_sum_omp, omp_barrier 51 51 52 52 CONTAINS 53 53 54 SUBROUTINE omp_barrier 55 IMPLICIT NONE 56 57 !$OMP BARRIER 58 59 END SUBROUTINE omp_barrier 60 54 61 SUBROUTINE check_buffer_i(buff_size) 55 62 IMPLICIT NONE … … 733 740 IMPLICIT NONE 734 741 742 INTEGER,INTENT(IN) :: Nb 735 743 INTEGER,DIMENSION(Nb),INTENT(INOUT) :: Var 736 744 INTEGER,DIMENSION(Nb),INTENT(INOUT) :: Buff 737 INTEGER,INTENT(IN) :: Nb738 745 739 746 INTEGER :: i … … 757 764 IMPLICIT NONE 758 765 766 INTEGER,INTENT(IN) :: Nb 759 767 REAL,DIMENSION(Nb),INTENT(INOUT) :: Var 760 768 REAL,DIMENSION(Nb),INTENT(INOUT) :: Buff 761 INTEGER,INTENT(IN) :: Nb762 769 763 770 INTEGER :: i … … 780 787 IMPLICIT NONE 781 788 789 INTEGER,INTENT(IN) :: Nb 782 790 LOGICAL,DIMENSION(Nb),INTENT(INOUT) :: Var 783 791 LOGICAL,DIMENSION(Nb),INTENT(INOUT) :: Buff 784 INTEGER,INTENT(IN) :: Nb785 792 786 793 INTEGER :: i … … 802 809 803 810 SUBROUTINE scatter_omp_igen(VarIn,VarOut,dimsize,Buff) 804 USE mod_phys_lmdz_omp_data , only: klon_omp, klon_omp_begin811 USE mod_phys_lmdz_omp_data 805 812 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi 806 813 IMPLICIT NONE … … 833 840 834 841 SUBROUTINE scatter_omp_rgen(VarIn,VarOut,dimsize,Buff) 835 USE mod_phys_lmdz_omp_data , only: klon_omp, klon_omp_begin842 USE mod_phys_lmdz_omp_data 836 843 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi 837 844 IMPLICIT NONE … … 864 871 865 872 SUBROUTINE scatter_omp_lgen(VarIn,VarOut,dimsize,Buff) 866 USE mod_phys_lmdz_omp_data , only: klon_omp, klon_omp_begin873 USE mod_phys_lmdz_omp_data 867 874 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi 868 875 IMPLICIT NONE … … 898 905 899 906 SUBROUTINE gather_omp_igen(VarIn,VarOut,dimsize,Buff) 900 USE mod_phys_lmdz_omp_data , only: klon_omp, klon_omp_begin907 USE mod_phys_lmdz_omp_data 901 908 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi 902 909 IMPLICIT NONE … … 930 937 931 938 SUBROUTINE gather_omp_rgen(VarIn,VarOut,dimsize,Buff) 932 USE mod_phys_lmdz_omp_data , only: klon_omp, klon_omp_begin939 USE mod_phys_lmdz_omp_data 933 940 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi 934 941 IMPLICIT NONE … … 962 969 963 970 SUBROUTINE gather_omp_lgen(VarIn,VarOut,dimsize,Buff) 964 USE mod_phys_lmdz_omp_data , only: klon_omp, klon_omp_begin971 USE mod_phys_lmdz_omp_data 965 972 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi 966 973 IMPLICIT NONE -
trunk/LMDZ.GENERIC/libf/phy_common/mod_phys_lmdz_para.F90
r1521 r1543 13 13 14 14 !$OMP THREADPRIVATE(klon_loc,is_master) 15 !$OMP THREADPRIVATE(is_sequential,is_parallel)16 15 17 16 CONTAINS 18 17 19 SUBROUTINE Init_phys_lmdz_para( iim,jjp1,nb_proc,distrib)18 SUBROUTINE Init_phys_lmdz_para(nbp,nbp_lon,nbp_lat,communicator) 20 19 IMPLICIT NONE 21 INTEGER,INTENT(in) :: iim22 INTEGER,INTENT(in) :: jjp123 INTEGER,INTENT(in) :: nb _proc24 INTEGER,INTENT(in) :: distrib(0:nb_proc-1)20 INTEGER,INTENT(in) :: nbp 21 INTEGER,INTENT(in) :: nbp_lon 22 INTEGER,INTENT(in) :: nbp_lat 23 INTEGER,INTENT(in) :: communicator 25 24 26 CALL Init_phys_lmdz_mpi_data( iim,jjp1,nb_proc,distrib)25 CALL Init_phys_lmdz_mpi_data(nbp,nbp_lon,nbp_lat,communicator) 27 26 !$OMP PARALLEL 28 27 CALL Init_phys_lmdz_omp_data(klon_mpi) … … 46 45 47 46 SUBROUTINE Test_transfert 48 USE mod_grid_phy_lmdz, only: klon_glo, nbp_lev, nbp_lon, nbp_lat, & 49 grid1dTo2d_glo, grid2dTo1d_glo 47 USE mod_grid_phy_lmdz 50 48 IMPLICIT NONE 51 !INCLUDE "iniprint.h"49 INCLUDE "iniprint.h" 52 50 53 51 REAL :: Test_Field1d_glo(klon_glo,nbp_lev) … … 83 81 !$OMP MASTER 84 82 Checksum=sum(Test_Field1d_glo-tmp1d_glo) 85 WRITE( *,*) "------> Checksum =",Checksum," MUST BE 0"83 WRITE(lunout,*) "------> Checksum =",Checksum," MUST BE 0" 86 84 !$OMP END MASTER 87 85 ENDIF … … 95 93 !$OMP MASTER 96 94 Checksum=sum(Test_Field1d_glo-tmp1d_glo) 97 WRITE( *,*) "------> Checksum =",Checksum," MUST BE 0"95 WRITE(lunout,*) "------> Checksum =",Checksum," MUST BE 0" 98 96 !$OMP END MASTER 99 97 ENDIF … … 105 103 !$OMP MASTER 106 104 Checksum=sum(Test_Field1d_glo*omp_size*mpi_size-tmp1d_glo) 107 WRITE( *,*) "------> Checksum =",Checksum," MUST BE 0"105 WRITE(lunout,*) "------> Checksum =",Checksum," MUST BE 0" 108 106 !$OMP END MASTER 109 107 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.