43 namespace LibUtilities
55 MPI_Initialized(&init);
56 ASSERTL0(!init,
"MPI has already been initialised.");
58 int retval = MPI_Init(&narg, &arg);
59 if (retval != MPI_SUCCESS)
61 ASSERTL0(
false,
"Failed to initialise MPI");
64 std::string localName =
"";
65 for (
int i = 0; i < narg; ++i)
67 if (!std::strcmp(arg[i],
"--cwipi"))
69 localName = arg[i + 1];
74 cwipi_init(MPI_COMM_WORLD, localName.c_str(), &localComm);
80 m_type =
"Parallel MPI with CWIPI";
#define ASSERTL0(condition, msg)
static CommSharedPtr create(int narg, char *arg[])
Creates an instance of this class.
static std::string className
Name of class.
virtual void v_Finalise()
CommCwipi(int narg, char *arg[])
int m_size
Number of processes.
std::string m_type
Type of communication.
virtual void v_Finalise()
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
CommFactory & GetCommFactory()