Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaces mpp_recv and mpp_send and uses mpi_gather and mpi_scatterv within mpp_scatter_pelist #1240

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions mpp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ libmpp_la_SOURCES = \
include/mpp_read_distributed_ascii.inc \
include/mpp_reduce_mpi.fh \
include/mpp_reduce_nocomm.fh \
include/mpp_scatter.fh \
include/mpp_scatter_mpi.fh \
include/mpp_scatter_nocomm.fh \
include/mpp_sum.inc \
include/mpp_sum_ad.inc \
include/mpp_sum_mpi.fh \
Expand Down Expand Up @@ -160,7 +161,8 @@ mpp_mod.$(FC_MODEXT): \
include/mpp_transmit_nocomm.fh \
include/mpp_type_nocomm.fh \
include/mpp_gather.fh \
include/mpp_scatter.fh \
include/mpp_scatter_mpi.fh \
include/mpp_scatter_nocomm.fh \
include/system_clock.fh
mpp_data_mod.$(FC_MODEXT): \
mpp_parameter_mod.$(FC_MODEXT) \
Expand Down
60 changes: 29 additions & 31 deletions mpp/include/mpp_comm.inc
Original file line number Diff line number Diff line change
Expand Up @@ -437,35 +437,33 @@
#include <mpp_gather.fh>

!#################################################
#undef MPP_SCATTER_PELIST_2D_
#undef MPP_SCATTER_PELIST_3D_
#undef MPP_TYPE_
#define MPP_TYPE_ integer(i4_kind)
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_int4_2d
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_int4_3d
#include <mpp_scatter.fh>

#undef MPP_SCATTER_PELIST_2D_
#undef MPP_SCATTER_PELIST_3D_
#undef MPP_TYPE_
#define MPP_TYPE_ integer(i8_kind)
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_int8_2d
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_int8_3d
#include <mpp_scatter.fh>

#undef MPP_SCATTER_PELIST_2D_
#undef MPP_SCATTER_PELIST_3D_
#undef MPP_TYPE_
#define MPP_TYPE_ real(r4_kind)
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_real4_2d
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_real4_3d
#include <mpp_scatter.fh>

#undef MPP_SCATTER_PELIST_2D_
#undef MPP_SCATTER_PELIST_3D_
#undef MPP_TYPE_
#define MPP_TYPE_ real(r8_kind)
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_real8_2d
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_real8_3d
#include <mpp_scatter.fh>
!#undef MPP_SCATTER_PELIST_2D_
!#undef MPP_SCATTER_PELIST_3D_
!#undef MPP_TYPE_
!#define MPP_TYPE_ integer(i4_kind)
!#undef MPI_TYPE_
!#define MPI_TYPE_ MPI_INTEGER4
!#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_int4_2d
!#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_int4_3d
!#include <mpp_scatter.fh>

!#undef MPP_SCATTER_PELIST_2D_
!#undef MPP_SCATTER_PELIST_3D_
!#undef MPP_TYPE_
!#define MPP_TYPE_ real(r4_kind)
!#undef MPI_TYPE_
!#define MPI_TYPE_ MPI_REAL4
!#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_real4_2d
!#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_real4_3d
!#include <mpp_scatter.fh>

!#undef MPP_SCATTER_PELIST_2D_
!#undef MPP_SCATTER_PELIST_3D_
!#undef MPP_TYPE_
!#define MPP_TYPE_ real(r8_kind)
!#undef MPI_TYPE_
!#define MPI_TYPE_ MPI_REAL8
!#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_real8_2d
!#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_real8_3d
!#include <mpp_scatter.fh>
!> @}
54 changes: 54 additions & 0 deletions mpp/include/mpp_comm_mpi.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,60 @@ end subroutine mpp_exit
#define MPI_TYPE_ MPI_INTEGER8
#include <mpp_alltoall_mpi.fh>

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! !
! MPP_SCATTER: MPI_SCATTERV, MPI_GATHER !
! !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

#undef MPP_SCATTER_PELIST_2D_
#undef MPP_SCATTER_PELIST_3D_
#undef MPP_TYPE_
#undef MPP_TYPE_BYTELEN_
#undef MPI_TYPE_
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_int4_2d
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_int4_3d
#define MPP_TYPE_ integer(i4_kind)
#define MPP_TYPE_BYTELEN_ 4
#define MPI_TYPE_ MPI_INTEGER4
#include <mpp_scatter_mpi.fh>

#undef MPP_SCATTER_PELIST_2D_
#undef MPP_SCATTER_PELIST_3D_
#undef MPP_TYPE_
#undef MPP_TYPE_BYTELEN_
#undef MPI_TYPE_
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_int8_2d
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_int8_3d
#define MPP_TYPE_ integer(i8_kind)
#define MPP_TYPE_BYTELEN_ 8
#define MPI_TYPE_ MPI_INTEGER8
#include <mpp_scatter_mpi.fh>

#undef MPP_SCATTER_PELIST_2D_
#undef MPP_SCATTER_PELIST_3D_
#undef MPP_TYPE_
#undef MPP_TYPE_BYTELEN_
#undef MPI_TYPE_
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_real4_2d
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_real4_3d
#define MPP_TYPE_ real(r4_kind)
#define MPP_TYPE_BYTELEN_ 4
#define MPI_TYPE_ MPI_REAL4
#include <mpp_scatter_mpi.fh>

#undef MPP_SCATTER_PELIST_2D_
#undef MPP_SCATTER_PELIST_3D_
#undef MPP_TYPE_
#undef MPP_TYPE_BYTELEN_
#undef MPI_TYPE_
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_real8_2d
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_real8_3d
#define MPP_TYPE_ real(r8_kind)
#define MPP_TYPE_BYTELEN_ 8
#define MPI_TYPE_ MPI_REAL8
#include <mpp_scatter_mpi.fh>

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! !
! DATA TRANSFER TYPES: mpp_type_create, mpp_type_free !
Expand Down
46 changes: 46 additions & 0 deletions mpp/include/mpp_comm_nocomm.inc
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,52 @@ end subroutine mpp_exit
#include <mpp_transmit_nocomm.fh>
#undef MPP_TYPE_INIT_VALUE

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! !
! MPP_SCATTER: MPI_SCATTERV, MPI_GATHER !
! !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

#undef MPP_SCATTER_PELIST_2D_
#undef MPP_SCATTER_PELIST_3D_
#undef MPP_TYPE_
#undef MPI_TYPE_
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_int4_2d
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_int4_3d
#define MPP_TYPE_ integer(i4_kind)
#define MPI_TYPE_ MPI_INTEGER4
#include <mpp_scatter_nocomm.fh>

#undef MPP_SCATTER_PELIST_2D_
#undef MPP_SCATTER_PELIST_3D_
#undef MPP_TYPE_
#undef MPI_TYPE_
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_int8_2d
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_int8_3d
#define MPP_TYPE_ integer(i8_kind)
#define MPI_TYPE_ MPI_INTEGER8
#include <mpp_scatter_nocomm.fh>

#undef MPP_SCATTER_PELIST_2D_
#undef MPP_SCATTER_PELIST_3D_
#undef MPP_TYPE_
#undef MPI_TYPE_
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_real4_2d
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_real4_3d
#define MPP_TYPE_ real(r4_kind)
#define MPI_TYPE_ MPI_REAL4
#include <mpp_scatter_nocomm.fh>

#undef MPP_SCATTER_PELIST_2D_
#undef MPP_SCATTER_PELIST_3D_
#undef MPP_TYPE_
#undef MPI_TYPE_
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_real8_2d
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_real8_3d
#define MPP_TYPE_ real(r8_kind)
#define MPI_TYPE_ MPI_REAL8
#include <mpp_scatter_nocomm.fh>

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! !
! GLOBAL REDUCTION ROUTINES: mpp_max, mpp_sum, mpp_min !
Expand Down
159 changes: 0 additions & 159 deletions mpp/include/mpp_scatter.fh

This file was deleted.

Loading