Loading [MathJax]/extensions/tex2jax.js
MAIA bb96820c
Multiphysics at AIA
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
globalmpiinfo.cpp File Reference

Go to the source code of this file.

Functions

void printMpiInfo (MPI_Info &mpiInfo)
 Print all information of the given MPI_Info object. More...
 

Variables

GlobalMpiInformation g_mpiInformation
 

Function Documentation

◆ printMpiInfo()

void printMpiInfo ( MPI_Info &  mpiInfo)

Print all information of given MPI_Info object.

Definition at line 14 of file globalmpiinfo.cpp.

14 {
15 MInt i, nkeys;
16
17 MPI_Info_get_nkeys(mpiInfo, &nkeys, AT_);
18 std::cerr << "MPI Info: nkeys = " << nkeys << std::endl;
19 for(i = 0; i < nkeys; i++) {
20 char key[MPI_MAX_INFO_KEY], value[MPI_MAX_INFO_VAL];
21 MInt valuelen, flag;
22
23 MPI_Info_get_nthkey(mpiInfo, i, key, AT_);
24 MPI_Info_get_valuelen(mpiInfo, key, &valuelen, &flag, AT_);
25 MPI_Info_get(mpiInfo, key, valuelen + 1, value, &flag, AT_);
26 std::cerr << "MPI Info: [" << i << "] key = " << key << ", value = " << value << std::endl;
27 }
28}
int32_t MInt
Definition: maiatypes.h:62
int MPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value, int *flag, const MString &name)
same as MPI_Info_get
int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, int *flag, const MString &name)
same as MPI_Info_get_valuelen
int MPI_Info_get_nthkey(MPI_Info info, int n, char *key, const MString &name)
same as MPI_Info_get_nthkey
int MPI_Info_get_nkeys(MPI_Info info, int *nkeys, const MString &name)
same as MPI_Info_get_nkeys

Variable Documentation

◆ g_mpiInformation

GlobalMpiInformation g_mpiInformation

Definition at line 10 of file globalmpiinfo.cpp.