diff --git a/src/LIB/SURCOUCHE/src/modd_mpif.f90 b/src/LIB/SURCOUCHE/src/modd_mpif.f90 index b2d11175fd2a348290bca6bff55d10171846b6be..a36b3748a77cd6dedf33847c195473bbdadac049 100644 --- a/src/LIB/SURCOUCHE/src/modd_mpif.f90 +++ b/src/LIB/SURCOUCHE/src/modd_mpif.f90 @@ -7,7 +7,9 @@ !----------------------------------------------------------------- ! $Source$ ! $Name$ -! $Revision$ +! $Revision$ +! J.Escobar 5/06/2018 : add cpp key MNH_USE_MPI_STATUSES_IGNORE for use of true MPI_STATUSES_IGNORE +! & bypass bug with ifort+openmpi ! $Date$ !----------------------------------------------------------------- !----------------------------------------------------------------- @@ -19,5 +21,10 @@ MODULE MODD_MPIF #else IMPLICIT NONE INCLUDE 'mpif.h' +#ifdef MNH_USE_MPI_STATUSES_IGNORE + ! bypass ifort bug with use only MNH_STATUSES_IGNORE => MPI_STATUSES_IGNORE + double precision XXXXXX + equivalence ( MPI_STATUSES_IGNORE , XXXXXX ) +#endif #endif END MODULE MODD_MPIF diff --git a/src/LIB/SURCOUCHE/src/modd_var_ll.f90 b/src/LIB/SURCOUCHE/src/modd_var_ll.f90 index d78105df9f9a7e71c52985f8c7f96fff1e231ff9..8ce4b7d1848d7a5917106c220bc88339ce948896 100644 --- a/src/LIB/SURCOUCHE/src/modd_var_ll.f90 +++ b/src/LIB/SURCOUCHE/src/modd_var_ll.f90 @@ -44,11 +44,14 @@ !! ------------- ! ! Original 04/05/99 - +! Modifications +! J.Escobar 5/06/2018 : add cpp key MNH_USE_MPI_STATUSES_IGNORE for use of true MPI_STATUSES_IGNORE !------------------------------------------------------------------------------- ! USE MODD_STRUCTURE_ll - !USE MODD_MPIF, ONLY : MNH_STATUSES_IGNORE => MPI_STATUSES_IGNORE +#ifdef MNH_USE_MPI_STATUSES_IGNORE + USE MODD_MPIF, ONLY : MNH_STATUSES_IGNORE => MPI_STATUSES_IGNORE +#endif ! IMPLICIT NONE ! @@ -138,6 +141,8 @@ INTEGER,SAVE :: NZ_PROC_ll = 0 ! Number of proc to use in the Z splitting ! INTEGER, PARAMETER :: NMODULO_MSSGTAG = 10 ! - INTEGER, POINTER, DIMENSION(:,:) :: MNH_STATUSES_IGNORE +#ifndef MNH_USE_MPI_STATUSES_IGNORE + INTEGER, POINTER, DIMENSION(:,:) :: MNH_STATUSES_IGNORE +#endif ! END MODULE MODD_VAR_ll diff --git a/src/LIB/SURCOUCHE/src/mode_splittingz_ll.f90 b/src/LIB/SURCOUCHE/src/mode_splittingz_ll.f90 index d0178980828817394cb0eb9b7c215d56aa89e738..6f7b7342a6534982519a1a58c662e08504331989 100644 --- a/src/LIB/SURCOUCHE/src/mode_splittingz_ll.f90 +++ b/src/LIB/SURCOUCHE/src/mode_splittingz_ll.f90 @@ -104,6 +104,7 @@ CONTAINS ! R. Guivarch 29/11/99 x and y splitting -> YSPLITTING ! J. Escobar 24/09/2013 : temp patch for problem of gridnesting with different SHAPE ! M.Moge 10/02/2015 construct halo extended (needed for an interpolation in SPAWNING) + ! J. Escobar 5/06/2018 : add cpp key MNH_USE_MPI_STATUSES_IGNORE for use of true MPI_STATUSES_IGNORE ! !------------------------------------------------------------------------------- ! @@ -197,10 +198,11 @@ CONTAINS MPI_PRECISION = MNH_MPI_REAL MPI_2PRECISION = MNH_MPI_2REAL ! - ! For bug with intelmpi+ilp64+i8 declare MNH_STATUSES_INGORE + ! For bug with intelmpi+ilp64+i8 declare MNH_STATUSES_IGNORE ! - ALLOCATE(MNH_STATUSES_IGNORE(MPI_STATUS_SIZE,NPROC)) - !MNH_STATUSES_IGNORE => MPI_STATUSES_IGNORE +#ifndef MNH_USE_MPI_STATUSES_IGNORE + ALLOCATE(MNH_STATUSES_IGNORE(MPI_STATUS_SIZE,NPROC*2)) +#endif ! !------------------------------------------------------------------------------- ! diff --git a/src/Rules.LXgfortran.mk b/src/Rules.LXgfortran.mk index b11b8f9fc16b9a0017a56af3516e2f3f00f8eb61..3f10c0ae0350de0915b3a9b1a391b6c8a77eab99 100644 --- a/src/Rules.LXgfortran.mk +++ b/src/Rules.LXgfortran.mk @@ -60,6 +60,7 @@ endif FC = gfortran ifeq "$(VER_MPI)" "MPIAUTO" F90 = mpif90 +CPPFLAGS_SURCOUCHE += -DMNH_USE_MPI_STATUSES_IGNORE -DUSE_MPI else F90 = gfortran endif diff --git a/src/Rules.LXifort.mk b/src/Rules.LXifort.mk index d39475068dc0a1f87d7c0d13c8ffa0fbf8963928..3bb26ea7a3cf09b5d7349dcc11e7347a00916e69 100644 --- a/src/Rules.LXifort.mk +++ b/src/Rules.LXifort.mk @@ -9,7 +9,7 @@ ########################################################## #OBJDIR_PATH=/home/escj/azertyuiopqsdfghjklm/wxcvbn/azertyuiopqsdfghjklmwxcvbn # -OPT_BASE = -g -w -assume nosource_include -assume byterecl -fpe0 -ftz -fpic -traceback -fp-model precise -switch fe_inline_all_arg_copy_inout +OPT_BASE = -g -w -assume nosource_include -assume byterecl -fpe0 -ftz -fpic -traceback -fp-model precise -switch fe_inline_all_arg_copy_inout -fno-common OPT_PERF0 = -O0 OPT_PERF2 = -O2 OPT_PERF3 = -O3 -xHost @@ -74,6 +74,7 @@ export TAU_MAKEFILE?=/home/escj/PATCH/TAU/TAU-2.21.1-IFORT10-OMPI152-THREAD/x86_ LIBS += -lz else F90 = mpif90 +CPPFLAGS_SURCOUCHE += -DMNH_USE_MPI_STATUSES_IGNORE endif else ifeq "$(VER_MPI)" "MPIINTEL" @@ -83,6 +84,7 @@ export TAU_MAKEFILE?=/home/escj/PATCH/TAU/TAU-2.21.1-IFORT10-OMPI152-THREAD/x86_ LIBS += -lz else F90 = mpiifort +CPPFLAGS_SURCOUCHE += -DMNH_USE_MPI_STATUSES_IGNORE -DUSE_MPI endif ifeq "$(MNH_INT)" "8" OPT_BASE += -ilp64