Changeset 774 for LMDZ4/trunk
- Timestamp:
- Jun 5, 2007, 4:55:21 PM (17 years ago)
- Location:
- LMDZ4/trunk/libf/dyn3dpar
- Files:
-
- 2 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk/libf/dyn3dpar/addfi_p.F
r764 r774 1 ! 2 ! $Header$ 3 ! 1 4 SUBROUTINE addfi_p(nq, pdt, leapf, forward, 2 5 S pucov, pvcov, pteta, pq , pps , -
LMDZ4/trunk/libf/dyn3dpar/advect_new_p.F
r763 r774 1 ! 2 ! $Header$ 3 ! 1 4 SUBROUTINE advect_new_p(ucov,vcov,teta,w,massebx,masseby, 2 5 & du,dv,dteta) -
LMDZ4/trunk/libf/dyn3dpar/advect_p.F
r630 r774 1 ! 2 ! $Header$ 3 ! 1 4 SUBROUTINE advect_p(ucov,vcov,teta,w,massebx,masseby,du,dv,dteta) 2 5 USE parallel -
LMDZ4/trunk/libf/dyn3dpar/bands.F90
r764 r774 11 11 INTEGER,dimension(:),allocatable :: jj_Nb_physic 12 12 INTEGER,dimension(:),allocatable :: jj_Nb_physic_bis 13 INTEGER,dimension(:),allocatable :: New_klon_para_nb13 INTEGER,dimension(:),allocatable :: distrib_phys 14 14 15 15 contains … … 25 25 allocate(jj_Nb_physic(0:MPI_Size-1)) 26 26 allocate(jj_Nb_physic_bis(0:MPI_Size-1)) 27 allocate( New_klon_para_nb(0:MPI_Size-1))27 allocate(distrib_phys(0:MPI_Size-1)) 28 28 29 29 end subroutine AllocateBands 30 30 31 subroutine InitBands31 subroutine Read_distrib 32 32 use parallel 33 use dimphy34 33 implicit none 35 34 36 #include "dimensions90.h"35 include "dimensions90.h" 37 36 !#include "paramet90.h" 38 37 integer :: i,j … … 67 66 68 67 do i=0,mpi_size-1 69 read (unit_number,*) j, klon_para_nb(i)68 read (unit_number,*) j,distrib_phys(i) 70 69 enddo 71 70 72 call InitDimphy73 71 CLOSE(unit_number) 74 72 … … 81 79 jj_nb_vanleer(:)=jj_nb_caldyn(:) 82 80 jj_nb_dissip(:)=jj_nb_caldyn(:) 81 82 do i=0,mpi_size-1 83 distrib_phys(i)=(iim*(jjm-1)+2)/mpi_size 84 IF (i<MOD(iim*(jjm-1)+2,mpi_size)) distrib_phys(i)=distrib_phys(i)+1 85 enddo 86 endif 87 88 end subroutine Read_distrib 83 89 84 endif 85 90 91 SUBROUTINE Set_Bands 92 USE parallel 93 USE mod_phys_lmdz_para, ONLY : jj_para_begin,jj_para_end 94 IMPLICIT NONE 95 INCLUDE 'dimensions90.h' 96 INTEGER :: i 97 86 98 do i=0,mpi_size-1 87 99 jj_nb_vanleer2(i)=(jjm+1)/mpi_size … … 90 102 91 103 do i=0,MPI_Size-1 92 jj_Nb_physic(i)=jj phy_para_end(i)-jjphy_para_begin(i)+1104 jj_Nb_physic(i)=jj_para_end(i)-jj_para_begin(i)+1 93 105 if (i/=0) then 94 if (jj phy_para_begin(i)==jjphy_para_end(i-1)) then106 if (jj_para_begin(i)==jj_para_end(i-1)) then 95 107 jj_Nb_physic(i-1)=jj_Nb_physic(i-1)-1 96 108 endif … … 99 111 100 112 do i=0,MPI_Size-1 101 jj_Nb_physic_bis(i)=jj phy_para_end(i)-jjphy_para_begin(i)+1113 jj_Nb_physic_bis(i)=jj_para_end(i)-jj_para_begin(i)+1 102 114 if (i/=0) then 103 if (jj phy_para_begin(i)==jjphy_para_end(i-1)) then115 if (jj_para_begin(i)==jj_para_end(i-1)) then 104 116 jj_Nb_physic_bis(i)=jj_Nb_physic_bis(i)-1 105 117 else … … 110 122 enddo 111 123 112 do i=0,MPI_Size-1 113 New_klon_para_nb(i)=klon_para_nb(i) 114 enddo 115 116 end subroutine InitBands 124 end subroutine Set_Bands 125 117 126 118 127 subroutine AdjustBands_caldyn 119 128 use times 129 use parallel 120 130 implicit none 121 131 … … 182 192 subroutine AdjustBands_vanleer 183 193 use times 194 use parallel 184 195 implicit none 185 196 … … 247 258 subroutine AdjustBands_dissip 248 259 use times 260 use parallel 249 261 implicit none 250 262 … … 312 324 subroutine AdjustBands_physic 313 325 use times 314 use dimphy 326 USE mod_phys_lmdz_para, only : klon_mpi_para_nb 327 USE parallel 315 328 implicit none 316 329 … … 336 349 NbTot=0 337 350 do i=0,mpi_size-1 338 Inc(i)=nint(klon_ para_nb(i)*(medium-value(i))/value(i))351 Inc(i)=nint(klon_mpi_para_nb(i)*(medium-value(i))/value(i)) 339 352 NbTot=NbTot+Inc(i) 340 353 enddo … … 355 368 356 369 do i=0,mpi_size-1 357 New_klon_para_nb(i)=klon_para_nb(i)+inc(i)370 distrib_phys(i)=klon_mpi_para_nb(i)+inc(i) 358 371 enddo 359 372 … … 363 376 USE parallel 364 377 implicit none 365 #include "dimensions90.h"378 include "dimensions90.h" 366 379 367 380 integer :: i,j … … 399 412 400 413 do i=0,mpi_size-1 401 write (unit_number,*) i, New_klon_para_nb(i)414 write (unit_number,*) i,distrib_phys(i) 402 415 enddo 403 416 -
LMDZ4/trunk/libf/dyn3dpar/calfis_p.F
r764 r774 36 36 c ......... 37 37 USE dimphy 38 USE parallel 38 USE mod_phys_lmdz_para, mpi_root_xx=>mpi_root 39 USE parallel, ONLY : omp_chunk 40 USE mod_interface_dyn_phys 39 41 USE Write_Field 40 42 Use Write_field_p … … 281 283 c$OMP MASTER 282 284 do ig0=1,klon 283 i= Liste_i(ig0)284 j= Liste_j(ig0)285 i=index_i(ig0) 286 j=index_j(ig0) 285 287 zpsrf(ig0)=pps(i,j) 286 288 enddo … … 303 305 DO l = 1, llmp1 304 306 do ig0=1,klon 305 i= Liste_i(ig0)306 j= Liste_j(ig0)307 i=index_i(ig0) 308 j=index_j(ig0) 307 309 zplev( ig0,l ) = pp(i,j,l) 308 310 enddo … … 318 320 319 321 do ig0=1,klon 320 i= Liste_i(ig0)321 j= Liste_j(ig0)322 i=index_i(ig0) 323 j=index_j(ig0) 322 324 pksurcp = ppk(i,j,l) / cpp 323 325 zplay(ig0,l) = preff * pksurcp ** unskap … … 338 340 DO l=1,llm 339 341 do ig0=1,klon 340 i= Liste_i(ig0)341 j= Liste_j(ig0)342 i=index_i(ig0) 343 j=index_j(ig0) 342 344 zqfi(ig0,l,iq) = pq(i,j,l,iiq) 343 345 enddo … … 352 354 DO l=1,llm 353 355 do ig0=1,klon 354 i= Liste_i(ig0)355 j= Liste_j(ig0)356 i=index_i(ig0) 357 j=index_j(ig0) 356 358 c pcvgq(ig0,l,iq) = pdq(i,j,l,iq) / pmasse(i,j,l) 357 359 enddo … … 384 386 DO l=1,llm 385 387 do ig0=1,klon 386 i= Liste_i(ig0)387 j= Liste_j(ig0)388 i=index_i(ig0) 389 j=index_j(ig0) 388 390 pvervel(ig0,l) = pw(i,j,l)*g* unsaire(i,j) 389 391 enddo 390 if ( pole_nord) pvervel(1,l)=pw(1,1,l)*g /apoln391 if ( pole_sud) pvervel(klon,l)=pw(1,jjp1,l)*g/apols392 if (is_north_pole) pvervel(1,l)=pw(1,1,l)*g /apoln 393 if (is_south_pole) pvervel(klon,l)=pw(1,jjp1,l)*g/apols 392 394 ENDDO 393 395 c$OMP END DO NOWAIT … … 400 402 kend=klon 401 403 402 if ( pole_nord) kstart=2403 if ( pole_sud) kend=klon-1404 if (is_north_pole) kstart=2 405 if (is_south_pole) kend=klon-1 404 406 405 407 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 406 408 DO l=1,llm 407 409 do ig0=kstart,kend 408 i= Liste_i(ig0)409 j= Liste_j(ig0)410 i=index_i(ig0) 411 j=index_j(ig0) 410 412 if (i==1) then 411 413 zufi(ig0,l)= 0.5 *( pucov(iim,j,l)/cu(iim,j) … … 427 429 DO l=1,llm 428 430 DO ig0=kstart,kend 429 i= Liste_i(ig0)430 j= Liste_j(ig0)431 i=index_i(ig0) 432 j=index_j(ig0) 431 433 zvfi(ig0,l)= 0.5 *( pvcov(i,j-1,l)/cv(i,j-1) 432 434 $ + pvcov(i,j,l)/cv(i,j) ) … … 443 445 c V = 1 / pi * integrale [ v * sin(long) * d long ] 444 446 445 if ( pole_nord) then447 if (is_north_pole) then 446 448 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 447 449 DO l=1,llm … … 476 478 c V = 1 / pi * integrale [ v * sin(long) * d long ] 477 479 478 if ( pole_sud) then480 if (is_south_pole) then 479 481 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 480 482 DO l=1,llm … … 504 506 505 507 506 IF ( monocpu) THEN508 IF (is_sequential) THEN 507 509 c 508 510 cIM calcul PV a teta=350, 380, 405K … … 535 537 c$OMP BARRIER 536 538 if (first_omp) then 537 klon=klon_omp _nb(omp_rank)539 klon=klon_omp 538 540 539 541 allocate(zplev_omp(klon,llm+1)) … … 556 558 557 559 558 klon=klon_omp _nb(omp_rank)559 offset=klon_omp_begin (omp_rank)-1560 klon=klon_omp 561 offset=klon_omp_begin-1 560 562 561 563 do l=1,llm+1 … … 577 579 enddo 578 580 579 580 581 do i=1,klon 581 582 zphis_omp(i)=zphis(offset+i) … … 840 841 zdvfi2(klon+1:klon+iim,l)=dv_recv(1:iim,l) 841 842 842 pdhfi(:,jj phy_begin,l)=0843 pdqfi(:,jj phy_begin,l,:)=0844 pdufi(:,jj phy_begin,l)=0845 pdvfi(:,jj phy_begin,l)=0843 pdhfi(:,jj_begin,l)=0 844 pdqfi(:,jj_begin,l,:)=0 845 pdufi(:,jj_begin,l)=0 846 pdvfi(:,jj_begin,l)=0 846 847 847 if (.not. pole_sud) then848 pdhfi(:,jj phy_end,l)=0849 pdqfi(:,jj phy_end,l,:)=0850 pdufi(:,jj phy_end,l)=0851 pdvfi(:,jj phy_end,l)=0848 if (.not. is_south_pole) then 849 pdhfi(:,jj_end,l)=0 850 pdqfi(:,jj_end,l,:)=0 851 pdufi(:,jj_end,l)=0 852 pdvfi(:,jj_end,l)=0 852 853 endif 853 854 … … 856 857 857 858 c$OMP MASTER 858 pdpsfi(:,jj phy_begin)=0859 if (.not. pole_sud) then860 pdpsfi(:,jj phy_end)=0859 pdpsfi(:,jj_begin)=0 860 if (.not. is_south_pole) then 861 pdpsfi(:,jj_end)=0 861 862 endif 862 863 c$OMP END MASTER … … 877 878 kend=klon 878 879 879 if ( pole_nord) kstart=2880 if ( pole_sud) kend=klon-1880 if (is_north_pole) kstart=2 881 if (is_south_pole) kend=klon-1 881 882 882 883 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) … … 885 886 !!cdir NODEP 886 887 do ig0=kstart,kend 887 i= Liste_i(ig0)888 j= Liste_j(ig0)888 i=index_i(ig0) 889 j=index_j(ig0) 889 890 pdhfi(i,j,l) = cpp * zdtfi(ig0,l) / ppk(i,j,l) 890 891 if (i==1) pdhfi(iip1,j,l) = cpp * zdtfi(ig0,l) / ppk(i,j,l) 891 892 enddo 892 893 893 if ( pole_nord) then894 if (is_north_pole) then 894 895 DO i=1,iip1 895 896 pdhfi(i,1,l) = cpp * zdtfi(1,l) / ppk(i, 1 ,l) … … 897 898 endif 898 899 899 if ( pole_sud) then900 if (is_south_pole) then 900 901 DO i=1,iip1 901 902 pdhfi(i,jjp1,l) = cpp * zdtfi(klon,l)/ ppk(i,jjp1,l) … … 913 914 !!cdir NODEP 914 915 do ig0=kstart,kend 915 i= Liste_i(ig0)916 j= Liste_j(ig0)916 i=index_i(ig0) 917 j=index_j(ig0) 917 918 pdqfi(i,j,l,iq) = zdqfi(ig0,l,iq) 918 919 if (i==1) pdqfi(iip1,j,l,iq) = zdqfi(ig0,l,iq) 919 920 enddo 920 921 921 if ( pole_nord) then922 if (is_north_pole) then 922 923 do i=1,iip1 923 924 pdqfi(i,1,l,iq) = zdqfi(1,l,iq) … … 925 926 endif 926 927 927 if ( pole_sud) then928 if (is_south_pole) then 928 929 do i=1,iip1 929 930 pdqfi(i,jjp1,l,iq) = zdqfi(klon,l,iq) … … 954 955 !!cdir NODEP 955 956 DO ig0=kstart,kend 956 i= Liste_i(ig0)957 j= Liste_j(ig0)957 i=index_i(ig0) 958 j=index_j(ig0) 958 959 pdqfi(i,j,l,iiq) = zdqfi(ig0,l,iq) 959 960 if (i==1) pdqfi(iip1,j,l,iiq) = zdqfi(ig0,l,iq) 960 961 ENDDO 961 962 962 IF ( pole_nord) then963 IF (is_north_pole) then 963 964 DO i=1,iip1 964 965 pdqfi(i,1,l,iiq) = zdqfi(1,l,iq) … … 966 967 ENDIF 967 968 968 IF ( pole_sud) then969 IF (is_south_pole) then 969 970 DO i=1,iip1 970 971 pdqfi(i,jjp1,l,iiq) = zdqfi(klon,l,iq) … … 982 983 !!cdir NODEP 983 984 do ig0=kstart,kend 984 i= Liste_i(ig0)985 j= Liste_j(ig0)985 i=index_i(ig0) 986 j=index_j(ig0) 986 987 987 988 if (i/=iim) then … … 997 998 enddo 998 999 999 if ( Pole_nord) then1000 if (is_north_pole) then 1000 1001 DO i=1,iip1 1001 1002 pdufi(i,1,l) = 0. … … 1003 1004 endif 1004 1005 1005 if ( Pole_sud) then1006 if (is_south_pole) then 1006 1007 DO i=1,iip1 1007 1008 pdufi(i,jjp1,l) = 0. … … 1018 1019 kend=klon 1019 1020 1020 if ( pole_nord) kstart=21021 if ( pole_sud) kend=klon-1-iim1021 if (is_north_pole) kstart=2 1022 if (is_south_pole) kend=klon-1-iim 1022 1023 1023 1024 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) … … 1025 1026 !!cdir NODEP 1026 1027 do ig0=kstart,kend 1027 i= Liste_i(ig0)1028 j= Liste_j(ig0)1028 i=index_i(ig0) 1029 j=index_j(ig0) 1029 1030 pdvfi(i,j,l)=0.5*(zdvfi2(ig0,l)+zdvfi2(ig0+iim,l))*cv(i,j) 1030 1031 if (i==1) pdvfi(iip1,j,l) = 0.5*(zdvfi2(ig0,l)+ … … 1041 1042 c v = U * cos(long) + V * SIN(long) 1042 1043 1043 if ( pole_nord) then1044 if (is_north_pole) then 1044 1045 1045 1046 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) … … 1061 1062 endif 1062 1063 1063 if ( pole_sud) then1064 if (is_south_pole) then 1064 1065 1065 1066 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) -
LMDZ4/trunk/libf/dyn3dpar/exner_hyb_p.F
r764 r774 51 51 INTEGER ije,ijb,jje,jjb 52 52 c 53 53 c$OMP MASTER 54 54 unpl2k = 1.+ 2.* kappa 55 55 c 56 56 ijb=ij_begin 57 57 ije=ij_end 58 58 59 59 60 DO ij = ijb, ije 60 61 pks(ij) = cpp * ( ps(ij)/preff ) ** kappa … … 103 104 c 104 105 ENDDO 106 105 107 c 106 108 c *********************************************************************** 107 109 c ..... Calcul de pk pour la couche 1 , pres du sol .... 108 110 c 111 109 112 DO ij = ijb, ije 110 113 pk(ij,1) = ( p(ij,1)*pks(ij) - 0.5*alpha(ij,2)*p(ij,2) ) / … … 123 126 c CALL SCOPY ( ngrid * llm, pk, 1, pkf, 1 ) 124 127 pkf(ijb:ije,1:llm)=pk(ijb:ije,1:llm) 128 c$OMP END MASTER 129 c$OMP BARRIER 125 130 126 131 jjb=jj_begin -
LMDZ4/trunk/libf/dyn3dpar/gcm.F
r764 r774 9 9 USE IOIPSL 10 10 #endif 11 USE mod_const_mpi, ONLY: init_const_mpi 11 12 USE parallel 12 13 USE dimphy 14 USE mod_interface_dyn_phys 13 15 USE comgeomphy 14 16 USE mod_hallo … … 212 214 c------------------------------------ 213 215 call init_parallel 214 call InitDimphy 215 call InitBands 216 call Read_Distrib 217 CALL init_const_mpi 218 CALL Init_Phys_lmdz(iim,jjp1,llm,nqmx-2,mpi_size,distrib_phys) 219 CALL set_bands 220 CALL Init_interface_dyn_phys 216 221 call MPI_BARRIER(COMM_LMDZ,ierr) 217 222 if (mpi_rank==0) call WriteBands … … 226 231 call Init_Mod_hallo(MPI_Buffer) 227 232 c$OMP PARALLEL 228 call init_phys_openmp229 233 call InitComgeomphy 230 234 c$OMP END PARALLEL … … 434 438 c write(78,*) 'q',q 435 439 436 440 c$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/,/logic/) 437 441 CALL leapfrog_p(ucov,vcov,teta,ps,masse,phis,nq,q,clesphy0, 438 442 . time_0) 439 443 c$OMP END PARALLEL 440 444 441 445 -
LMDZ4/trunk/libf/dyn3dpar/gr_dyn_fi_p.F
r764 r774 1 1 SUBROUTINE gr_dyn_fi_p(nfield,im,jm,ngrid,pdyn,pfi) 2 USE mod_interface_dyn_phys 2 3 USE dimphy 3 4 USE PARALLEL … … 27 28 DO l=1,nfield 28 29 DO ig=1,klon 29 i= Liste_i(ig)30 j= Liste_j(ig)30 i=index_i(ig) 31 j=index_j(ig) 31 32 pfi(ig,l)=pdyn(i,j,l) 32 33 ENDDO -
LMDZ4/trunk/libf/dyn3dpar/gr_fi_dyn_p.F
r764 r774 1 1 SUBROUTINE gr_fi_dyn_p(nfield,ngrid,im,jm,pfi,pdyn) 2 use dimphy 2 USE mod_interface_dyn_phys 3 USE dimphy 3 4 use parallel 4 5 IMPLICIT NONE … … 24 25 25 26 do ig=1,klon 26 i= Liste_i(ig)27 j= Liste_j(ig)27 i=index_i(ig) 28 j=index_j(ig) 28 29 pdyn(i,j,ifield)=pfi(ig,ifield) 29 30 if (i==1) pdyn(im,j,ifield)=pdyn(i,j,ifield) -
LMDZ4/trunk/libf/dyn3dpar/gr_u_scal_p.F
r630 r774 66 66 DO l=1,nx 67 67 DO ij=ijb,ije-iip1+1,iip1 68 x_scal(ij,l)=x_scal(ij+iip1-1)68 qy x_scal(ij,l)=x_scal(ij+iip1-1,l) 69 69 ENDDO 70 70 ENDDO -
LMDZ4/trunk/libf/dyn3dpar/leapfrog_p.F
r764 r774 85 85 86 86 c variables dynamiques 87 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants88 REAL teta(ip1jmp1,llm) ! temperature potentielle89 REAL q(ip1jmp1,llm,nqmx) ! champs advectes90 REAL ps(ip1jmp1) ! pression au sol91 REAL p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches92 REAL pks(ip1jmp1) ! exner au sol93 REAL pk(ip1jmp1,llm) ! exner au milieu des couches94 REAL pkf(ip1jmp1,llm) ! exner filt.au milieu des couches95 REAL masse(ip1jmp1,llm) ! masse d'air96 REAL phis(ip1jmp1) ! geopotentiel au sol97 REAL phi(ip1jmp1,llm) ! geopotentiel98 REAL w(ip1jmp1,llm) ! vitesse verticale87 REAL :: vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 88 REAL :: teta(ip1jmp1,llm) ! temperature potentielle 89 REAL :: q(ip1jmp1,llm,nqmx) ! champs advectes 90 REAL :: ps(ip1jmp1) ! pression au sol 91 REAL,SAVE :: p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches 92 REAL,SAVE :: pks(ip1jmp1) ! exner au sol 93 REAL,SAVE :: pk(ip1jmp1,llm) ! exner au milieu des couches 94 REAL,SAVE :: pkf(ip1jmp1,llm) ! exner filt.au milieu des couches 95 REAL :: masse(ip1jmp1,llm) ! masse d'air 96 REAL :: phis(ip1jmp1) ! geopotentiel au sol 97 REAL,SAVE :: phi(ip1jmp1,llm) ! geopotentiel 98 REAL,SAVE :: w(ip1jmp1,llm) ! vitesse verticale 99 99 100 100 c variables dynamiques intermediaire pour le transport 101 REAL pbaru(ip1jmp1,llm),pbarv(ip1jm,llm) !flux de masse101 REAL,SAVE :: pbaru(ip1jmp1,llm),pbarv(ip1jm,llm) !flux de masse 102 102 103 103 c variables dynamiques au pas -1 104 REAL vcovm1(ip1jm,llm),ucovm1(ip1jmp1,llm)105 REAL tetam1(ip1jmp1,llm),psm1(ip1jmp1)106 REAL massem1(ip1jmp1,llm)104 REAL,SAVE :: vcovm1(ip1jm,llm),ucovm1(ip1jmp1,llm) 105 REAL,SAVE :: tetam1(ip1jmp1,llm),psm1(ip1jmp1) 106 REAL,SAVE :: massem1(ip1jmp1,llm) 107 107 108 108 c tendances dynamiques 109 REAL dv(ip1jm,llm),du(ip1jmp1,llm)110 REAL dteta(ip1jmp1,llm),dq(ip1jmp1,llm,nqmx),dp(ip1jmp1)109 REAL,SAVE :: dv(ip1jm,llm),du(ip1jmp1,llm) 110 REAL,SAVE :: dteta(ip1jmp1,llm),dq(ip1jmp1,llm,nqmx),dp(ip1jmp1) 111 111 112 112 c tendances de la dissipation 113 REAL dvdis(ip1jm,llm),dudis(ip1jmp1,llm)114 REAL dtetadis(ip1jmp1,llm)113 REAL,SAVE :: dvdis(ip1jm,llm),dudis(ip1jmp1,llm) 114 REAL,SAVE :: dtetadis(ip1jmp1,llm) 115 115 116 116 c tendances physiques 117 REAL dvfi(ip1jm,llm),dufi(ip1jmp1,llm) 118 REAL dtetafi(ip1jmp1,llm),dqfi(ip1jmp1,llm,nqmx),dpfi(ip1jmp1) 117 REAL,SAVE :: dvfi(ip1jm,llm),dufi(ip1jmp1,llm) 118 REAL,SAVE :: dtetafi(ip1jmp1,llm) 119 REAL,SAVE :: dqfi(ip1jmp1,llm,nqmx),dpfi(ip1jmp1) 119 120 120 121 c variables pour le fichier histoire … … 128 129 129 130 REAL SSUM 130 REAL time_0 , finvmaold(ip1jmp1,llm) 131 REAL time_0 132 REAL,SAVE :: finvmaold(ip1jmp1,llm) 131 133 132 134 cym LOGICAL lafin 133 LOGICAL :: lafin =.false.135 LOGICAL :: lafin 134 136 INTEGER ij,iq,l 135 137 INTEGER ik … … 143 145 character*10 string10 144 146 145 REAL alpha(ip1jmp1,llm),beta(ip1jmp1,llm)147 REAL,SAVE :: alpha(ip1jmp1,llm),beta(ip1jmp1,llm) 146 148 #ifdef INCA 147 REAL :: flxw(ip1jmp1,llm)149 REAL,SAVE :: flxw(ip1jmp1,llm) 148 150 #endif 149 151 150 152 c+jld variables test conservation energie 151 REAL ecin(ip1jmp1,llm),ecin0(ip1jmp1,llm)153 REAL,SAVE :: ecin(ip1jmp1,llm),ecin0(ip1jmp1,llm) 152 154 C Tendance de la temp. potentiel d (theta)/ d t due a la 153 155 C tansformation d'energie cinetique en energie thermique 154 156 C cree par la dissipation 155 REAL dtetaecdt(ip1jmp1,llm)156 REAL vcont(ip1jm,llm),ucont(ip1jmp1,llm)157 REAL vnat(ip1jm,llm),unat(ip1jmp1,llm)157 REAL,SAVE :: dtetaecdt(ip1jmp1,llm) 158 REAL,SAVE :: vcont(ip1jm,llm),ucont(ip1jmp1,llm) 159 REAL,SAVE :: vnat(ip1jm,llm),unat(ip1jmp1,llm) 158 160 REAL d_h_vcol, d_qt, d_qw, d_ql, d_ec 159 161 CHARACTER*15 ztit … … 171 173 PARAMETER (true_calendar = .false.) 172 174 173 logical dissip_conservative 174 save dissip_conservative 175 data dissip_conservative/.true./ 176 177 LOGICAL prem 178 save prem 179 DATA prem/.true./ 175 logical,PARAMETER :: dissip_conservative=.TRUE. 176 180 177 INTEGER testita 181 178 PARAMETER (testita = 9) … … 183 180 c declaration liees au parallelisme 184 181 INTEGER :: ierr 185 LOGICAL :: FirstCaldyn =.TRUE.186 LOGICAL :: FirstPhysic =.TRUE.182 LOGICAL :: FirstCaldyn 183 LOGICAL :: FirstPhysic 187 184 INTEGER :: ijb,ije,j,i 188 185 type(Request) :: TestRequest 189 186 type(Request) :: Request_Dissip 190 187 type(Request) :: Request_physic 191 REAL dvfi_tmp(iip1,llm),dufi_tmp(iip1,llm) 192 REAL dtetafi_tmp(iip1,llm),dqfi_tmp(iip1,llm,nqmx) 193 REAL dpfi_tmp(iip1) 194 INTEGER :: true_itau=0 188 REAL,SAVE :: dvfi_tmp(iip1,llm),dufi_tmp(iip1,llm) 189 REAL,SAVE :: dtetafi_tmp(iip1,llm),dqfi_tmp(iip1,llm,nqmx) 190 REAL,SAVE :: dpfi_tmp(iip1) 191 192 INTEGER :: true_itau 195 193 LOGICAL :: verbose=.true. 196 INTEGER :: iapptrac = 0197 INTEGER :: AdjustCount = 0194 INTEGER :: iapptrac 195 INTEGER :: AdjustCount 198 196 INTEGER :: var_time 197 LOGICAL :: ok_start_timer=.FALSE. 198 199 c$OMP MASTER 199 200 ItCount=0 201 c$OMP END MASTER 202 true_itau=0 203 FirstCaldyn=.TRUE. 204 FirstPhysic=.TRUE. 205 iapptrac=0 206 AdjustCount = 0 207 lafin=.false. 200 208 201 209 itaufin = nday*day_step … … 211 219 ENDIF 212 220 213 221 c$OMP MASTER 222 OMP_CHUNK=5 223 c$OMP END MASTER 214 224 c----------------------------------------------------------------------- 215 225 c On initialise la pression et la fonction d'Exner : 216 226 c -------------------------------------------------- 217 227 228 c$OMP MASTER 218 229 dq=0. 219 230 CALL pression ( ip1jmp1, ap, bp, ps, p ) 220 231 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 221 232 c$OMP END MASTER 222 233 c----------------------------------------------------------------------- 223 234 c Debut de l'integration temporelle: … … 227 238 1 CONTINUE 228 239 240 c$OMP MASTER 229 241 call MPI_BARRIER(COMM_LMDZ,ierr) 242 c$OMP END MASTER 243 c$OMP BARRIER 230 244 231 245 #ifdef CPP_IOIPSL 246 c$OMP MASTER 232 247 if (ok_guide.and.(itaufin-itau-1)*dtvr.gt.21600) then 233 248 call guide_pp(itau,ucov,vcov,teta,q,masse,ps) … … 236 251 . '6 dernieres heures' 237 252 endif 253 c$OMP END MASTER 238 254 #endif 239 255 c … … 250 266 251 267 if (FirstCaldyn) then 268 c$OMP MASTER 252 269 ucovm1=ucov 253 270 vcovm1=vcov … … 258 275 finvmaold = masse 259 276 CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 ) 260 277 c$OMP END MASTER 278 c$OMP BARRIER 261 279 else 262 280 263 281 ijb=ij_begin 264 282 ije=ij_end 265 266 ucovm1 (ijb:ije,:) = ucov (ijb:ije,:) 267 tetam1 (ijb:ije,:) = teta (ijb:ije,:) 268 massem1 (ijb:ije,:) = masse (ijb:ije,:) 283 284 c$OMP MASTER 269 285 psm1 (ijb:ije) = ps (ijb:ije) 270 271 if (pole_sud) ije=ij_end-iip1 272 vcovm1(ijb:ije,:) = vcov (ijb:ije,:) 286 c$OMP END MASTER 287 288 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 289 DO l=1,llm 290 ije=ij_end 291 ucovm1 (ijb:ije,l) = ucov (ijb:ije,l) 292 tetam1 (ijb:ije,l) = teta (ijb:ije,l) 293 massem1 (ijb:ije,l) = masse (ijb:ije,l) 294 finvmaold(ijb:ije,l)=masse(ijb:ije,l) 295 296 if (pole_sud) ije=ij_end-iip1 297 vcovm1(ijb:ije,l) = vcov (ijb:ije,l) 273 298 274 finvmaold(ij_begin:ij_end,1:llm)=masse(ij_begin:ij_end,1:llm) 275 CALL filtreg_p ( finvmaold ,jj_begin,jj_end,jjp1, 299 300 ENDDO 301 c$OMP ENDDO 302 303 304 CALL filtreg_p ( finvmaold ,jj_begin,jj_end,jjp1, 276 305 . llm, -2,2, .TRUE., 1 ) 277 306 … … 292 321 2 CONTINUE 293 322 323 c$OMP MASTER 294 324 ItCount=ItCount+1 295 325 if (MOD(ItCount,1)==1) then … … 298 328 debug=.false. 299 329 endif 330 c$OMP END MASTER 300 331 c----------------------------------------------------------------------- 301 332 … … 331 362 332 363 if (firstCaldyn) then 333 364 c$OMP MASTER 334 365 call SetDistrib(jj_Nb_Caldyn) 366 c$OMP END MASTER 367 c$OMP BARRIER 335 368 firstCaldyn=.FALSE. 336 369 cym call InitTime 370 c$OMP MASTER 337 371 call Init_timer 372 c$OMP END MASTER 338 373 endif 339 340 341 342 374 375 c$OMP MASTER 376 IF (ok_start_timer) THEN 377 CALL InitTime 378 ok_start_timer=.FALSE. 379 ENDIF 380 c$OMP END MASTER 381 343 382 if (Adjust) then 344 AdjustCount=AdjustCount+1 345 c if (MOD(itau+1,20)==0) then 346 347 & .and. .not.FirstPhysic.and. Adjustcount>30) then383 c$OMP MASTER 384 AdjustCount=AdjustCount+1 385 if (iapptrac==iapp_tracvl .and. (forward. OR . leapf) 386 & .and. itau/iphysiq>2 .and. Adjustcount>30) then 348 387 AdjustCount=0 349 388 call allgather_timer_average … … 413 452 call Register_SwapFieldHallo(phis,phis,ip1jmp1,1, 414 453 & jj_Nb_caldyn,0,0,TestRequest) 415 call Register_SwapFieldHallo(phi,phi,ip1jmp1,llm,454 call Register_SwapFieldHallo(phi,phi,ip1jmp1,llm, 416 455 & jj_Nb_caldyn,0,0,TestRequest) 417 456 call Register_SwapFieldHallo(finvmaold,finvmaold,ip1jmp1,llm, … … 427 466 call WaitRequest(TestRequest) 428 467 429 c call SetDistrib(jj_Nb_vanleer)430 c call AdjustBands_vanleer431 c do j=1,nqmx432 c call Register_SwapFieldHallo(q(1,1,j),q(1,1,j),ip1jmp1,llm,433 c * jj_nb_vanleer,0,0,TestRequest)434 c enddo435 c436 c call Register_SwapFieldHallo(finvmaold,finvmaold,ip1jmp1,llm,437 c & jj_Nb_vanleer,0,0,TestRequest)438 439 c call SendRequest(TestRequest)440 c call WaitRequest(TestRequest)441 442 468 call AdjustBands_dissip 443 469 call AdjustBands_physic 444 c call SetDistrib(jj_nb_caldyn) 470 445 471 endif 446 472 c$OMP END MASTER 447 473 endif 448 474 449 475 450 476 … … 452 478 c calcul des tendances dynamiques: 453 479 c -------------------------------- 454 480 c$OMP BARRIER 481 c$OMP MASTER 455 482 call VTb(VThallo) 456 483 call Register_Hallo(ucov,ip1jmp1,llm,1,1,1,1,TestRequest) … … 488 515 enddo 489 516 endif 490 491 517 c$OMP END MASTER 518 c$OMP BARRIER 492 519 493 520 True_itau=True_itau+1 521 522 c$OMP MASTER 494 523 print*,"Iteration No",True_itau 495 524 … … 501 530 502 531 call VTb(VTcaldyn) 503 532 c$OMP END MASTER 533 c$OMP BARRIER 504 534 var_time=time+iday-day_ini 505 OMP_CHUNK=5 506 c$OMP PARALLEL DEFAULT(SHARED) 535 cc$OMP PARALLEL DEFAULT(SHARED) 536 cc$OMP+ PRIVATE(rdaym_ini,rdayvrai,ijb,ije, 537 cc$OMP+ tppn,tpn,tpps,tps) 538 507 539 cc$OMP+ SHARED(itau,ucov,vcov,teta,ps,masse,pk,pkf,phis , 508 540 cc$OMP+ phi,conser,du,dv,dteta,dp,w, pbaru,pbarv, 509 cc$OMP+ var_time) 541 cc$OMP+ time, iday,day_ini,forward,leapf, iapptrac, 542 cc$OMP+ q,dq,p,VTcaldyn,offline,dtvr,itau) 510 543 511 544 CALL caldyn_p … … 513 546 $ phi,conser,du,dv,dteta,dp,w, pbaru,pbarv, time+iday-day_ini ) 514 547 515 c$OMP END PARALLEL 548 ccc$OMP END PARALLEL 549 c$OMP MASTER 516 550 call VTe(VTcaldyn) 551 c$OMP END MASTER 517 552 c call WriteField_p('du',reshape(du,(/iip1,jmp1,llm/))) 518 553 c call WriteField_p('dv',reshape(dv,(/iip1,jjm,llm/))) … … 528 563 529 564 IF( forward. OR . leapf ) THEN 530 c $OMP PARALLEL DEFAULT(SHARED)565 cc$OMP PARALLEL DEFAULT(SHARED) 531 566 c 532 567 #ifdef INCA … … 542 577 #endif 543 578 544 c$OMP END PARALLEL 579 545 580 546 581 c do j=1,nqmx … … 562 597 c 563 598 ENDIF 564 599 cc$OMP END PARALLEL 565 600 566 601 c----------------------------------------------------------------------- 567 602 c integrations dynamique et traceurs: 568 603 c ---------------------------------- 569 604 605 c$OMP MASTER 570 606 call VTb(VTintegre) 607 c$OMP END MASTER 571 608 c call WriteField_p('ucovm1',reshape(ucovm1,(/iip1,jmp1,llm/))) 572 609 c call WriteField_p('vcovm1',reshape(vcovm1,(/iip1,jjm,llm/))) … … 577 614 c call WriteField_p('teta',reshape(teta,(/iip1,jmp1,llm/))) 578 615 c call WriteField_p('ps',reshape(ps,(/iip1,jmp1/))) 579 c $OMP PARALLEL DEFAULT(SHARED)616 cc$OMP PARALLEL DEFAULT(SHARED) 580 617 CALL integrd_p ( 2,vcovm1,ucovm1,tetam1,psm1,massem1 , 581 618 $ dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps,masse,phis , 582 619 $ finvmaold ) 583 620 584 c$OMP END PARALLEL 621 585 622 c call WriteField_p('ucovm1',reshape(ucovm1,(/iip1,jmp1,llm/))) 586 623 c call WriteField_p('vcovm1',reshape(vcovm1,(/iip1,jjm,llm/))) … … 593 630 594 631 c call WriteField_p('ps',reshape(ps,(/iip1,jmp1/))) 595 632 c$OMP MASTER 596 633 call VTe(VTintegre) 597 634 c$OMP END MASTER 598 635 c .P.Le Van (26/04/94 ajout de finvpold dans l'appel d'integrd) 599 636 c … … 608 645 IF( itau+1. EQ. itaufin ) lafin = .TRUE. 609 646 ENDIF 647 648 cc$OMP END PARALLEL 649 610 650 c 611 651 c … … 614 654 c ....... Ajout P.Le Van ( 17/04/96 ) ........... 615 655 c 616 c $OMP PARALLEL DEFAULT(SHARED)617 c $OMP+ PRIVATE(rdaym_ini,rdayvrai,ijb,ije)656 cc$OMP PARALLEL DEFAULT(SHARED) 657 cc$OMP+ PRIVATE(rdaym_ini,rdayvrai,ijb,ije) 618 658 619 659 c$OMP MASTER … … 622 662 c$OMP END MASTER 623 663 664 c$OMP BARRIER 624 665 CALL pression_p ( ip1jmp1, ap, bp, ps, p ) 625 c$OMP BARRIER 626 627 c$OMP MASTER 666 628 667 CALL exner_hyb_p( ip1jmp1, ps, p,alpha,beta,pks, pk, pkf ) 629 c$OMP END MASTER630 c$OMP BARRIER631 668 rdaym_ini = itau * dtvr / daysec 632 669 rdayvrai = rdaym_ini + day_ini … … 888 925 call resume_timer(timer_caldyn) 889 926 if (FirstPhysic) then 890 call InitTime927 ok_start_timer=.TRUE. 891 928 FirstPhysic=.false. 892 929 endif 893 930 c$OMP END MASTER 894 c$OMP END PARALLEL895 931 ENDIF 896 932 933 c$OMP BARRIER 897 934 CALL pression_p ( ip1jmp1, ap, bp, ps, p ) 898 935 CALL exner_hyb_p( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 899 936 c$OMP BARRIER 937 938 cc$OMP END PARALLEL 900 939 901 940 c----------------------------------------------------------------------- … … 904 943 905 944 IF(apdiss) THEN 906 c $OMP PARALLEL DEFAULT(SHARED)907 c $OMP+ PRIVATE(ijb,ije,tppn,tpn,tpps,tps)945 cc$OMP PARALLEL DEFAULT(SHARED) 946 cc$OMP+ PRIVATE(ijb,ije,tppn,tpn,tpps,tps) 908 947 c$OMP MASTER 909 948 call suspend_timer(timer_caldyn) … … 1103 1142 print *,'fin dissipation' 1104 1143 c$OMP END MASTER 1105 c$OMP END PARALLEL1106 1144 END IF 1145 1146 cc$OMP END PARALLEL 1107 1147 1108 1148 c ajout debug … … 1121 1161 cym call WriteField('ucov',reshape(ucov,(/iip1,jmp1,llm/))) 1122 1162 cym call WriteField('vcov',reshape(vcov,(/iip1,jjm,llm/))) 1123 1163 c$OMP MASTER 1124 1164 call stop_timer(timer_caldyn) 1165 c$OMP END MASTER 1125 1166 IF (itau==itaumax) then 1167 c$OMP MASTER 1126 1168 call allgather_timer_average 1127 1169 … … 1166 1208 print *, 'Temps total ecoule sur la parallelisation :',DiffTime() 1167 1209 print *, 'Temps CPU ecoule sur la parallelisation :',DiffCpuTime() 1210 1168 1211 call finalize_parallel 1169 STOP 1212 c$OMP END MASTER 1213 RETURN 1170 1214 ENDIF 1171 1215 … … 1188 1232 IF( itau. EQ. itaufinp1 ) then 1189 1233 1234 c$OMP MASTER 1190 1235 call finalize_parallel 1236 c$OMP END MASTER 1191 1237 abort_message = 'Simulation finished' 1192 1238 call abort_gcm(modname,abort_message,0) … … 1197 1243 1198 1244 IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN 1245 c$OMP BARRIER 1246 c$OMP MASTER 1199 1247 IF(itau.EQ.itaufin) THEN 1200 1248 iav=1 … … 1203 1251 ENDIF 1204 1252 #ifdef CPP_IOIPSL 1205 1253 call Register_Hallo(vcov,ip1jm,llm,1,0,0,1,TestRequest) 1206 1254 call SendRequest(TestRequest) 1207 1255 call WaitRequest(TestRequest) … … 1212 1260 c , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 1213 1261 #endif 1214 1262 c$OMP END MASTER 1215 1263 ENDIF 1216 1264 … … 1220 1268 1221 1269 c IF( MOD(itau,iecri ).EQ.0) THEN 1270 1222 1271 IF( MOD(itau,iecri*day_step).EQ.0) THEN 1223 1272 c$OMP BARRIER 1273 c$OMP MASTER 1224 1274 nbetat = nbetatdem 1225 1275 CALL geopot_p ( ip1jmp1, teta , pk , pks, phis , phi ) 1226 1276 1227 1277 cym unat=0. 1228 1278 … … 1269 1319 c endif 1270 1320 #endif 1271 1272 1321 c$OMP END MASTER 1322 ENDIF 1273 1323 1274 1324 IF(itau.EQ.itaufin) THEN 1275 1325 1326 c$OMP BARRIER 1327 c$OMP MASTER 1276 1328 1277 1329 c#ifdef CPP_IOIPSL 1330 1278 1331 CALL dynredem1_p("restart.nc",0.0, 1279 1332 , vcov,ucov,teta,q,nqmx,masse,ps) … … 1281 1334 1282 1335 CLOSE(99) 1336 c$OMP END MASTER 1283 1337 ENDIF 1284 1338 … … 1332 1386 forward = .FALSE. 1333 1387 IF( itau. EQ. itaufinp1 ) then 1388 c$OMP MASTER 1334 1389 call finalize_parallel 1390 c$OMP END MASTER 1335 1391 abort_message = 'Simulation finished' 1336 1392 call abort_gcm(modname,abort_message,0) … … 1347 1403 ENDIF 1348 1404 #ifdef CPP_IOIPSL 1405 c$OMP BARRIER 1406 c$OMP MASTER 1407 1349 1408 call Register_Hallo(vcov,ip1jm,llm,1,0,0,1,TestRequest) 1350 1409 call SendRequest(TestRequest) … … 1355 1414 c call bilan_dyn_p (2,dtvr*iperiod,dtvr*day_step*periodav, 1356 1415 c , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 1416 c$OMP END MASTER 1357 1417 #endif 1358 1359 1418 ENDIF 1360 1419 1361 1420 c IF(MOD(itau,iecri ).EQ.0) THEN 1362 1421 IF(MOD(itau,iecri*day_step).EQ.0) THEN 1422 c$OMP BARRIER 1423 c$OMP MASTER 1363 1424 nbetat = nbetatdem 1364 1425 CALL geopot_p( ip1jmp1, teta , pk , pks, phis , phi ) … … 1408 1469 #endif 1409 1470 1410 1471 c$OMP END MASTER 1411 1472 ENDIF 1412 1473 1413 c#ifdef CPP_IOIPSL 1414 IF(itau.EQ.itaufin) 1415 .CALL dynredem1_p("restart.nc",0.0,1416 . vcov,ucov,teta,q,nqmx,masse,ps)1417 c #endif1418 1474 IF(itau.EQ.itaufin) THEN 1475 c$OMP MASTER 1476 CALL dynredem1_p("restart.nc",0.0, 1477 . vcov,ucov,teta,q,nqmx,masse,ps) 1478 c$OMP END MASTER 1479 ENDIF 1419 1480 forward = .TRUE. 1420 1481 GO TO 1 … … 1423 1484 1424 1485 END IF 1425 1486 c$OMP MASTER 1426 1487 call finalize_parallel 1427 STOP 1488 c$OMP END MASTER 1489 RETURN 1428 1490 END -
LMDZ4/trunk/libf/dyn3dpar/logic.h
r630 r774 16 16 17 17 INTEGER iflag_phys 18 c$OMP THREADPRIVATE(/logic/) 18 19 c----------------------------------------------------------------------- -
LMDZ4/trunk/libf/dyn3dpar/temps.h
r630 r774 13 13 INTEGER*4 day_ini, day_end, annee_ref, day_ref 14 14 REAL dt 15 15 c$OMP THREADPRIVATE(/temps/) 16 16 !----------------------------------------------------------------------- -
LMDZ4/trunk/libf/dyn3dpar/temps.inc
r630 r774 14 14 INTEGER*4 day_ini, day_end, annee_ref, day_ref 15 15 REAL dt 16 16 !$OMP THREADPRIVATE(/temps/) 17 17 !----------------------------------------------------------------------- -
LMDZ4/trunk/libf/dyn3dpar/times.F90
r764 r774 1 1 module times 2 use parallel3 2 integer,private,save :: Last_Count=0 4 3 real, private,save :: Last_cpuCount=0 5 logical, private,save :: AllTimer_IsActive=. true.4 logical, private,save :: AllTimer_IsActive=.false. 6 5 7 6 integer, parameter :: nb_timer = 4 … … 26 25 27 26 subroutine init_timer 27 use parallel 28 28 implicit none 29 29 #include "dimensions90.h" … … 101 101 102 102 subroutine stop_timer(no_timer) 103 use parallel 103 104 implicit none 104 105 integer :: no_timer … … 126 127 V2=timer_table_sqr(jj_nb,no_timer,mpi_rank) 127 128 V=timer_table(jj_nb,no_timer,mpi_rank) 128 timer_delta(jj_nb,no_timer,mpi_rank)=sqrt( abs(V2-V*V/N)/(N-1))129 timer_delta(jj_nb,no_timer,mpi_rank)=sqrt(ABS(V2-V*V/N)/(N-1)) 129 130 else 130 131 timer_delta(jj_nb,no_timer,mpi_rank)=0 … … 135 136 136 137 subroutine allgather_timer 138 use parallel 137 139 implicit none 138 140 include 'mpif.h' … … 160 162 161 163 subroutine allgather_timer_average 164 use parallel 162 165 implicit none 163 166 include 'mpif.h' … … 193 196 integer :: count,count_rate,count_max 194 197 195 if (AllTimer_IsActive) then 196 call system_clock(count,count_rate,count_max) 197 call cpu_time(Last_cpuCount) 198 Last_Count=count 198 AllTimer_IsActive=.TRUE. 199 if (AllTimer_IsActive) then 200 call system_clock(count,count_rate,count_max) 201 call cpu_time(Last_cpuCount) 202 Last_Count=count 199 203 endif 200 204 end subroutine InitTime
Note: See TracChangeset
for help on using the changeset viewer.