C++ mpi module for stochmagnet_main Package
SMOMPI_Options.h
1 #ifndef SMOMPI_Options_H
2 #define SMOMPI_Options_H
3 
4 //base class inherits header
5 #include "SM_Options.h"
6 
7 //mpi options
8 #include "MPI_Options.h"
9 
10 
18 class SMOMPI_Options : public SM_Options {
19 
20  //attributes
21 private :
22  MPI_Options mMPIOptions;
23 
24 
25 public:
26  // CONSTRUCTORS
30  }
31 
32  // DESTRUCTORS
35  virtual ~SMOMPI_Options(void) {
36  }
37 
38 
39 
40 public :
41  //MEMORY
42 
56  virtual tMemSize getMemorySize() const {
57  return sizeof(*this)+mMPIOptions.getContentsMemorySize()+getContentsMemorySize();
58  }
59 
60 
61  //shared pointer methods
62  //======================
63 
67  static inline CORE_UniquePointer<SMOMPI_Options> New() {
68  return CORE_UniquePointer<SMOMPI_Options>(new SMOMPI_Options(),
70  }
71 
72 
73  // MAIN Method
74 
75 public:
76 
77 public:
81  virtual void initManOptions(CORE_OptionsList& manParameters) const override {
82  SM_Options::initManOptions(manParameters);
83  mMPIOptions.initManOptions(manParameters);
84  tString tab="\n\t\t\t";
85 
86  //threads
87  manParameters.setManOption("openmpi","cores-number","the number of core to compute root system integration with mpi module");
88  manParameters.setManOption("runner: generate-dipolar-map","dipolar-map-type","the dipolar map type i {'center-spin','map-spin'}");
89 
90  }
91 
92 
93 
94 
98  virtual void initOptions(CORE_OptionsList& options) const override {
99  SM_Options::initOptions(options);
100  mMPIOptions.initOptions(options);
101 
102  }
103 
104 
105 
106 };
107 
108 
109 #endif
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:278
This class is an list of options.
Definition: CORE_OptionsList.h:36
void setManOption(const tString &category, const tString &optName, const tString &man)
set man option
Definition: CORE_OptionsList.h:187
This class is the options of the runner.
Definition: MPI_Options.h:16
virtual void initOptions(CORE_OptionsList &options) const
default initialization of the options
Definition: MPI_Options.h:91
virtual void initManOptions(CORE_OptionsList &options) const
init the man of the options
Definition: MPI_Options.h:78
This class is the options runner.
Definition: SMOMPI_Options.h:18
virtual ~SMOMPI_Options(void)
destroy class instance
Definition: SMOMPI_Options.h:35
virtual void initOptions(CORE_OptionsList &options) const override
default initialization of the options
Definition: SMOMPI_Options.h:98
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SMOMPI_Options.h:56
SMOMPI_Options(void)
create class instance
Definition: SMOMPI_Options.h:29
virtual void initManOptions(CORE_OptionsList &manParameters) const override
init the man of the options
Definition: SMOMPI_Options.h:81
static CORE_UniquePointer< SMOMPI_Options > New()
return a new unique pointer of this
Definition: SMOMPI_Options.h:67
This class is the options of the package.
Definition: SM_Options.h:14
virtual void initManOptions(CORE_OptionsList &options) const override
init the man of the options
Definition: SM_Options.h:79
virtual void initOptions(CORE_OptionsList &options) const override
default initialization of the options
Definition: SM_Options.h:205