Changeset 807 for LMDZ4/trunk/libf
- Timestamp:
- Jul 5, 2007, 2:11:45 PM (17 years ago)
- Location:
- LMDZ4/trunk/libf/dyn3dpar
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk/libf/dyn3dpar/gcm.F
r791 r807 18 18 USE mod_hallo 19 19 USE Bands 20 USE Write_Field 21 USE Write_Field_phy 20 22 IMPLICIT NONE 21 23 … … 141 143 SAVE latfi, lonfi, airefi 142 144 143 c varaiable pour l'allocation du Buffer MPI (sur NEC)144 pointer (Pbuffer,MPI_Buffer(MaxBufferSize))145 REAL :: MPI_Buffer146 INTEGER(KIND=MPI_ADDRESS_KIND) :: BS147 145 INTEGER :: ierr 148 146 … … 215 213 c Initialisation partie parallele 216 214 c------------------------------------ 215 CALL init_const_mpi 216 217 217 call init_parallel 218 218 call Read_Distrib 219 CALL init_const_mpi220 219 CALL Init_Phys_lmdz(iim,jjp1,llm,nqmx-2,mpi_size,distrib_phys) 221 220 CALL set_bands … … 224 223 if (mpi_rank==0) call WriteBands 225 224 call SetDistrib(jj_Nb_Caldyn) 226 c Allocation du buffer MPI 227 Bs=8*MaxBufferSize 228 call MPI_ALLOC_MEM(BS,MPI_INFO_NULL,Pbuffer,ierr) 229 print *,'ierr',ierr 230 do i=1,MaxBufferSize 231 MPI_Buffer(i)=i 232 enddo 233 call Init_Mod_hallo(MPI_Buffer) 225 call Init_Mod_hallo 226 234 227 c$OMP PARALLEL 235 228 call InitComgeomphy … … 379 372 zcvfi(ngridmx) = cv(ip1jm-iim) 380 373 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,aire,airefi) 374 381 375 WRITE(lunout,*) 382 376 . 'WARNING!!! vitesse verticale nulle dans la physique' … … 386 380 387 381 call_iniphys=.false. 382 388 383 ENDIF 389 384 #endif -
LMDZ4/trunk/libf/dyn3dpar/mod_hallo.F90
r792 r807 2 2 USE parallel 3 3 implicit none 4 ! include 'mpif.h' 4 5 5 integer, parameter :: MaxRequest=200 6 6 integer, parameter :: MaxProc=80 … … 11 11 12 12 real,save,pointer,dimension(:) :: Buffer 13 ! pointer (Pbuffer,Buffer) 14 ! real,dimension(:) :: Buffer 13 15 14 integer,dimension(Listsize) :: Buffer_Pos 16 15 integer :: Index_Pos … … 26 25 type request_SR 27 26 integer :: NbRequest=0 28 ! real,dimension(:),allocatable :: Buffer29 ! real,dimension(:),pointer :: Buffer30 27 integer :: Pos 31 28 integer :: Index … … 43 40 contains 44 41 45 subroutine Init_mod_hallo (MPI_Buffer)42 subroutine Init_mod_hallo 46 43 implicit none 47 real,dimension(:),target :: MPI_BUFFER 48 integer i 44 49 45 Index_Pos=1 50 46 Buffer_Pos(Index_Pos)=1 51 52 Buffer=>MPI_Buffer53 47 MaxBufferSize_Used=0 48 49 CALL create_global_mpi_buffer 50 54 51 end subroutine init_mod_hallo 52 53 54 SUBROUTINE create_standard_mpi_buffer 55 IMPLICIT NONE 56 57 ALLOCATE(Buffer(MaxBufferSize)) 58 59 END SUBROUTINE create_standard_mpi_buffer 60 61 62 SUBROUTINE create_global_mpi_buffer 63 IMPLICIT NONE 64 INCLUDE 'mpif.h' 65 POINTER (Pbuffer,MPI_Buffer(MaxBufferSize)) 66 REAL :: MPI_Buffer 67 INTEGER(KIND=MPI_ADDRESS_KIND) :: BS 68 INTEGER :: i,ierr 69 70 71 Bs=8*MaxBufferSize 72 CALL MPI_ALLOC_MEM(BS,MPI_INFO_NULL,Pbuffer,ierr) 73 DO i=1,MaxBufferSize 74 MPI_Buffer(i)=i 75 ENDDO 76 77 CALL Associate_buffer(MPI_Buffer) 78 79 CONTAINS 80 81 SUBROUTINE Associate_buffer(MPI_Buffer) 82 IMPLICIT NONE 83 REAL,DIMENSION(:),target :: MPI_Buffer 84 85 Buffer=>MPI_Buffer 86 87 END SUBROUTINE Associate_buffer 88 89 END SUBROUTINE create_global_mpi_buffer 90 91 55 92 56 93 subroutine allocate_buffer(Size,Index,Pos)
Note: See TracChangeset
for help on using the changeset viewer.