7 use ioipsl
, only: getin
20 integer,
save ::
jj_nb
27 integer,
allocatable,
save,
dimension(:) ::
jj_end_para
28 integer,
allocatable,
save,
dimension(:) ::
jj_nb_para
59 #include "dimensions.h"
66 integer,
dimension(3) :: blocklen,type
68 character(len=4) :: num
69 character(len=20) :: filename
72 INTEGER :: omp_get_num_threads
73 EXTERNAL omp_get_num_threads
74 INTEGER :: omp_get_thread_num
75 EXTERNAL omp_get_thread_num
107 filename=
'lmdz.out_'//num
109 OPEN(
unit=
lunout,file=trim(filename),action=
'write', &
110 status=
'unknown',form=
'formatted',iostat=ierr)
125 write(
lunout,*)
"Arret : le nombre de bande de lattitude par process est trop faible (<2)."
126 write(
lunout,*)
" ---> diminuez le nombre de CPU ou augmentez la taille en lattitude"
208 #include "dimensions.h"
211 INTEGER,
dimension(0:MPI_Size-1) :: jj_Nb_New
256 character(len=6),
parameter :: type_ocean=
"dummy"
260 include
"dimensions.h"
273 if (type_ocean ==
'couple')
then
279 call prism_terminate_proto(ierr)
280 IF (ierr .ne. prism_ok)
THEN
281 call abort_gcm(
'Finalize_parallel',
' Probleme dans prism_terminate_proto ',1)
297 subroutine pack_data(Field,ij,ll,row,Buffer)
300 #include "dimensions.h"
303 integer,
intent(in) :: ij,ll,row
304 real,
dimension(ij,ll),
intent(in) ::Field
305 real,
dimension(ll*iip1*row),
intent(out) :: Buffer
314 buffer(pos)=field(i,l)
323 #include "dimensions.h"
326 integer,
intent(in) :: ij,ll,row
327 real,
dimension(ij,ll),
intent(out) ::Field
328 real,
dimension(ll*iip1*row),
intent(in) :: Buffer
338 field(i,l)=buffer(pos)
364 #include "dimensions.h"
370 REAL,
dimension(ij,ll) :: Field
374 LOGICAL :: SendUp,SendDown
375 LOGICAL :: RecvUp,RecvDown
376 INTEGER,
DIMENSION(4) :: Request
378 INTEGER,
DIMENSION(MPI_STATUS_SIZE,4) :: Status
380 INTEGER,
DIMENSION(1,4) :: Status
383 REAL,
dimension(:),
allocatable :: Buffer_Send_up,Buffer_Send_down
384 REAL,
dimension(:),
allocatable :: Buffer_Recv_up,Buffer_Recv_down
385 INTEGER :: Buffer_size
421 nbrequest=nbrequest+1
422 buffer_size=down*iip1*ll
423 allocate(buffer_send_up(buffer_size))
427 call mpi_issend(buffer_send_up,buffer_size,mpi_real8,
mpi_rank-1,1, &
434 nbrequest=nbrequest+1
436 buffer_size=up*iip1*ll
437 allocate(buffer_send_down(buffer_size))
442 call mpi_issend(buffer_send_down,buffer_size,mpi_real8,
mpi_rank+1,1, &
450 nbrequest=nbrequest+1
451 buffer_size=up*iip1*ll
452 allocate(buffer_recv_up(buffer_size))
456 call mpi_irecv(buffer_recv_up,buffer_size,mpi_real8,
mpi_rank-1,1, &
465 nbrequest=nbrequest+1
466 buffer_size=down*iip1*ll
467 allocate(buffer_recv_down(buffer_size))
471 call mpi_irecv(buffer_recv_down,buffer_size,mpi_real8,
mpi_rank+1,1, &
479 if (nbrequest > 0)
call mpi_waitall(nbrequest,request,status,ierr)
496 #include "dimensions.h"
498 #include "iniprint.h"
502 INTEGER :: ij,ll,rank
503 REAL,
dimension(ij,ll) :: Field
504 REAL,
dimension(:),
allocatable :: Buffer_send
505 REAL,
dimension(:),
allocatable :: Buffer_Recv
506 INTEGER,
dimension(0:MPI_Size-1) :: Recv_count, displ
515 else if (ij==
ip1jm)
then
520 stop
'erreur dans Gather_Field'
524 allocate(buffer_recv(ij*ll))
531 else if (ij==
ip1jm)
then
534 stop
'erreur dans Gather_Field'
540 displ(i)=displ(i-1)+recv_count(i-1)
549 allocate(buffer_recv(1))
554 call mpi_gatherv(buffer_send,(min(
ij_end,ij)-
ij_begin+1)*ll,mpi_real8, &
555 buffer_recv,recv_count,displ,mpi_real8,rank,
comm_lmdz,ierr)
566 else if (ij==
ip1jm)
then
580 #include "dimensions.h"
586 REAL,
dimension(ij,ll) :: Field
593 call mpi_bcast(field,ij*ll,mpi_real8,0,
comm_lmdz,ierr)
602 #include "dimensions.h"
608 REAL,
dimension(ij,ll) :: Field
616 call mpi_bcast(field,ij*ll,mpi_real8,rank,
comm_lmdz,ierr)
!$Header llmm1 INTEGER ip1jmp1
subroutine gather_field(Field, ij, ll, rank)
subroutine abort_gcm(modname, message, ierr)
!$Id Turb_fcg_gcssold get_uvd hqturb_gcssold endif!large scale llm day day1 day day1 *dt_toga endif!time annee_ref dt_toga u_toga vq_toga w_prof vq_prof llm day day1 day day1 *dt_dice endif!time annee_ref dt_dice swup_dice vg_dice omega_dice tg_prof vg_profd w_profd omega_profd!do llm!print llm l llm
!$Id klon initialisation mois suivants day_rain itap ENDIF!Calcul fin de nday_rain calcul nday_rain itap DO i
subroutine exchange_hallo(Field, ij, ll, up, down)
!$Header llmm1 INTEGER ip1jm
!$Id itapm1 ENDIF!IM on interpole les champs sur les niveaux STD de pression!IM a chaque pas de temps de la physique c!positionnement de l argument logique a false c!pour ne pas recalculer deux fois la meme chose!c!a cet effet un appel a plevel_new a ete deplace c!a la fin de la serie d appels c!la boucle DO nlevSTD a ete internalisee c!dans d ou la creation de cette routine c c!CALL false
subroutine pack_data(Field, ij, ll, row, Buffer)
subroutine finalize_parallel
!$Id Turb_fcg!implicit none!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc!cette routine permet d obtenir hq et ainsi de!pouvoir calculer la convergence et le cisaillement dans la physiq!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc INTEGER klev REAL j
integer, dimension(:), allocatable, save jj_begin_para
integer, parameter vthallo
subroutine allgather_field(Field, ij, ll)
!$Id itapm1 ENDIF!IM on interpole les champs sur les niveaux STD de pression!IM a chaque pas de temps de la physique c!positionnement de l argument logique a false c!pour ne pas recalculer deux fois la meme chose!c!a cet effet un appel a plevel_new a ete deplace c!a la fin de la serie d appels c!la boucle DO nlevSTD a ete internalisee c!dans d ou la creation de cette routine c c!CALL ulevSTD CALL &zphi philevSTD CALL &zx_rh rhlevSTD!DO klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon du jour ou toutes les read_climoz CALL true
integer, dimension(:), allocatable, save jj_nb_para
character(len=6), save type_ocean
subroutine unpack_data(Field, ij, ll, row, Buffer)
subroutine setdistrib(jj_Nb_New)
!$Header!integer nvarmx s s unit
subroutine broadcast_field(Field, ij, ll, rank)
integer, dimension(:), allocatable, save jj_end_para
!$Header!gestion des impressions de sorties et de débogage la sortie standard prt_level COMMON comprint lunout