Skip to content

Commit

Permalink
MPI_F08 support for the MPL interface.
Browse files Browse the repository at this point in the history
* legacy f77 interface can be enabled via MPL_F77_DEPRECATED ecbuild option
  • Loading branch information
marsdeno committed May 7, 2024
1 parent bca496d commit f8d0eac
Show file tree
Hide file tree
Showing 88 changed files with 16,137 additions and 1,722 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ ecbuild_add_option( FEATURE SINGLE_PRECISION
DEFAULT ON
DESCRIPTION "Compilation of parkind_sp" )

ecbuild_add_option( FEATURE MPL_F77_DEPRECATED
DESCRIPTION "Compile deprecated mpif.h MPL instead of MPI_F08 version"
REQUIRED_PACKAGES "MPI COMPONENTS Fortran"
DEFAULT OFF )

ecbuild_add_option( FEATURE WARNINGS
DEFAULT ON
DESCRIPTION "Add warnings to compiler" )
Expand Down
23 changes: 21 additions & 2 deletions src/fiat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,27 @@ if( NOT fiat_VERSION_PATCH )
endif()
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/library/version.c.in ${CMAKE_CURRENT_BINARY_DIR}/version.c @ONLY )

ecbuild_list_add_pattern( LIST fiat_src GLOB *.c *.F* *.cc )
set( fiat_src ${fiat_src} PARENT_SCOPE )
ecbuild_list_add_pattern( LIST fiat_src GLOB
drhook/*.c drhook/*.F* drhook/*.cc
ecsort/*.c ecsort/*.F* ecsort/*.cc
gstats/*.c gstats/*.F* gstats/*.cc
include/*.c include/*.F* include/*.cc
library/*.c library/*.F* library/*.cc
oml/*.c oml/*.F* oml/*.cc
system/*.c system/*.F* system/*.cc
util/*.c util/*.F* util/*.cc
)
if( HAVE_MPL_F77_DEPRECATED)
ecbuild_list_add_pattern( LIST fiat_src GLOB
"mpl/internal_deprecated/*.c" "mpl/internal_deprecated/*.F*"
"mpl/internal_deprecated/*.cc" "mpl/mpl_module.F90" "mpl/mpl_bindc.F90" )
message("FIAT building with *deprecated* F77 MPL interface")
else()
ecbuild_list_add_pattern( LIST fiat_src GLOB
"mpl/internal/*.c" "mpl/internal/*.F*"
"mpl/internal/*.cc" "mpl/mpl_module.F90" "mpl/mpl_bindc.F90" )
message("FIAT building with MPI_F08 MPL interface")
endif()

ecbuild_add_library( TARGET fiat
LINKER_LANGUAGE Fortran
Expand Down
9 changes: 5 additions & 4 deletions src/fiat/mpl/internal/ec_mpi_finalize.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ SUBROUTINE EC_MPI_FINALIZE(KERROR,LDCALLFINITO,LDMEMINFO,CALLER)
LOGICAL, INTENT(IN) :: LDMEMINFO
CHARACTER(LEN=*), INTENT(IN) :: CALLER
LOGICAL :: LLINIT, LLFIN, LLNOTMPIWORLD
INTEGER(KIND=JPIM) :: IERR, ICOMM
INTEGER(KIND=JPIM) :: IERR
TYPE(MPI_COMM) :: ICOMM
INTEGER(KIND=JPIM) :: NCOMM_MEMINFO
COMMON /cmn_meminfo/ NCOMM_MEMINFO
#include "ec_meminfo.intfb.h"
Expand All @@ -28,14 +29,14 @@ SUBROUTINE EC_MPI_FINALIZE(KERROR,LDCALLFINITO,LDMEMINFO,CALLER)
IF (LLINIT .AND. IERR == 0) THEN
CALL MPI_FINALIZED(LLFIN,IERR)
IF (.NOT.LLFIN .AND. IERR == 0) THEN
LLNOTMPIWORLD = (NCOMM_MEMINFO /= 0 .and. NCOMM_MEMINFO /= MPI_COMM_WORLD)
LLNOTMPIWORLD = (NCOMM_MEMINFO /= 0 .and. NCOMM_MEMINFO /= MPI_COMM_WORLD%MPI_VAL)
IF (LLNOTMPIWORLD) THEN
ICOMM = NCOMM_MEMINFO
ICOMM%MPI_VAL = NCOMM_MEMINFO
ELSE
ICOMM = MPI_COMM_WORLD
ENDIF

IF( LDMEMINFO ) CALL EC_MEMINFO(-1,"ec_mpi_finalize:"//caller,ICOMM,KBARR=1,KIOTASK=-1,KCALL=1)
IF( LDMEMINFO ) CALL EC_MEMINFO(-1,"ec_mpi_finalize:"//caller,ICOMM%MPI_VAL,KBARR=1,KIOTASK=-1,KCALL=1)

CALL DR_HOOK_END() ! Make sure DrHook output is produced before MPI_Finalize (in case it fails)
CALL MPI_BARRIER(ICOMM,IERR)
Expand Down
8 changes: 4 additions & 4 deletions src/fiat/mpl/internal/mpl_abort_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

MODULE MPL_ABORT_MOD

USE MPL_DATA_MODULE
USE MPL_MPIF
USE MPL_DATA_MODULE, ONLY : MPL_UNIT, MPL_ERRUNIT
USE MPL_MPIF, ONLY : MPI_COMM_WORLD
USE OML_MOD
USE EC_PARKIND ,ONLY : JPIM
USE YOMHOOK , ONLY : LHOOK
USE EC_PARKIND, ONLY : JPIM
USE YOMHOOK, ONLY : LHOOK

PRIVATE
PUBLIC MPL_ABORT
Expand Down
102 changes: 57 additions & 45 deletions src/fiat/mpl/internal/mpl_allgatherv_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ SUBROUTINE MPL_ALLGATHERV_REAL4(PSENDBUF,PRECVBUF,KRECVCOUNTS,KSENDCOUNT,KRECVDI
INTEGER(KIND=JPIM),INTENT(OUT),OPTIONAL :: KERROR,KREQUEST
CHARACTER(LEN=*),INTENT(IN),OPTIONAL :: CDSTRING

TYPE(MPI_REQUEST) :: IREQUEST_LOCAL
INTEGER(KIND=JPIM) :: IR,ISENDCOUNT,IRECVCOUNT
INTEGER(KIND=JPIM) :: IMP_TYPE
INTEGER(KIND=JPIM) :: ICOMM,IERROR,IPL_NUMPROC
INTEGER(KIND=JPIM) :: IERROR,IPL_NUMPROC
TYPE(MPI_COMM) :: ICOMM
INTEGER(KIND=JPIM) :: ITID
INTEGER(KIND=JPIM),ALLOCATABLE :: IRECVDISPL(:)

Expand All @@ -132,12 +134,12 @@ SUBROUTINE MPL_ALLGATHERV_REAL4(PSENDBUF,PRECVBUF,KRECVCOUNTS,KSENDCOUNT,KRECVDI

!--------- Preamble repeated for threadsafe--------------
IF(PRESENT(KCOMM)) THEN
ICOMM=KCOMM
ICOMM%MPI_VAL=KCOMM
ELSE
ICOMM=MPL_COMM_OML(ITID)
ICOMM%MPI_VAL=MPL_COMM_OML(ITID)
ENDIF

IF(ICOMM == MPL_COMM_OML(ITID)) THEN
IF(ICOMM%MPI_VAL == MPL_COMM_OML(ITID)) THEN
IPL_NUMPROC = MPL_NUMPROC
ELSE
CALL MPI_COMM_SIZE(ICOMM,IPL_NUMPROC,IERROR)
Expand All @@ -164,15 +166,16 @@ SUBROUTINE MPL_ALLGATHERV_REAL4(PSENDBUF,PRECVBUF,KRECVCOUNTS,KSENDCOUNT,KRECVDI


IF(IMP_TYPE == JP_BLOCKING_STANDARD .OR. IMP_TYPE == JP_BLOCKING_BUFFERED) THEN
CALL MPI_ALLGATHERV(PSENDBUF(1),ISENDCOUNT,INT(MPI_REAL4),PRECVBUF(1),&
& KRECVCOUNTS,IRECVDISPL,INT(MPI_REAL4),ICOMM,IERROR)
CALL MPI_ALLGATHERV(PSENDBUF,ISENDCOUNT,MPI_REAL4,PRECVBUF,&
& KRECVCOUNTS,IRECVDISPL,MPI_REAL4,ICOMM,IERROR)
ELSEIF(IMP_TYPE == JP_NON_BLOCKING_STANDARD .OR. IMP_TYPE == JP_NON_BLOCKING_BUFFERED) THEN
CALL MPI_IALLGATHERV(PSENDBUF(1),ISENDCOUNT,INT(MPI_REAL4),PRECVBUF(1),&
& KRECVCOUNTS,IRECVDISPL,INT(MPI_REAL4),ICOMM,KREQUEST,IERROR)
CALL MPI_IALLGATHERV(PSENDBUF,ISENDCOUNT,MPI_REAL4,PRECVBUF,&
& KRECVCOUNTS,IRECVDISPL,MPI_REAL4,ICOMM,IREQUEST_LOCAL,IERROR)
KREQUEST=IREQUEST_LOCAL%MPI_VAL
ENDIF
IF(LMPLSTATS) THEN
CALL MPL_SENDSTATS(ISENDCOUNT,INT(MPI_REAL4))
CALL MPL_RECVSTATS(SUM(KRECVCOUNTS),INT(MPI_REAL4))
CALL MPL_SENDSTATS(ISENDCOUNT,MPI_REAL4%MPI_VAL)
CALL MPL_RECVSTATS(SUM(KRECVCOUNTS),MPI_REAL4%MPI_VAL)
ENDIF

IF(MPL_OUTPUT > 1 )THEN
Expand All @@ -181,8 +184,8 @@ SUBROUTINE MPL_ALLGATHERV_REAL4(PSENDBUF,PRECVBUF,KRECVCOUNTS,KSENDCOUNT,KRECVDI
IF(PRESENT(KERROR)) THEN
KERROR=IERROR
ELSE
IF(IERROR /= 0 ) CALL MPL_MESSAGE(IERROR,'MPL_ALLGATHERV',&
& CDSTRING,LDABORT=LLABORT)
IF(IERROR /= 0 ) CALL MPL_MESSAGE(CDMESSAGE='MPL_ALLGATHERV',&
& CDSTRING=CDSTRING,KERROR=IERROR,LDABORT=LLABORT)
ENDIF
DEALLOCATE(IRECVDISPL)

Expand All @@ -207,9 +210,11 @@ SUBROUTINE MPL_ALLGATHERV_REAL8(PSENDBUF,PRECVBUF,KRECVCOUNTS,KSENDCOUNT,KRECVDI
INTEGER(KIND=JPIM),INTENT(OUT),OPTIONAL :: KERROR,KREQUEST
CHARACTER(LEN=*),INTENT(IN),OPTIONAL :: CDSTRING

TYPE(MPI_REQUEST) :: IREQUEST_LOCAL
INTEGER(KIND=JPIM) :: IR,ISENDCOUNT,IRECVCOUNT
INTEGER(KIND=JPIM) :: IMP_TYPE
INTEGER(KIND=JPIM) :: ICOMM,IERROR,IPL_NUMPROC
INTEGER(KIND=JPIM) :: IERROR,IPL_NUMPROC
TYPE(MPI_COMM) :: ICOMM
INTEGER(KIND=JPIM) :: ITID,J
INTEGER(KIND=JPIM),ALLOCATABLE :: IRECVDISPL(:)
ITID = OML_MY_THREAD()
Expand All @@ -223,12 +228,12 @@ SUBROUTINE MPL_ALLGATHERV_REAL8(PSENDBUF,PRECVBUF,KRECVCOUNTS,KSENDCOUNT,KRECVDI

!--------- Preamble repeated for threadsafe--------------
IF(PRESENT(KCOMM)) THEN
ICOMM=KCOMM
ICOMM%MPI_VAL=KCOMM
ELSE
ICOMM=MPL_COMM_OML(ITID)
ICOMM%MPI_VAL=MPL_COMM_OML(ITID)
ENDIF

IF(ICOMM == MPL_COMM_OML(ITID)) THEN
IF(ICOMM%MPI_VAL == MPL_COMM_OML(ITID)) THEN
IPL_NUMPROC = MPL_NUMPROC
ELSE
CALL MPI_COMM_SIZE(ICOMM,IPL_NUMPROC,IERROR)
Expand Down Expand Up @@ -258,16 +263,17 @@ SUBROUTINE MPL_ALLGATHERV_REAL8(PSENDBUF,PRECVBUF,KRECVCOUNTS,KSENDCOUNT,KRECVDI
IERROR=0

IF(IMP_TYPE == JP_BLOCKING_STANDARD .OR. IMP_TYPE == JP_BLOCKING_BUFFERED) THEN
CALL MPI_ALLGATHERV(PSENDBUF(1),ISENDCOUNT,INT(MPI_REAL8),PRECVBUF(1),&
& KRECVCOUNTS,IRECVDISPL,INT(MPI_REAL8),ICOMM,IERROR)
CALL MPI_ALLGATHERV(PSENDBUF,ISENDCOUNT,MPI_REAL8,PRECVBUF,&
& KRECVCOUNTS,IRECVDISPL,MPI_REAL8,ICOMM,IERROR)
ELSEIF(IMP_TYPE == JP_NON_BLOCKING_STANDARD .OR. IMP_TYPE == JP_NON_BLOCKING_BUFFERED) THEN
CALL MPI_IALLGATHERV(PSENDBUF(1),ISENDCOUNT,INT(MPI_REAL8),PRECVBUF(1),&
& KRECVCOUNTS,IRECVDISPL,INT(MPI_REAL8),ICOMM,KREQUEST,IERROR)
CALL MPI_IALLGATHERV(PSENDBUF,ISENDCOUNT,MPI_REAL8,PRECVBUF,&
& KRECVCOUNTS,IRECVDISPL,MPI_REAL8,ICOMM,IREQUEST_LOCAL,IERROR)
KREQUEST=IREQUEST_LOCAL%MPI_VAL
ENDIF

IF(LMPLSTATS) THEN
CALL MPL_SENDSTATS(ISENDCOUNT,INT(MPI_REAL8))
CALL MPL_RECVSTATS(SUM(KRECVCOUNTS),INT(MPI_REAL8))
CALL MPL_SENDSTATS(ISENDCOUNT,MPI_REAL8%MPI_VAL)
CALL MPL_RECVSTATS(SUM(KRECVCOUNTS),MPI_REAL8%MPI_VAL)
ENDIF

IF(MPL_OUTPUT > 1 )THEN
Expand All @@ -276,7 +282,7 @@ SUBROUTINE MPL_ALLGATHERV_REAL8(PSENDBUF,PRECVBUF,KRECVCOUNTS,KSENDCOUNT,KRECVDI
IF(PRESENT(KERROR)) THEN
KERROR=IERROR
ELSE
IF(IERROR /= 0 ) CALL MPL_MESSAGE(IERROR,'MPL_ALLGATHERV',CDSTRING,&
IF(IERROR /= 0 ) CALL MPL_MESSAGE(CDMESSAGE='MPL_ALLGATHERV',CDSTRING=CDSTRING,KERROR=IERROR,&
& LDABORT=LLABORT)
ENDIF
DEALLOCATE(IRECVDISPL)
Expand All @@ -302,9 +308,11 @@ SUBROUTINE MPL_ALLGATHERV_INT(KSENDBUF,KRECVBUF,KRECVCOUNTS,KSENDCOUNT,KRECVDISP
INTEGER(KIND=JPIM),INTENT(OUT),OPTIONAL :: KERROR,KREQUEST
CHARACTER(LEN=*),INTENT(IN),OPTIONAL :: CDSTRING

TYPE(MPI_REQUEST) :: IREQUEST_LOCAL
INTEGER(KIND=JPIM) :: IR,ISENDCOUNT,IRECVCOUNT
INTEGER(KIND=JPIM) :: IMP_TYPE
INTEGER(KIND=JPIM) :: ICOMM,IERROR,IPL_NUMPROC
INTEGER(KIND=JPIM) :: IERROR,IPL_NUMPROC
TYPE(MPI_COMM) :: ICOMM
INTEGER(KIND=JPIM) :: ITID
INTEGER(KIND=JPIM),ALLOCATABLE :: IRECVDISPL(:)
ITID = OML_MY_THREAD()
Expand All @@ -318,12 +326,12 @@ SUBROUTINE MPL_ALLGATHERV_INT(KSENDBUF,KRECVBUF,KRECVCOUNTS,KSENDCOUNT,KRECVDISP

!--------- Preamble repeated for threadsafe--------------
IF(PRESENT(KCOMM)) THEN
ICOMM=KCOMM
ICOMM%MPI_VAL=KCOMM
ELSE
ICOMM=MPL_COMM_OML(ITID)
ICOMM%MPI_VAL=MPL_COMM_OML(ITID)
ENDIF

IF(ICOMM == MPL_COMM_OML(ITID)) THEN
IF(ICOMM%MPI_VAL == MPL_COMM_OML(ITID)) THEN
IPL_NUMPROC = MPL_NUMPROC
ELSE
CALL MPI_COMM_SIZE(ICOMM,IPL_NUMPROC,IERROR)
Expand All @@ -350,16 +358,17 @@ SUBROUTINE MPL_ALLGATHERV_INT(KSENDBUF,KRECVBUF,KRECVCOUNTS,KSENDCOUNT,KRECVDISP

IERROR=0
IF(IMP_TYPE == JP_BLOCKING_STANDARD .OR. IMP_TYPE == JP_BLOCKING_BUFFERED) THEN
CALL MPI_ALLGATHERV(KSENDBUF(1),ISENDCOUNT,INT(MPI_INTEGER),KRECVBUF(1),&
& KRECVCOUNTS,IRECVDISPL,INT(MPI_INTEGER),ICOMM,IERROR)
CALL MPI_ALLGATHERV(KSENDBUF,ISENDCOUNT,MPI_INTEGER,KRECVBUF,&
& KRECVCOUNTS,IRECVDISPL,MPI_INTEGER,ICOMM,IERROR)
ELSEIF(IMP_TYPE == JP_NON_BLOCKING_STANDARD .OR. IMP_TYPE == JP_NON_BLOCKING_BUFFERED) THEN
CALL MPI_IALLGATHERV(KSENDBUF(1),ISENDCOUNT,INT(MPI_INTEGER),KRECVBUF(1),&
& KRECVCOUNTS,IRECVDISPL,INT(MPI_INTEGER),ICOMM,KREQUEST,IERROR)
CALL MPI_IALLGATHERV(KSENDBUF,ISENDCOUNT,MPI_INTEGER,KRECVBUF,&
& KRECVCOUNTS,IRECVDISPL,MPI_INTEGER,ICOMM,IREQUEST_LOCAL,IERROR)
KREQUEST=IREQUEST_LOCAL%MPI_VAL
ENDIF

IF(LMPLSTATS) THEN
CALL MPL_SENDSTATS(ISENDCOUNT,INT(MPI_INTEGER))
CALL MPL_RECVSTATS(SUM(KRECVCOUNTS),INT(MPI_INTEGER))
CALL MPL_SENDSTATS(ISENDCOUNT,MPI_INTEGER%MPI_VAL)
CALL MPL_RECVSTATS(SUM(KRECVCOUNTS),MPI_INTEGER%MPI_VAL)
ENDIF

IF(MPL_OUTPUT > 1 )THEN
Expand All @@ -368,7 +377,7 @@ SUBROUTINE MPL_ALLGATHERV_INT(KSENDBUF,KRECVBUF,KRECVCOUNTS,KSENDCOUNT,KRECVDISP
IF(PRESENT(KERROR)) THEN
KERROR=IERROR
ELSE
IF(IERROR /= 0 ) CALL MPL_MESSAGE(IERROR,'MPL_ALLGATHERV',CDSTRING,LDABORT=LLABORT)
IF(IERROR /= 0 ) CALL MPL_MESSAGE(CDMESSAGE='MPL_ALLGATHERV',CDSTRING=CDSTRING,KERROR=IERROR,LDABORT=LLABORT)
ENDIF
DEALLOCATE(IRECVDISPL)

Expand All @@ -393,10 +402,12 @@ SUBROUTINE MPL_ALLGATHERV_INT_SCALAR(KSENDBUF,KRECVBUF,KRECVCOUNTS,KSENDCOUNT,KR
INTEGER(KIND=JPIM),INTENT(OUT),OPTIONAL :: KERROR,KREQUEST
CHARACTER(LEN=*),INTENT(IN),OPTIONAL :: CDSTRING

TYPE(MPI_REQUEST) :: IREQUEST_LOCAL
INTEGER(KIND=JPIM) :: IR,ISENDCOUNT,IRECVCOUNT
INTEGER(KIND=JPIM) :: IMP_TYPE
INTEGER(KIND=JPIM) :: IRECVCOUNTS(MPL_NUMPROC)
INTEGER(KIND=JPIM) :: ICOMM,IERROR,IPL_NUMPROC
INTEGER(KIND=JPIM) :: IERROR,IPL_NUMPROC
TYPE(MPI_COMM) :: ICOMM
INTEGER(KIND=JPIM) :: ITID
INTEGER(KIND=JPIM),ALLOCATABLE :: IRECVDISPL(:)
ITID = OML_MY_THREAD()
Expand All @@ -414,12 +425,12 @@ SUBROUTINE MPL_ALLGATHERV_INT_SCALAR(KSENDBUF,KRECVBUF,KRECVCOUNTS,KSENDCOUNT,KR
!IF(PRESENT(KSENDCOUNT)) WRITE(*,*) 'ALLGATHERV_SCALAR', IRECVCOUNTS
!--------- Preamble repeated for threadsafe--------------
IF(PRESENT(KCOMM)) THEN
ICOMM=KCOMM
ICOMM%MPI_VAL=KCOMM
ELSE
ICOMM=MPL_COMM_OML(ITID)
ICOMM%MPI_VAL=MPL_COMM_OML(ITID)
ENDIF

IF(ICOMM == MPL_COMM_OML(ITID)) THEN
IF(ICOMM%MPI_VAL == MPL_COMM_OML(ITID)) THEN
IPL_NUMPROC = MPL_NUMPROC
ELSE
CALL MPI_COMM_SIZE(ICOMM,IPL_NUMPROC,IERROR)
Expand All @@ -445,15 +456,16 @@ SUBROUTINE MPL_ALLGATHERV_INT_SCALAR(KSENDBUF,KRECVBUF,KRECVCOUNTS,KSENDCOUNT,KR
!--------- End of Preamble --------------

IF(IMP_TYPE == JP_BLOCKING_STANDARD .OR. IMP_TYPE == JP_BLOCKING_BUFFERED) THEN
CALL MPI_ALLGATHERV(KSENDBUF,ISENDCOUNT,INT(MPI_INTEGER),KRECVBUF(1),IRECVCOUNTS,&
& IRECVDISPL,INT(MPI_INTEGER),ICOMM,IERROR)
CALL MPI_ALLGATHERV(KSENDBUF,ISENDCOUNT,MPI_INTEGER,KRECVBUF,IRECVCOUNTS,&
& IRECVDISPL,MPI_INTEGER,ICOMM,IERROR)
ELSEIF(IMP_TYPE == JP_NON_BLOCKING_STANDARD .OR. IMP_TYPE == JP_NON_BLOCKING_BUFFERED) THEN
CALL MPI_IALLGATHERV(KSENDBUF,ISENDCOUNT,INT(MPI_INTEGER),KRECVBUF(1),IRECVCOUNTS,&
& IRECVDISPL,INT(MPI_INTEGER),ICOMM,KREQUEST,IERROR)
CALL MPI_IALLGATHERV(KSENDBUF,ISENDCOUNT,MPI_INTEGER,KRECVBUF,IRECVCOUNTS,&
& IRECVDISPL,MPI_INTEGER,ICOMM,IREQUEST_LOCAL,IERROR)
KREQUEST=IREQUEST_LOCAL%MPI_VAL
ENDIF
IF(LMPLSTATS) THEN
CALL MPL_SENDSTATS(ISENDCOUNT,INT(MPI_INTEGER))
CALL MPL_RECVSTATS(SUM(IRECVCOUNTS),INT(MPI_INTEGER))
CALL MPL_SENDSTATS(ISENDCOUNT,MPI_INTEGER%MPI_VAL)
CALL MPL_RECVSTATS(SUM(IRECVCOUNTS),MPI_INTEGER%MPI_VAL)
ENDIF

IF(MPL_OUTPUT > 1 )THEN
Expand All @@ -462,7 +474,7 @@ SUBROUTINE MPL_ALLGATHERV_INT_SCALAR(KSENDBUF,KRECVBUF,KRECVCOUNTS,KSENDCOUNT,KR
IF(PRESENT(KERROR)) THEN
KERROR=IERROR
ELSE
IF(IERROR /= 0 ) CALL MPL_MESSAGE(IERROR,'MPL_ALLGATHERV',CDSTRING,LDABORT=LLABORT)
IF(IERROR /= 0 ) CALL MPL_MESSAGE(CDMESSAGE='MPL_ALLGATHERV',CDSTRING=CDSTRING,KERROR=IERROR,LDABORT=LLABORT)
ENDIF
DEALLOCATE(IRECVDISPL)

Expand Down
Loading

0 comments on commit f8d0eac

Please sign in to comment.