libsc
1.6.0
|
This file emulates collective MPI routines for non-MPI code. More...
#include <sc.h>
Go to the source code of this file.
Defines | |
#define | sc_MPI_SUCCESS MPI_SUCCESS |
#define | sc_MPI_COMM_NULL MPI_COMM_NULL |
#define | sc_MPI_COMM_WORLD MPI_COMM_WORLD |
#define | sc_MPI_COMM_SELF MPI_COMM_SELF |
#define | sc_MPI_ANY_SOURCE MPI_ANY_SOURCE |
#define | sc_MPI_ANY_TAG MPI_ANY_TAG |
#define | sc_MPI_STATUS_IGNORE MPI_STATUS_IGNORE |
#define | sc_MPI_STATUSES_IGNORE MPI_STATUSES_IGNORE |
#define | sc_MPI_REQUEST_NULL MPI_REQUEST_NULL |
#define | sc_MPI_CHAR MPI_CHAR |
#define | sc_MPI_SIGNED_CHAR MPI_SIGNED_CHAR |
#define | sc_MPI_UNSIGNED_CHAR MPI_UNSIGNED_CHAR |
#define | sc_MPI_BYTE MPI_BYTE |
#define | sc_MPI_SHORT MPI_SHORT |
#define | sc_MPI_UNSIGNED_SHORT MPI_UNSIGNED_SHORT |
#define | sc_MPI_INT MPI_INT |
#define | sc_MPI_UNSIGNED MPI_UNSIGNED |
#define | sc_MPI_LONG MPI_LONG |
#define | sc_MPI_UNSIGNED_LONG MPI_UNSIGNED_LONG |
#define | sc_MPI_LONG_LONG_INT MPI_LONG_LONG_INT |
#define | sc_MPI_FLOAT MPI_FLOAT |
#define | sc_MPI_DOUBLE MPI_DOUBLE |
#define | sc_MPI_LONG_DOUBLE MPI_LONG_DOUBLE |
#define | sc_MPI_MAX MPI_MAX |
#define | sc_MPI_MIN MPI_MIN |
#define | sc_MPI_SUM MPI_SUM |
#define | sc_MPI_PROD MPI_PROD |
#define | sc_MPI_LAND MPI_LAND |
#define | sc_MPI_BAND MPI_BAND |
#define | sc_MPI_LOR MPI_LOR |
#define | sc_MPI_BOR MPI_BOR |
#define | sc_MPI_LXOR MPI_LXOR |
#define | sc_MPI_BXOR MPI_BXOR |
#define | sc_MPI_MINLOC MPI_MINLOC |
#define | sc_MPI_MAXLOC MPI_MAXLOC |
#define | sc_MPI_REPLACE MPI_REPLACE |
#define | sc_MPI_UNDEFINED MPI_UNDEFINED |
#define | sc_MPI_Comm MPI_Comm |
#define | sc_MPI_Datatype MPI_Datatype |
#define | sc_MPI_Op MPI_Op |
#define | sc_MPI_Request MPI_Request |
#define | sc_MPI_Status MPI_Status |
#define | sc_MPI_Init MPI_Init |
#define | sc_MPI_Finalize MPI_Finalize |
#define | sc_MPI_Abort MPI_Abort |
#define | sc_MPI_Comm_dup MPI_Comm_dup |
#define | sc_MPI_Comm_free MPI_Comm_free |
#define | sc_MPI_Comm_size MPI_Comm_size |
#define | sc_MPI_Comm_rank MPI_Comm_rank |
#define | sc_MPI_Barrier MPI_Barrier |
#define | sc_MPI_Bcast MPI_Bcast |
#define | sc_MPI_Gather MPI_Gather |
#define | sc_MPI_Gatherv MPI_Gatherv |
#define | sc_MPI_Allgather MPI_Allgather |
#define | sc_MPI_Allgatherv MPI_Allgatherv |
#define | sc_MPI_Reduce MPI_Reduce |
#define | sc_MPI_Allreduce MPI_Allreduce |
#define | sc_MPI_Recv MPI_Recv |
#define | sc_MPI_Irecv MPI_Irecv |
#define | sc_MPI_Send MPI_Send |
#define | sc_MPI_Isend MPI_Isend |
#define | sc_MPI_Probe MPI_Probe |
#define | sc_MPI_Iprobe MPI_Iprobe |
#define | sc_MPI_Get_count MPI_Get_count |
#define | sc_MPI_Wtime MPI_Wtime |
#define | sc_MPI_Wait MPI_Wait |
#define | sc_MPI_Waitsome MPI_Waitsome |
#define | sc_MPI_Waitall MPI_Waitall |
#define | sc_MPI_THREAD_SINGLE MPI_THREAD_SINGLE |
#define | sc_MPI_THREAD_FUNNELED MPI_THREAD_FUNNELED |
#define | sc_MPI_THREAD_SERIALIZED MPI_THREAD_SERIALIZED |
#define | sc_MPI_THREAD_MULTIPLE MPI_THREAD_MULTIPLE |
#define | sc_MPI_Init_thread MPI_Init_thread |
Enumerations | |
enum | sc_tag_t { SC_TAG_AG_ALLTOALL = 's' + 'c', SC_TAG_AG_RECURSIVE_A, SC_TAG_AG_RECURSIVE_B, SC_TAG_AG_RECURSIVE_C, SC_TAG_NOTIFY_RECURSIVE, SC_TAG_REDUCE, SC_TAG_PSORT_LO, SC_TAG_PSORT_HI } |
Functions | |
size_t | sc_mpi_sizeof (sc_MPI_Datatype t) |
Return the size of MPI data types. |
This file emulates collective MPI routines for non-MPI code.
The goal is to make code compile and execute cleanly when `--enable-mpi` is not given on the configure line. To this end, several MPI routines that are meaningful to call on one processor are provided with the prefix `sc_MPI_`, as well as necessary types and defines. If `--enable-mpi` is given, this file provides macros that map the sc_-prefixed form to the standard form of the symbols.
When including this file in your code, everything inside `#ifdef SC_ENABLE_MPI` can use the standard MPI API. Outside of this define, you may use the sc_MPI_* routines specified here to seamlessly use MPI calls.
Some send and receive routines are wrapped. They can thus be used in code outside of `#ifdef SC_ENABLE_MPI` even though they will abort. If no messages are sent to the same processor when mpisize == 1, such aborts will not occur. The `MPI_Wait*` routines are safe to call as long as no or only MPI_REQUEST_NULL requests are passed in.
size_t sc_mpi_sizeof | ( | sc_MPI_Datatype | t | ) |
Return the size of MPI data types.
[in] | t | MPI data type. |