Skip to content

Commit

Permalink
mpiwrap: use mpiwrap.h to replace sstmpidummy.h in SST
Browse files Browse the repository at this point in the history
  • Loading branch information
germasch committed Jun 6, 2019
1 parent d3e0fb7 commit 7816b44
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 280 deletions.
8 changes: 8 additions & 0 deletions source/adios2/helper/mpidummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
recvcount, recvtype, 0, comm);
}

int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int *recvcounts, int *displs,
MPI_Datatype recvtype, MPI_Comm comm)
{
return MPIDUMMY::MPI_Gatherv(sendbuf, sendcount, sendtype, recvbuf,
recvcounts, displs, recvtype, 0, comm);
}

int MPI_Scatter(const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root,
MPI_Comm comm)
Expand Down
19 changes: 17 additions & 2 deletions source/adios2/helper/mpidummy.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,20 @@ typedef int MPI_Op;
#define MPI_ANY_SOURCE 0
#define MPI_ANY_TAG 0

#define MPI_SUM 0
#define MPI_MAX 1
#define MPI_MAX 0
#define MPI_MIN 1
#define MPI_SUM 2
#define MPI_PROD 3
#define MPI_LAND 4
#define MPI_BAND 5
#define MPI_LOR 6
#define MPI_BOR 7
#define MPI_LXOR 8
#define MPI_BXOR 9
#define MPI_MAXLOC 10
#define MPI_MINLOC 11
#define MPI_REPLACE 12
#define MPI_NO_OP 13

#define MPI_MAX_PROCESSOR_NAME 32

Expand Down Expand Up @@ -132,6 +144,9 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
MPI_Comm comm);
int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int *recvcounts, int *displs,
MPI_Datatype recvtype, MPI_Comm comm);

int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
Expand Down
2 changes: 2 additions & 0 deletions source/adios2/helper/mpiwrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ int SMPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPI_Datatype recvtype, int root, MPI_Comm comm);
int SMPI_Reduce(const void *sendbuf, void *recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
int SMPI_Allreduce(const void *sendbuf, void *recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);

#ifdef __cplusplus
}
Expand Down
1 change: 1 addition & 0 deletions source/adios2/toolkit/sst/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ add_library(sst
cp/cp_writer.c
cp/cp_common.c
cp/ffs_marshal.c
${PROJECT_SOURCE_DIR}/source/adios2/helper/mpidummy.cpp
)

target_link_libraries(sst PRIVATE taustubs)
Expand Down
5 changes: 0 additions & 5 deletions source/adios2/toolkit/sst/cp/cp_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
#include "adios2/ADIOSConfig.h"
#include <atl.h>
#include <evpath.h>
#ifdef ADIOS2_HAVE_MPI
#include <mpi.h>
#else
#include "sstmpidummy.h"
#endif

#include "sst.h"

Expand Down
5 changes: 0 additions & 5 deletions source/adios2/toolkit/sst/cp/cp_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
#include "adios2/ADIOSConfig.h"
#include <atl.h>
#include <evpath.h>
#ifdef ADIOS2_HAVE_MPI
#include <mpi.h>
#else
#include "sstmpidummy.h"
#endif
#include <pthread.h>

#include "sst.h"
Expand Down
5 changes: 0 additions & 5 deletions source/adios2/toolkit/sst/cp/cp_writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
#include "adios2/ADIOSConfig.h"
#include <atl.h>
#include <evpath.h>
#ifdef ADIOS2_HAVE_MPI
#include <mpi.h>
#else
#include "sstmpidummy.h"
#endif
#include <pthread.h>

#include "sst.h"
Expand Down
5 changes: 0 additions & 5 deletions source/adios2/toolkit/sst/cp/ffs_marshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
#include "adios2/ADIOSConfig.h"
#include <atl.h>
#include <evpath.h>
#ifdef ADIOS2_HAVE_MPI
#include <mpi.h>
#else
#include "sstmpidummy.h"
#endif
#include <pthread.h>

#include "adios2/ADIOSConfig.h"
Expand Down
5 changes: 0 additions & 5 deletions source/adios2/toolkit/sst/cp/ffs_zfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
#include "adios2/ADIOSConfig.h"
#include <atl.h>
#include <evpath.h>
#ifdef ADIOS2_HAVE_MPI
#include <mpi.h>
#else
#include "sstmpidummy.h"
#endif
#include <pthread.h>

#include "sst.h"
Expand Down
5 changes: 0 additions & 5 deletions source/adios2/toolkit/sst/dp/rdma_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
#include "adios2/ADIOSConfig.h"
#include <atl.h>
#include <evpath.h>
#ifdef ADIOS2_HAVE_MPI
#include <mpi.h>
#else
#include "sstmpidummy.h"
#endif

#include <SSTConfig.h>

Expand Down
7 changes: 2 additions & 5 deletions source/adios2/toolkit/sst/dp_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
#include <sst_data.h>

#include "adios2/ADIOSConfig.h"
#include "adios2/helper/mpiwrap.h"
#include <evpath.h>
#ifdef ADIOS2_HAVE_MPI
#include <mpi.h>
#else
#include "sstmpidummy.h"
#endif

/*!
*
* CP_DP_Interface is the set of data format descriptions and function
Expand Down
2 changes: 2 additions & 0 deletions source/adios2/toolkit/sst/sst.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#ifndef SST_H_
#define SST_H_

#include "adios2/helper/mpiwrap.h"

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
238 changes: 0 additions & 238 deletions source/adios2/toolkit/sst/sstmpidummy.h

This file was deleted.

Loading

0 comments on commit 7816b44

Please sign in to comment.