From 6106eb0a4c813148133b328f1fce668d1bc79960 Mon Sep 17 00:00:00 2001 From: David Gill Date: Sat, 25 Jun 2016 07:01:26 +0000 Subject: [PATCH] TYPE: bug fix KEYWORDS: Fujitsu rsl mpif.h module_dm.F duplicate SOURCE: Chengguang Li (Fujitsu, Taiwan) PURPOSE: Redundant includes of mpif.h (correctly) break new Fujitsu compiler. DESCRIPTION OF CHANGES: The module module_dm.F has mpif.h INCLUDED at the top of the module above the CONTAINS statement, and also within approximately 20 routines within the module. Remove the replicated instances inside each routine. LIST OF MODIFIED FILES (annotated if not obvious, not required to be on a single line): M external/RSL_LITE/module_dm.F TESTS CONDUCTED (explicitly state mandatory, voluntary, and assigned tests, not required to be on a single line): 1) regression test 2) before vs after - no diffs in any model output files produced from regression test git-svn-id: https://svn-wrf-model.cgd.ucar.edu/trunk@9419 b0b5d27b-6f0f-0410-a2a3-cb1e977edc3d --- external/RSL_LITE/module_dm.F | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/external/RSL_LITE/module_dm.F b/external/RSL_LITE/module_dm.F index da95415aab..cc438f96dc 100644 --- a/external/RSL_LITE/module_dm.F +++ b/external/RSL_LITE/module_dm.F @@ -192,7 +192,6 @@ END SUBROUTINE compute_mesh SUBROUTINE wrf_dm_initialize IMPLICIT NONE #ifndef STUBMPI - INCLUDE 'mpif.h' INTEGER :: local_comm_per, local_comm_x, local_comm_y, local_comm2, new_local_comm, group, newgroup, p, p1, ierr,itmp INTEGER, ALLOCATABLE, DIMENSION(:) :: ranks INTEGER comdup @@ -1279,7 +1278,6 @@ END SUBROUTINE compute_memory_dims_rsl_lite INTEGER function getrealmpitype() #ifndef STUBMPI IMPLICIT NONE - INCLUDE 'mpif.h' INTEGER rtypesize, dtypesize, ierr CALL mpi_type_size ( MPI_REAL, rtypesize, ierr ) CALL mpi_type_size ( MPI_DOUBLE_PRECISION, dtypesize, ierr ) @@ -1300,7 +1298,6 @@ END FUNCTION getrealmpitype REAL FUNCTION wrf_dm_max_real ( inval ) IMPLICIT NONE #ifndef STUBMPI - INCLUDE 'mpif.h' REAL inval, retval INTEGER comm,ierr CALL wrf_get_dm_communicator(comm) @@ -1315,7 +1312,6 @@ END FUNCTION wrf_dm_max_real REAL FUNCTION wrf_dm_min_real ( inval ) IMPLICIT NONE #ifndef STUBMPI - INCLUDE 'mpif.h' REAL inval, retval INTEGER comm,ierr CALL wrf_get_dm_communicator(comm) @@ -1333,7 +1329,6 @@ SUBROUTINE wrf_dm_min_reals ( inval, retval, n ) REAL inval(*) REAL retval(*) #ifndef STUBMPI - INCLUDE 'mpif.h' INTEGER comm,ierr CALL wrf_get_dm_communicator(comm) CALL mpi_allreduce ( inval, retval , n, getrealmpitype(), MPI_MIN, comm, ierr ) @@ -1347,7 +1342,6 @@ FUNCTION wrf_dm_sum_real8 ( inval ) ! mean motion in HWRF moduel_tracker. IMPLICIT NONE #ifndef STUBMPI - INCLUDE 'mpif.h' REAL*8 inval, retval, wrf_dm_sum_real8 INTEGER comm,ierr CALL wrf_get_dm_communicator(comm) @@ -1362,7 +1356,6 @@ END FUNCTION wrf_dm_sum_real8 REAL FUNCTION wrf_dm_sum_real ( inval ) IMPLICIT NONE #ifndef STUBMPI - INCLUDE 'mpif.h' REAL inval, retval INTEGER comm,ierr CALL wrf_get_dm_communicator(comm) @@ -1379,7 +1372,6 @@ SUBROUTINE wrf_dm_sum_reals (inval, retval) REAL, INTENT(IN) :: inval(:) REAL, INTENT(OUT) :: retval(:) #ifndef STUBMPI - INCLUDE 'mpif.h' INTEGER comm,ierr CALL wrf_get_dm_communicator(comm) CALL mpi_allreduce ( inval, retval, SIZE(inval), getrealmpitype(), MPI_SUM, comm, ierr ) @@ -1391,7 +1383,6 @@ END SUBROUTINE wrf_dm_sum_reals INTEGER FUNCTION wrf_dm_sum_integer ( inval ) IMPLICIT NONE #ifndef STUBMPI - INCLUDE 'mpif.h' INTEGER inval, retval INTEGER comm,ierr CALL wrf_get_dm_communicator(comm) @@ -1408,7 +1399,6 @@ SUBROUTINE wrf_dm_sum_integers (inval, retval) INTEGER, INTENT(IN) :: inval(:) INTEGER, INTENT(OUT) :: retval(:) #ifndef STUBMPI - INCLUDE 'mpif.h' INTEGER comm,ierr CALL wrf_get_dm_communicator(comm) CALL mpi_allreduce ( inval, retval, SIZE(inval), MPI_INTEGER, MPI_SUM, comm, ierr ) @@ -1477,7 +1467,6 @@ END SUBROUTINE wrf_dm_maxloc_real INTEGER FUNCTION wrf_dm_bxor_integer ( inval ) IMPLICIT NONE #ifndef STUBMPI - INCLUDE 'mpif.h' INTEGER inval, retval INTEGER comm, ierr CALL wrf_get_dm_communicator(comm) @@ -1651,7 +1640,6 @@ SUBROUTINE hwrf_coupler_init #if ( HWRF == 1 ) # ifndef STUBMPI IMPLICIT NONE - INCLUDE 'mpif.h' LOGICAL mpi_inited INTEGER mpi_comm_here,ierr CALL MPI_INITIALIZED( mpi_inited, ierr ) @@ -1674,7 +1662,6 @@ END SUBROUTINE hwrf_coupler_init SUBROUTINE split_communicator #ifndef STUBMPI IMPLICIT NONE - INCLUDE 'mpif.h' LOGICAL mpi_inited ! INTEGER mpi_comm_here, mpi_comm_local, comdup, comdup2, origmytask, mytask, ntasks, ierr, io_status INTEGER mpi_comm_here, mpi_comm_local, comdup, comdup2, origmytask, ierr, io_status @@ -2122,7 +2109,6 @@ SUBROUTINE init_module_dm #ifndef STUBMPI IMPLICIT NONE INTEGER mpi_comm_local, mpi_comm_here, ierr, mytask, nproc - INCLUDE 'mpif.h' LOGICAL mpi_inited CALL mpi_initialized( mpi_inited, ierr ) IF ( .NOT. mpi_inited ) THEN @@ -2169,7 +2155,6 @@ SUBROUTINE get_full_obs_vector( nsta, nerrf, niobf, & REAL, INTENT(INOUT) :: errf(nerrf, niobf) #ifndef STUBMPI - INCLUDE 'mpif.h' ! Local declarations integer i, n, nlocal_dot, nlocal_crs @@ -2355,7 +2340,6 @@ SUBROUTINE wrf_dm_maxtile_real ( val , tile) ! INTEGER i, comm #ifndef STUBMPI - INCLUDE 'mpif.h' CALL wrf_get_dm_communicator ( comm ) CALL mpi_allgather ( val, 1, getrealmpitype(), val_all , 1, getrealmpitype(), comm, ierr ) @@ -2384,7 +2368,6 @@ SUBROUTINE wrf_dm_mintile_real ( val , tile) ! INTEGER i, comm #ifndef STUBMPI - INCLUDE 'mpif.h' CALL wrf_get_dm_communicator ( comm ) CALL mpi_allgather ( val, 1, getrealmpitype(), val_all , 1, getrealmpitype(), comm, ierr ) @@ -2413,7 +2396,6 @@ SUBROUTINE wrf_dm_mintile_double ( val , tile) ! INTEGER i, comm #ifndef STUBMPI - INCLUDE 'mpif.h' CALL wrf_get_dm_communicator ( comm ) CALL mpi_allgather ( val, 1, MPI_DOUBLE_PRECISION, val_all , 1, MPI_DOUBLE_PRECISION, comm, ierr ) @@ -2441,7 +2423,6 @@ SUBROUTINE wrf_dm_tile_val_int ( val , tile) ! INTEGER i, comm #ifndef STUBMPI - INCLUDE 'mpif.h' CALL wrf_get_dm_communicator ( comm ) CALL mpi_allgather ( val, 1, MPI_INTEGER, val_all , 1, MPI_INTEGER, comm, ierr )