|
36 | 36 | namespace coreneuron { |
37 | 37 |
|
38 | 38 | struct corenrn_parameters { |
39 | | - |
40 | | - enum verbose_level : std::uint32_t |
41 | | - { |
42 | | - NONE = 0, |
43 | | - ERROR = 1, |
44 | | - INFO = 2, |
45 | | - DEBUG = 3, |
46 | | - DEFAULT = INFO |
47 | | - }; |
48 | | - |
49 | | - const int report_buff_size_default=4; |
50 | | - |
51 | | - unsigned spikebuf=100'000; /// Internal buffer used on every rank for spikes |
52 | | - int prcellgid=-1; /// Gid of cell for prcellstate |
53 | | - unsigned ms_phases=2; /// Number of multisend phases, 1 or 2 |
54 | | - unsigned ms_subint=2; /// Number of multisend interval. 1 or 2 |
55 | | - unsigned spkcompress=0; /// Spike Compression |
56 | | - unsigned cell_interleave_permute=0; /// Cell interleaving permutation |
57 | | - unsigned nwarp=0; /// Number of warps to balance for cell_interleave_permute == 2 |
58 | | - unsigned report_buff_size=report_buff_size_default; ///Size in MB of the report buffer. |
59 | | - int seed=-1; /// Initialization seed for random number generator (int) |
60 | | - |
61 | | - bool mpi_enable=false; /// Enable MPI flag. |
62 | | - bool skip_mpi_finalize=false; /// Skip MPI finalization |
63 | | - bool multisend=false; /// Use Multisend spike exchange instead of Allgather. |
64 | | - bool threading=false; /// Enable pthread/openmp |
65 | | - bool gpu=false; /// Enable GPU computation. |
66 | | - bool binqueue=false; /// Use bin queue. |
67 | | - |
68 | | - bool show_version=false; /// Print version and exit. |
69 | | - |
70 | | - bool count_mechs=false; /// Print mechanism counts after initialization |
71 | | - |
72 | | - verbose_level verbose{verbose_level::DEFAULT}; /// Verbosity-level |
73 | | - |
74 | | - double tstop=100; /// Stop time of simulation in msec |
75 | | - double dt=-1000.0; /// Timestep to use in msec |
76 | | - double dt_io=0.1; /// I/O timestep to use in msec |
77 | | - double dt_report; /// I/O timestep to use in msec for reports |
78 | | - double celsius=-1000.0; /// Temperature in degC. |
79 | | - double voltage=-65.0; /// Initial voltage used for nrn_finitialize(1, v_init). |
80 | | - double forwardskip=0.; /// Forward skip to TIME. |
81 | | - double mindelay=10.; /// Maximum integration interval (likely reduced by minimum NetCon delay). |
82 | | - |
83 | | - std::string patternstim; /// Apply patternstim using the specified spike file. |
84 | | - std::string datpath="."; /// Directory path where .dat files |
85 | | - std::string outpath="."; /// Directory where spikes will be written |
86 | | - std::string filesdat="files.dat"; /// Name of file containing list of gids dat files read in |
87 | | - std::string restorepath; /// Restore simulation from provided checkpoint directory. |
88 | | - std::string reportfilepath; /// Reports configuration file. |
89 | | - std::string checkpointpath; /// Enable checkpoint and specify directory to store related files. |
90 | | - std::string writeParametersFilepath; /// Write parameters to this file |
91 | | - |
92 | | - CLI::App app{"CoreNeuron - Optimised Simulator Engine for NEURON."}; ///CLI app that performs CLI parsing |
93 | | - |
94 | | - corenrn_parameters(); ///Constructor that initializes the CLI11 app. |
95 | | - |
96 | | - void parse(int argc, char* argv[]); /// Runs the CLI11_PARSE macro. |
97 | | - |
98 | | - inline bool is_quiet() { return verbose == verbose_level::NONE; } |
99 | | - |
| 39 | + enum verbose_level : std::uint32_t { NONE = 0, ERROR = 1, INFO = 2, DEBUG = 3, DEFAULT = INFO }; |
| 40 | + |
| 41 | + const int report_buff_size_default = 4; |
| 42 | + |
| 43 | + unsigned spikebuf = 100'000; /// Internal buffer used on every rank for spikes |
| 44 | + int prcellgid = -1; /// Gid of cell for prcellstate |
| 45 | + unsigned ms_phases = 2; /// Number of multisend phases, 1 or 2 |
| 46 | + unsigned ms_subint = 2; /// Number of multisend interval. 1 or 2 |
| 47 | + unsigned spkcompress = 0; /// Spike Compression |
| 48 | + unsigned cell_interleave_permute = 0; /// Cell interleaving permutation |
| 49 | + unsigned nwarp = 0; /// Number of warps to balance for cell_interleave_permute == 2 |
| 50 | + unsigned report_buff_size = report_buff_size_default; /// Size in MB of the report buffer. |
| 51 | + int seed = -1; /// Initialization seed for random number generator (int) |
| 52 | + |
| 53 | + bool mpi_enable = false; /// Enable MPI flag. |
| 54 | + bool skip_mpi_finalize = false; /// Skip MPI finalization |
| 55 | + bool multisend = false; /// Use Multisend spike exchange instead of Allgather. |
| 56 | + bool threading = false; /// Enable pthread/openmp |
| 57 | + bool gpu = false; /// Enable GPU computation. |
| 58 | + bool binqueue = false; /// Use bin queue. |
| 59 | + |
| 60 | + bool show_version = false; /// Print version and exit. |
| 61 | + |
| 62 | + bool count_mechs = false; /// Print mechanism counts after initialization |
| 63 | + |
| 64 | + verbose_level verbose{verbose_level::DEFAULT}; /// Verbosity-level |
| 65 | + |
| 66 | + double tstop = 100; /// Stop time of simulation in msec |
| 67 | + double dt = -1000.0; /// Timestep to use in msec |
| 68 | + double dt_io = 0.1; /// I/O timestep to use in msec |
| 69 | + double dt_report; /// I/O timestep to use in msec for reports |
| 70 | + double celsius = -1000.0; /// Temperature in degC. |
| 71 | + double voltage = -65.0; /// Initial voltage used for nrn_finitialize(1, v_init). |
| 72 | + double forwardskip = 0.; /// Forward skip to TIME. |
| 73 | + double mindelay = 10.; /// Maximum integration interval (likely reduced by minimum NetCon |
| 74 | + /// delay). |
| 75 | + |
| 76 | + std::string patternstim; /// Apply patternstim using the specified spike file. |
| 77 | + std::string datpath = "."; /// Directory path where .dat files |
| 78 | + std::string outpath = "."; /// Directory where spikes will be written |
| 79 | + std::string filesdat = "files.dat"; /// Name of file containing list of gids dat files read in |
| 80 | + std::string restorepath; /// Restore simulation from provided checkpoint directory. |
| 81 | + std::string reportfilepath; /// Reports configuration file. |
| 82 | + std::string checkpointpath; /// Enable checkpoint and specify directory to store related files. |
| 83 | + std::string writeParametersFilepath; /// Write parameters to this file |
| 84 | + |
| 85 | + CLI::App app{"CoreNeuron - Optimised Simulator Engine for NEURON."}; /// CLI app that performs |
| 86 | + /// CLI parsing |
| 87 | + |
| 88 | + corenrn_parameters(); /// Constructor that initializes the CLI11 app. |
| 89 | + |
| 90 | + void parse(int argc, char* argv[]); /// Runs the CLI11_PARSE macro. |
| 91 | + |
| 92 | + inline bool is_quiet() { |
| 93 | + return verbose == verbose_level::NONE; |
| 94 | + } |
100 | 95 | }; |
101 | 96 |
|
102 | | -std::ostream& operator<<(std::ostream& os, const corenrn_parameters& corenrn_param); /// Printing method. |
| 97 | +std::ostream& operator<<(std::ostream& os, |
| 98 | + const corenrn_parameters& corenrn_param); /// Printing method. |
103 | 99 |
|
104 | | -extern corenrn_parameters corenrn_param; /// Declaring global corenrn_parameters object for this instance of CoreNeuron. |
105 | | -extern int nrn_nobanner_; /// Global no banner setting |
| 100 | +extern corenrn_parameters corenrn_param; /// Declaring global corenrn_parameters object for this |
| 101 | + /// instance of CoreNeuron. |
| 102 | +extern int nrn_nobanner_; /// Global no banner setting |
106 | 103 |
|
107 | 104 | } // namespace coreneuron |
108 | 105 |
|
109 | | -#endif //CN_PARAMETERS_H |
| 106 | +#endif // CN_PARAMETERS_H |
0 commit comments