8 #include "MPI_GridEnvironment.h"
11 #include "functions_array.h"
29 static CORE_UniquePointer<MPI_Environment> mEnvironment;
76 std::vector<tMPICoreId> coresGrid;
79 (functions_array::parse(gridS,coresGrid)) &&
80 (coresGrid.size()<3) &&
81 (coresGrid.size()>0) &&
82 (functions_array::product(coresGrid)>=1) ) {
84 switch(coresGrid.size()) {
109 mEnvironment.reset();
115 return *mEnvironment.get();
141 std::cout<<
" usage mpiexec -n <nCores> "<<
GetSoftName()<<
" --file=<.grid file> load \n";
This class is an list of options.
Definition: CORE_OptionsList.h:36
static tBoolean ReadOption(int nArgs, char *argv[], const tBoolean &isCaseSensitive, const tString &optionName, tString &optionValue)
read the only the option with optionName in command line
Definition: CORE_OptionsList.cpp:260
This class is a Run class for core package.
Definition: CORE_Run.h:44
virtual tBoolean printHelp(const CORE_OptionsList &options) const
print the help
Definition: CORE_Run.cpp:209
virtual tMemSize getContentsMemorySize() const override
return the memory size in byte
Definition: CORE_Run.h:100
static const tString & GetSoftName()
get soft name
Definition: CORE_Run.h:115
This class is a Environment class to define MPI world.
Definition: MPI_Environment.h:36
static void GetCoreId(tMPICoreId &id)
get the id of the current process of common environment
Definition: MPI_Environment.h:210
static CORE_UniquePointer< MPI_Environment > New(int argc, char *argv[], const tBoolean &isOpenMPEnabled)
create a test class
Definition: MPI_Environment.h:116
static CORE_UniquePointer< SelfClass > New(const std::array< tMPICoreId, N > &nCoresPerDirection, int &argc, char *argv[], const tBoolean &isOpenMPEnabled)
create a new cart environment
Definition: MPI_GridEnvironment.h:129
This class is a Run class for MPI package.
Definition: MPI_Run.h:24
static MPI_Environment & GetEnvironment()
get the environment
Definition: MPI_Run.h:114
virtual tBoolean printHelp(const CORE_OptionsList &options) const override
print the help
Definition: MPI_Run.h:136
virtual void setLogOptions(const CORE_OptionsList &options) const override
create the output stream from the options
Definition: MPI_Run.h:128
virtual tMemSize getMemorySize() const override
return the memory size of the class and the memory size of all its attributes/associations
Definition: MPI_Run.h:67
static void FinalizeEnvironment()
finalize the environment
Definition: MPI_Run.h:108
static void SetLogOptions(const CORE_OptionsList &options)
create the output stream from the options
Definition: MPI_Run.cpp:21
static void InitializeEnvironment(int argc, char *argv[], const tBoolean &isOpenMPEnabled)
initialize the environment
Definition: MPI_Run.h:74
MPI_Run()
create
Definition: MPI_Run.cpp:9
static void InitializeEnvironment(int argc, char *argv[])
initialize the environment
Definition: MPI_Run.h:103
virtual ~MPI_Run(void)
destroy
Definition: MPI_Run.cpp:14