Changeset 32 for XMLIO_SERVER/trunk/src/IOSERVER/mod_global_memory.f90
- Timestamp:
- 04/20/09 18:16:37 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_SERVER/trunk/src/IOSERVER/mod_global_memory.f90
r8 r32 4 4 MODULE PROCEDURE Allocate_global_memory_r8, & 5 5 Allocate_global_memory_i8, & 6 Allocate_global_memory_r4, &6 ! Allocate_global_memory_r4, & 7 7 Allocate_global_memory_i4 8 8 END INTERFACE Allocate_global_memory … … 65 65 66 66 67 SUBROUTINE Allocate_global_memory_r4(size,Pt)68 IMPLICIT NONE69 INCLUDE 'mpif.h'70 REAL(kind=4),POINTER :: Pt(:)71 INTEGER :: size72 73 POINTER (Pbuffer,MPI_Buffer(size))74 REAL(kind=4) :: MPI_Buffer75 INTEGER(KIND=MPI_ADDRESS_KIND) :: BS76 INTEGER :: ierr77 78 BS=4*size79 CALL MPI_ALLOC_MEM(BS,MPI_INFO_NULL,Pbuffer,ierr)80 CALL associate_buffer(MPI_Buffer,Pt)81 82 CONTAINS83 84 SUBROUTINE associate_buffer(MPI_buffer,Pt)85 IMPLICIT NONE86 REAL(kind=4),DIMENSION(:),target :: MPI_Buffer87 REAL(kind=4),POINTER :: Pt(:)88 Pt=>MPI_buffer89 END SUBROUTINE associate_buffer90 91 END SUBROUTINE Allocate_global_memory_r467 ! SUBROUTINE Allocate_global_memory_r4(size,Pt) 68 ! IMPLICIT NONE 69 ! INCLUDE 'mpif.h' 70 ! REAL(kind=4),POINTER :: Pt(:) 71 ! INTEGER :: size 72 ! 73 ! POINTER (Pbuffer,MPI_Buffer(size)) 74 ! REAL(kind=4) :: MPI_Buffer 75 ! INTEGER(KIND=MPI_ADDRESS_KIND) :: BS 76 ! INTEGER :: ierr 77 ! 78 ! BS=4*size 79 ! CALL MPI_ALLOC_MEM(BS,MPI_INFO_NULL,Pbuffer,ierr) 80 ! CALL associate_buffer(MPI_Buffer,Pt) 81 ! 82 ! CONTAINS 83 ! 84 ! SUBROUTINE associate_buffer(MPI_buffer,Pt) 85 ! IMPLICIT NONE 86 ! REAL(kind=4),DIMENSION(:),target :: MPI_Buffer 87 ! REAL(kind=4),POINTER :: Pt(:) 88 ! Pt=>MPI_buffer 89 ! END SUBROUTINE associate_buffer 90 ! 91 ! END SUBROUTINE Allocate_global_memory_r4 92 92 93 93
Note: See TracChangeset
for help on using the changeset viewer.