- Timestamp:
- 2010-10-29T09:39:51+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/OBS/mpp_map.F90
r2287 r2335 4 4 !! NEMOVAR: MPP global grid point mapping to processors 5 5 !!====================================================================== 6 !! History : 2.0 ! 2007-08 (K. Mogensen) Original code 7 !!---------------------------------------------------------------------- 6 8 7 9 !!---------------------------------------------------------------------- 8 !! mppmap : Global array which maps i,j to area number. 9 !! mppmap_init : Initialize mppmap. 10 !! mppmap_init : Initialize mppmap. 10 11 !!---------------------------------------------------------------------- 11 !! * Modules used 12 USE par_kind, ONLY : & ! Precision variables 13 & wp 14 USE par_oce, ONLY : & ! Ocean parameters 15 & jpi, & 16 & jpj 17 USE dom_oce, ONLY : & ! Ocean space and time domain variables 18 & mig, & 19 & mjg, & 20 & nldi, & 21 & nlei, & 22 & nldj, & 23 & nlej, & 24 & narea 12 USE par_kind, ONLY : wp ! Precision variables 13 USE par_oce , ONLY : jpi, jpj ! Ocean parameters 14 USE dom_oce , ONLY : mig, mjg, nldi, nlei, nldj, nlej, narea ! Ocean space and time domain variables 25 15 #if defined key_mpp_mpi 26 USE lib_mpp, ONLY : & ! MPP library 27 & mpi_comm_opa 16 USE lib_mpp, ONLY : mpi_comm_opa ! MPP library 28 17 #endif 29 USE in_out_manager 18 USE in_out_manager ! I/O manager 30 19 31 20 IMPLICIT NONE 32 33 !! * Routine accessibility34 21 PRIVATE 35 22 36 PUBLIC & 37 & mppmap_init, & 38 & mppmap 23 PUBLIC :: mppmap_init, mppmap !: ??? 39 24 40 !! * Module variables 41 42 INTEGER, DIMENSION(:,:), ALLOCATABLE :: & 43 & mppmap 25 INTEGER, DIMENSION(:,:), ALLOCATABLE :: mppmap ! ??? 44 26 45 27 !!---------------------------------------------------------------------- 46 28 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 47 29 !! $Id$ 48 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)30 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 49 31 !!---------------------------------------------------------------------- 50 51 32 CONTAINS 52 33 … … 60 41 !! 61 42 !! ** Action : This does only work for MPI. 62 !! It does not work for SHMEM.63 43 !! 64 44 !! References : http://www.mpi-forum.org 65 !!66 !! History :67 !! ! 07-08 (K. Mogensen) Original code68 45 !!---------------------------------------------------------------------- 69 70 !! * Arguments 71 INTEGER, DIMENSION(:,:), ALLOCATABLE :: imppmap 46 INTEGER, DIMENSION(:,:), ALLOCATABLE :: imppmap ! 72 47 #if defined key_mpp_mpi 73 !! * Local declarations74 48 INTEGER :: ierr 75 49 INCLUDE 'mpif.h' 76 50 #endif 51 !!---------------------------------------------------------------------- 77 52 78 53 ALLOCATE( & … … 95 70 96 71 ! Call the MPI library to find the max across processors 97 98 CALL mpi_allreduce( imppmap, mppmap, jpiglo*jpjglo, mpi_integer, & 72 CALL mpi_allreduce( imppmap, mppmap, jpiglo*jpjglo, mpi_integer, & 99 73 & mpi_max, mpi_comm_opa, ierr ) 100 #elif defined key_mpp_shmem101 #error "Only MPI support for MPP in NEMOVAR"102 74 #else 103 75 104 ! Just copy the data 105 76 ! No MPP: Just copy the data 106 77 mppmap(:,:) = imppmap(:,:) 107 108 78 #endif 109 79 ! 110 80 END SUBROUTINE mppmap_init 111 81 82 !!====================================================================== 112 83 END MODULE mpp_map
Note: See TracChangeset
for help on using the changeset viewer.