ParGeMSLR
|
Parallel related data structures and functions. More...
Go to the source code of this file.
Classes | |
class | pargemslr::ParallelLogClass |
The data structure for parallel computing, including data structures for MPI and CUDA. More... | |
Typedefs | |
typedef class pargemslr::ParallelLogClass | pargemslr::parallel_log |
The data structure for parallel computing, including data structures for MPI and CUDA. More... | |
typedef class pargemslr::ParallelLogClass * | pargemslr::parallel_logp |
Functions | |
int | pargemslr::PargemslrSetOpenmpNumThreads (int nthreads) |
Set the OpenMP thread number for each MPI process. More... | |
int | pargemslr::PargemslrNLocalToNGlobal (int n_local, long int &n_start, long int &n_global, MPI_Comm &comm) |
Each MPI rank holds n_local, get the n_start and n_global. More... | |
int | pargemslr::PargemslrNLocalToNGlobal (int nrow_local, int ncol_local, long int &nrow_start, long int &ncol_start, long int &nrow_global, long int &ncol_global, MPI_Comm &comm) |
Each MPI rank holds two n_locals, get the n_starts and n_globals. More... | |
int | pargemslr::PargemslrInit (int *argc, char ***argv) |
Initilize MPI, OpenMP, and CUDA. Note that if you have already called MPI_Init, call other init functions instead. More... | |
int | pargemslr::PargemslrInitMpi (MPI_Comm comm) |
Initilize MPI data struct with MPI_Comm. More... | |
int | pargemslr::PargemslrInitOpenMP (int nthreads) |
Initilize OpenMP and MKL. More... | |
int | pargemslr::PargemslrInitCUDA () |
Initilize CUDA. More... | |
int | pargemslr::PargemslrPrintParallelInfo () |
Print the parallel information to output. More... | |
int | pargemslr::PargemslrFinalize () |
Finalize MPI, OpenMP, and CUDA. Note that if you don't want to call MPI_Finalize here, call other finalize functions. More... | |
int | pargemslr::PargemslrFinalizeMpi () |
Finalize MPI data structure. Note that MPI_Finalize won't be called here. More... | |
int | pargemslr::PargemslrFinalizeOpenMP () |
Finalize OpenMP data structure. More... | |
int | pargemslr::PargemslrFinalizeCUDA () |
Finalize CUDA data structure. More... | |
int | pargemslr::PargemslrMpiTime (MPI_Comm comm, double &t) |
Get current time using MPI_Wtime. More... | |
template<typename T > | |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiIsend (T *buf, int count, int dest, int tag, MPI_Comm comm, MPI_Request *request) |
MPI_Isend. More... | |
template<typename T > | |
std::enable_if< PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiIsend (T *buf, int count, int dest, int tag, MPI_Comm comm, MPI_Request *request) |
MPI_Isend. More... | |
template<typename T > | |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiIrecv (T *buf, int count, int source, int tag, MPI_Comm comm, MPI_Request *request) |
MPI_Irecv. More... | |
template<typename T > | |
std::enable_if< PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiIrecv (T *buf, int count, int source, int tag, MPI_Comm comm, MPI_Request *request) |
MPI_Irecv. More... | |
template<typename T > | |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiSend (T *buf, int count, int dest, int tag, MPI_Comm comm) |
MPI_Send. More... | |
template<typename T > | |
std::enable_if< PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiSend (T *buf, int count, int dest, int tag, MPI_Comm comm) |
MPI_Send. More... | |
template<typename T > | |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiRecv (T *buf, int count, int source, int tag, MPI_Comm comm, MPI_Status *status) |
MPI_Irecv. More... | |
template<typename T > | |
std::enable_if< PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiRecv (T *buf, int count, int source, int tag, MPI_Comm comm, MPI_Status *status) |
MPI_Irecv. More... | |
template<typename T > | |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiBcast (T *buf, int count, int root, MPI_Comm comm) |
MPI_Bcast. More... | |
template<typename T > | |
std::enable_if< PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiBcast (T *buf, int count, int root, MPI_Comm comm) |
MPI_Bcast. More... | |
template<typename T > | |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiScan (T *sendbuf, T *recvbuf, int count, MPI_Op op, MPI_Comm comm) |
MPI_Scan. More... | |
template<typename T > | |
std::enable_if< PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiScan (T *sendbuf, T *recvbuf, int count, MPI_Op op, MPI_Comm comm) |
MPI_Scan. More... | |
template<typename T > | |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiReduce (T *sendbuf, T *recvbuf, int count, MPI_Op op, int root, MPI_Comm comm) |
MPI_Reduce. More... | |
template<typename T > | |
std::enable_if< PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiReduce (T *sendbuf, T *recvbuf, int count, MPI_Op op, int root, MPI_Comm comm) |
MPI_Reduce. More... | |
template<typename T > | |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiAllreduce (T *sendbuf, T *recvbuf, int count, MPI_Op op, MPI_Comm comm) |
MPI_Allreduce. More... | |
template<typename T > | |
std::enable_if< PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiAllreduce (T *sendbuf, T *recvbuf, int count, MPI_Op op, MPI_Comm comm) |
MPI_Allreduce. More... | |
template<typename T > | |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiAllreduceInplace (T *buf, int count, MPI_Op op, MPI_Comm comm) |
In place MPI_Allreduce. More... | |
template<typename T > | |
std::enable_if< PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiAllreduceInplace (T *buf, int count, MPI_Op op, MPI_Comm comm) |
In place MPI_Allreduce. More... | |
template<typename T > | |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiGather (T *sendbuf, int count, T *recvbuf, int root, MPI_Comm comm) |
MPI_Gather. More... | |
template<typename T > | |
std::enable_if< PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiGather (T *sendbuf, int count, T *recvbuf, int root, MPI_Comm comm) |
MPI_Gather. More... | |
template<typename T > | |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiAllgather (T *sendbuf, int count, T *recvbuf, MPI_Comm comm) |
MPI_Allgather. More... | |
template<typename T > | |
std::enable_if< PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiAllgather (T *sendbuf, int count, T *recvbuf, MPI_Comm comm) |
MPI_Allgather. More... | |
template<typename T > | |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiAllgatherv (T *sendbuf, int count, T *recvbuf, int *recvcounts, int *recvdisps, MPI_Comm comm) |
MPI_Allgatherv. More... | |
template<typename T > | |
std::enable_if< PargemslrIsComplex< T >::value, int >::type | pargemslr::PargemslrMpiAllgatherv (T *sendbuf, int count, T *recvbuf, int *recvcounts, int *recvdisps, MPI_Comm comm) |
MPI_Allgatherv. More... | |
template<typename T > | |
MPI_Datatype | pargemslr::PargemslrMpiDataType () |
Get the MPI_Datatype. More... | |
template<> | |
MPI_Datatype | pargemslr::PargemslrMpiDataType< int > () |
Get the MPI_Datatype. More... | |
template<> | |
MPI_Datatype | pargemslr::PargemslrMpiDataType< long int > () |
Get the MPI_Datatype. More... | |
template<> | |
MPI_Datatype | pargemslr::PargemslrMpiDataType< float > () |
Get the MPI_Datatype. More... | |
template<> | |
MPI_Datatype | pargemslr::PargemslrMpiDataType< double > () |
Get the MPI_Datatype. More... | |
template<> | |
MPI_Datatype | pargemslr::PargemslrMpiDataType< complexs > () |
Get the MPI_Datatype. More... | |
template<> | |
MPI_Datatype | pargemslr::PargemslrMpiDataType< complexd > () |
Get the MPI_Datatype. More... | |
#define PARGEMSLR_FIRM_TIME_CALL | ( | comm, | |
num, | |||
... | |||
) |
#define PARGEMSLR_GLOBAL_FIRM_TIME_CALL | ( | num, | |
... | |||
) |
#define PARGEMSLR_GLOBAL_SEQUENTIAL_RUN | ( | ... | ) |
#define PARGEMSLR_GLOBAL_TIME_CALL | ( | num, | |
... | |||
) |
#define PARGEMSLR_LOCAL_FIRM_TIME_CALL | ( | num, | |
... | |||
) |
#define PARGEMSLR_LOCAL_TIME_CALL | ( | num, | |
... | |||
) |
#define PARGEMSLR_MPI_CALL | ( | ... | ) |
#define PARGEMSLR_PRINT_TIMING_RESULT | ( | print_level, | |
... | |||
) |
#define PARGEMSLR_TIME_CALL | ( | comm, | |
num, | |||
... | |||
) |
typedef class pargemslr::ParallelLogClass pargemslr::parallel_log |
The data structure for parallel computing, including data structures for MPI and CUDA.
All CUDA information are shared, local MPI information can be different.
int pargemslr::PargemslrFinalize | ( | ) |
Finalize MPI, OpenMP, and CUDA. Note that if you don't want to call MPI_Finalize here, call other finalize functions.
int pargemslr::PargemslrFinalizeCUDA | ( | ) |
Finalize CUDA data structure.
int pargemslr::PargemslrFinalizeMpi | ( | ) |
Finalize MPI data structure. Note that MPI_Finalize won't be called here.
int pargemslr::PargemslrFinalizeOpenMP | ( | ) |
Finalize OpenMP data structure.
int pargemslr::PargemslrInit | ( | int * | argc, |
char *** | argv | ||
) |
Initilize MPI, OpenMP, and CUDA. Note that if you have already called MPI_Init, call other init functions instead.
[in,out] | argc | Input of the main function. |
[in,out] | argv | Input of the main function. |
int pargemslr::PargemslrInitCUDA | ( | ) |
Initilize CUDA.
int pargemslr::PargemslrInitMpi | ( | MPI_Comm | comm | ) |
Initilize MPI data struct with MPI_Comm. The ParGEMSLR package will duplicate this MPI_Comm.
[in] | comm | The comm for ParGEMSLR, typically should be MPI_COMM_WORLD. |
int pargemslr::PargemslrInitOpenMP | ( | int | nthreads | ) |
Initilize OpenMP and MKL.
[in] | nthreads | The max number of OpenMP threads. |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiAllgather | ( | T * | sendbuf, |
int | count, | ||
T * | recvbuf, | ||
MPI_Comm | comm | ||
) |
MPI_Allgather.
[in] | sendbuf | Pointer to the send data. |
[in] | count | Size of each single send/recv. |
[out] | recvbuf | Pointer to the recv data. |
[in] | comm | MPI_Comm. |
std::enable_if< PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiAllgather | ( | T * | sendbuf, |
int | count, | ||
T * | recvbuf, | ||
MPI_Comm | comm | ||
) |
MPI_Allgather.
[in] | sendbuf | Pointer to the send data. |
[in] | count | Size of each single send/recv. |
[out] | recvbuf | Pointer to the recv data. |
[in] | comm | MPI_Comm. |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiAllgatherv | ( | T * | sendbuf, |
int | count, | ||
T * | recvbuf, | ||
int * | recvcounts, | ||
int * | recvdisps, | ||
MPI_Comm | comm | ||
) |
MPI_Allgatherv.
[in] | sendbuf | Pointer to the send data. |
[in] | count | Size of each single send/recv. |
[out] | recvbuf | Pointer to the recv data. |
[in] | recvcounts | Number of elements on each processor. |
[in] | recvdisps | Displacement of elements on each processor. |
[in] | comm | MPI_Comm. |
std::enable_if< PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiAllgatherv | ( | T * | sendbuf, |
int | count, | ||
T * | recvbuf, | ||
int * | recvcounts, | ||
int * | recvdisps, | ||
MPI_Comm | comm | ||
) |
MPI_Allgatherv.
[in] | sendbuf | Pointer to the send data. |
[in] | count | Size of each single send/recv. |
[out] | recvbuf | Pointer to the recv data. |
[in] | recvcounts | Number of elements on each processor. |
[in] | recvdisps | Displacement of elements on each processor. |
[in] | comm | MPI_Comm. |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiAllreduce | ( | T * | sendbuf, |
T * | recvbuf, | ||
int | count, | ||
MPI_Op | op, | ||
MPI_Comm | comm | ||
) |
MPI_Allreduce.
[in] | sendbuf | Pointer to the send data. |
[out] | recvbuf | Pointer to the recv data. |
[in] | count | Number of elements. |
[in] | op | MPI_Op. |
[in] | comm | MPI_Comm. |
std::enable_if< PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiAllreduce | ( | T * | sendbuf, |
T * | recvbuf, | ||
int | count, | ||
MPI_Op | op, | ||
MPI_Comm | comm | ||
) |
MPI_Allreduce.
[in] | sendbuf | Pointer to the send data. |
[out] | recvbuf | Pointer to the recv data. |
[in] | count | Number of elements. |
[in] | op | MPI_Op. |
[in] | comm | MPI_Comm. |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiAllreduceInplace | ( | T * | buf, |
int | count, | ||
MPI_Op | op, | ||
MPI_Comm | comm | ||
) |
In place MPI_Allreduce.
[in,out] | buf | Pointer to the data. |
[in] | count | Number of elements. |
[in] | op | MPI_Op. |
[in] | comm | MPI_Comm. |
std::enable_if< PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiAllreduceInplace | ( | T * | buf, |
int | count, | ||
MPI_Op | op, | ||
MPI_Comm | comm | ||
) |
In place MPI_Allreduce.
[in,out] | buf | Pointer to the data. |
[in] | count | Number of elements. |
[in] | op | MPI_Op. |
[in] | comm | MPI_Comm. |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiBcast | ( | T * | buf, |
int | count, | ||
int | root, | ||
MPI_Comm | comm | ||
) |
MPI_Bcast.
[in,out] | buf | Pointer to the data. |
[in] | count | Number of elements. |
[in] | root | Root's MPI rank. |
[in] | comm | MPI_Comm. |
std::enable_if< PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiBcast | ( | T * | buf, |
int | count, | ||
int | root, | ||
MPI_Comm | comm | ||
) |
MPI_Bcast.
[in,out] | buf | Pointer to the data. |
[in] | count | Number of elements. |
[in] | root | Root's MPI rank. |
[in] | comm | MPI_Comm. |
MPI_Datatype pargemslr::PargemslrMpiDataType | ( | ) |
Get the MPI_Datatype.
MPI_Datatype pargemslr::PargemslrMpiDataType< complexd > | ( | ) |
Get the MPI_Datatype.
MPI_Datatype pargemslr::PargemslrMpiDataType< complexs > | ( | ) |
Get the MPI_Datatype.
MPI_Datatype pargemslr::PargemslrMpiDataType< double > | ( | ) |
Get the MPI_Datatype.
MPI_Datatype pargemslr::PargemslrMpiDataType< float > | ( | ) |
Get the MPI_Datatype.
MPI_Datatype pargemslr::PargemslrMpiDataType< int > | ( | ) |
Get the MPI_Datatype.
MPI_Datatype pargemslr::PargemslrMpiDataType< long int > | ( | ) |
Get the MPI_Datatype.
std::enable_if<!PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiGather | ( | T * | sendbuf, |
int | count, | ||
T * | recvbuf, | ||
int | root, | ||
MPI_Comm | comm | ||
) |
MPI_Gather.
[in] | sendbuf | Pointer to the send data. |
[in] | count | Size of each single send/recv. |
[out] | recvbuf | Pointer to the recv data. |
[in] | root | The MPI rank of the reciver. |
[in] | comm | MPI_Comm. |
std::enable_if< PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiGather | ( | T * | sendbuf, |
int | count, | ||
T * | recvbuf, | ||
int | root, | ||
MPI_Comm | comm | ||
) |
MPI_Gather.
[in] | sendbuf | Pointer to the send data. |
[in] | count | Size of each single send/recv. |
[out] | recvbuf | Pointer to the recv data. |
[in] | root | The MPI rank of the reciver. |
[in] | comm | MPI_Comm. |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiIrecv | ( | T * | buf, |
int | count, | ||
int | source, | ||
int | tag, | ||
MPI_Comm | comm, | ||
MPI_Request * | request | ||
) |
MPI_Irecv.
[in] | buf | Pointer to the data. |
[in] | count | Number of elements. |
[in] | dest | Rank of the source MPI rank. |
[in] | tag | Tag of the message. |
[in] | comm | MPI_Comm. |
[out] | request | MPI_Request. |
std::enable_if< PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiIrecv | ( | T * | buf, |
int | count, | ||
int | source, | ||
int | tag, | ||
MPI_Comm | comm, | ||
MPI_Request * | request | ||
) |
MPI_Irecv.
[in] | buf | Pointer to the data. |
[in] | count | Number of elements. |
[in] | source | Rank of the source MPI rank. |
[in] | tag | Tag of the message. |
[in] | comm | MPI_Comm. |
[out] | request | MPI_Request. |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiIsend | ( | T * | buf, |
int | count, | ||
int | dest, | ||
int | tag, | ||
MPI_Comm | comm, | ||
MPI_Request * | request | ||
) |
MPI_Isend.
[in] | buf | Pointer to the data. |
[in] | count | Number of elements. |
[in] | dest | Rank of the target MPI rank. |
[in] | tag | Tag of the message. |
[in] | comm | MPI_Comm. |
[out] | request | MPI_Request. |
std::enable_if< PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiIsend | ( | T * | buf, |
int | count, | ||
int | dest, | ||
int | tag, | ||
MPI_Comm | comm, | ||
MPI_Request * | request | ||
) |
MPI_Isend.
[in] | buf | Pointer to the data. |
[in] | count | Number of elements. |
[in] | dest | Rank of the target MPI rank. |
[in] | tag | Tag of the message. |
[in] | comm | MPI_Comm. |
[out] | request | MPI_Request. |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiRecv | ( | T * | buf, |
int | count, | ||
int | source, | ||
int | tag, | ||
MPI_Comm | comm, | ||
MPI_Status * | status | ||
) |
MPI_Irecv.
[in] | buf | Pointer to the data. |
[in] | count | Number of elements. |
[in] | source | Rank of the source MPI rank. |
[in] | tag | Tag of the message. |
[in] | comm | MPI_Comm. |
[out] | status | MPI_Status. |
std::enable_if< PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiRecv | ( | T * | buf, |
int | count, | ||
int | source, | ||
int | tag, | ||
MPI_Comm | comm, | ||
MPI_Status * | status | ||
) |
MPI_Irecv.
[in] | buf | Pointer to the data. |
[in] | count | Number of elements. |
[in] | source | Rank of the source MPI rank. |
[in] | tag | Tag of the message. |
[in] | comm | MPI_Comm. |
[out] | status | MPI_Status. |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiReduce | ( | T * | sendbuf, |
T * | recvbuf, | ||
int | count, | ||
MPI_Op | op, | ||
int | root, | ||
MPI_Comm | comm | ||
) |
MPI_Reduce.
[in] | sendbuf | Pointer to the send data. |
[out] | recvbuf | Pointer to the recv data. |
[in] | count | Number of elements. |
[in] | op | MPI_Op. |
[in] | root | Root's MPI rank. |
[in] | comm | MPI_Comm. |
std::enable_if< PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiReduce | ( | T * | sendbuf, |
T * | recvbuf, | ||
int | count, | ||
MPI_Op | op, | ||
int | root, | ||
MPI_Comm | comm | ||
) |
MPI_Reduce.
[in] | sendbuf | Pointer to the send data. |
[out] | recvbuf | Pointer to the recv data. |
[in] | count | Number of elements. |
[in] | op | MPI_Op. |
[in] | root | Root's MPI rank. |
[in] | comm | MPI_Comm. |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiScan | ( | T * | sendbuf, |
T * | recvbuf, | ||
int | count, | ||
MPI_Op | op, | ||
MPI_Comm | comm | ||
) |
MPI_Scan.
[in] | sendbuf | Pointer to the send data. |
[out] | recvbuf | Pointer to the recv data. |
[in] | count | Number of elements. |
[in] | op | MPI_Op. |
[in] | comm | MPI_Comm. |
std::enable_if< PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiScan | ( | T * | sendbuf, |
T * | recvbuf, | ||
int | count, | ||
MPI_Op | op, | ||
MPI_Comm | comm | ||
) |
MPI_Scan.
[in] | sendbuf | Pointer to the send data. |
[out] | recvbuf | Pointer to the recv data. |
[in] | count | Number of elements. |
[in] | op | MPI_Op. |
[in] | comm | MPI_Comm. |
std::enable_if<!PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiSend | ( | T * | buf, |
int | count, | ||
int | dest, | ||
int | tag, | ||
MPI_Comm | comm | ||
) |
MPI_Send.
[in] | buf | Pointer to the data. |
[in] | count | Number of elements. |
[in] | dest | Rank of the target MPI rank. |
[in] | tag | Tag of the message. |
[in] | comm | MPI_Comm. |
std::enable_if< PargemslrIsComplex< T >::value, int >::type pargemslr::PargemslrMpiSend | ( | T * | buf, |
int | count, | ||
int | dest, | ||
int | tag, | ||
MPI_Comm | comm | ||
) |
MPI_Send.
[in] | buf | Pointer to the data. |
[in] | count | Number of elements. |
[in] | dest | Rank of the target MPI rank. |
[in] | tag | Tag of the message. |
[in] | comm | MPI_Comm. |
[out] | request | MPI_Request. |
int pargemslr::PargemslrMpiTime | ( | MPI_Comm | comm, |
double & | t | ||
) |
Get current time using MPI_Wtime.
[in] | comm | The MPI_Comm. |
[out] | t | The time. |
int pargemslr::PargemslrNLocalToNGlobal | ( | int | n_local, |
long int & | n_start, | ||
long int & | n_global, | ||
MPI_Comm & | comm | ||
) |
Each MPI rank holds n_local, get the n_start and n_global.
[in] | n_local | The local size. |
[out] | n_start | The start index. |
[out] | n_global | The global size. |
[out] | comm | The MPI_comm. |
int pargemslr::PargemslrNLocalToNGlobal | ( | int | nrow_local, |
int | ncol_local, | ||
long int & | nrow_start, | ||
long int & | ncol_start, | ||
long int & | nrow_global, | ||
long int & | ncol_global, | ||
MPI_Comm & | comm | ||
) |
Each MPI rank holds two n_locals, get the n_starts and n_globals.
[in] | nrow_local | The first local size. |
[in] | ncol_local | The second local size. |
[out] | nrow_start | The first start index. |
[out] | ncol_start | The second start index. |
[out] | nrow_global | The first global size. |
[out] | ncol_global | The second global size. |
[out] | comm | The MPI_comm. |
int pargemslr::PargemslrPrintParallelInfo | ( | ) |
Print the parallel information to output.
int pargemslr::PargemslrSetOpenmpNumThreads | ( | int | nthreads | ) |
Set the OpenMP thread number for each MPI process.
[in] | nthreads | The number of threads per MPI process. |