Branch data Line data Source code
1 : : // *****************************************************************************
2 : : /*!
3 : : \file src/Control/Keywords.hpp
4 : : \copyright 2012-2015 J. Bakosi,
5 : : 2016-2018 Los Alamos National Security, LLC.,
6 : : 2019-2021 Triad National Security, LLC.
7 : : All rights reserved. See the LICENSE file for details.
8 : : \brief Definition of all keywords
9 : : \details This file contains the definition of all keywords, including those
10 : : of command-line argument parsers as well as input, i.e., control, file
11 : : parsers. All keywords are shared among all parsers of all executables.
12 : :
13 : : All keywords are case-sensitive.
14 : :
15 : : The information contained in this file is used to build data structures for
16 : : on-screen help on the command-line arguments and control file keywords,
17 : : available via the --help, --helpctr, and --helpkw command-line arguments.
18 : :
19 : : A note on design: Defining structs that have static member functions
20 : : returning a std::string is a way of storing C++-style strings at
21 : : compile-time (which is not possible in a straightforward manner at this
22 : : time). This could also be done with C-style const char* as well. The
23 : : '*_info' structs store these strings, which then is used to specialize the
24 : : _kw::keyword_ template, defined in Control/Keyword.hpp. Specializing the
25 : : _keyword_ template also requires a specification of the precise string of
26 : : characters that make up a keyword eventually matched by the parsers. Since
27 : : these are all template arguments, the construction of keywords, their help,
28 : : as well as all grammars, are entirely assembled at compile-time. Since the
29 : : '*_info' struct member functions are static, they can be called without
30 : : instantiating an object and thus available at compile-time.
31 : :
32 : : The definition of an '*_info' struct _requires_ at least the name, short,
33 : : and long descriptions, defined by member functions _name()_,
34 : : _shortDescription()_, and _longDescription()_, respectively. Everything else
35 : : is optional. However, when adding a new keyword it is highly recommended to
36 : : define all of the _optional_ members if they make sense for the given
37 : : keyword. If an expect value type is also given, that can be hooked up into
38 : : where it is used.
39 : :
40 : : The most general definition of a keyword is as follows:
41 : :
42 : : \code{.cpp}
43 : : // Keyword info definition
44 : : struct keyword_info {
45 : :
46 : : // Required very short name, usually a single word or (for e.g.
47 : : // policies) a single character. This can be the keyword itself, but
48 : : // does not have to be. This field is used as an id of the option or
49 : : // setting.
50 : : static std::string name() { return "Name"; }
51 : :
52 : : // Required short keyword description
53 : : static std::string shortDescription() { return "Short description"; }
54 : :
55 : : // Required detailed keyword description. This returns a string literal,
56 : : // since this is usually multi-line and it is less work to maintain this
57 : : // way.
58 : : static std::string longDescription() { return
59 : : R"(Longer, possibly multi-line description of the keyword. Example
60 : : usage of the keyword is welcome here. Don't worry about formatting:
61 : : when this field is printed, extra spaces will be removed and line
62 : : breaks will be inserted.)";
63 : : }
64 : :
65 : : // Optional keyword alias. See also kw::Alias and
66 : : // <tpl_install_dir>/include/pegtl/pegtl/constants.hh for examples
67 : : // of what can be passed as template arguments (basically single
68 : : // characters). The one below defines the character 'c' as the alias.
69 : : // Aliases are single character long. The idea of an alias is to have a
70 : : // long as well as a short keyword for the same functionality.
71 : : // Currently, this is only hooked up for command-line arguments and not
72 : : // for control-file keywords, which is intentional. Command-line
73 : : // arguments are a lot less than control file keywords and are more
74 : : // frequently typed by the user. Thus command-line argument aliases are
75 : : // user-friendly. There are many control file keywords and aliases would
76 : : // only cause confusion. Defining an alias for a command-line argument
77 : : // enables the command-line parser to match on '--longer_keyword' as
78 : : // well as on '-c'. Depending on whether the alias typedef is defined
79 : : // for a keyword or not, the correct grammar is automatically generated
80 : : // at compile-time, matching on both the longer keyword as well as on
81 : : // the alias. Defining an alias for a control file keyword can be done
82 : : // but has no effect in a control file parser.
83 : : using alias = Alias< c >;
84 : :
85 : : // Optional single-character (policy) code. See also kw::Code and
86 : : // <tpl_install_dir/include/pegtl/pegtl/constants.hh for examples
87 : : // of what can be passed as template arguments (basically single
88 : : // characters). The one below defines the character 'C' as the (policy)
89 : : // code. This code is used for abbreviating policies used to configure
90 : : // various orthogonal behaviors of classes using policy-based design.
91 : : using code = Code< C >;
92 : :
93 : : // Optional expected data for the keyword - bundled to struct expect.
94 : : // This struct is entirely optional within a keyword definition.
95 : : // However, if it is defined, it must at least define the static member
96 : : // function description() which returns the description of the type the
97 : : // keyword expects. It may also optionally define the following fields:
98 : : //
99 : : // - type - defining the expected type
100 : : // - lower - lower bound of the expected value
101 : : // - upper - upper bound of the expected value
102 : : // - choices - valid choices for the expected value
103 : : //
104 : : struct expect {
105 : :
106 : : // If this struct is defined, required expected type description, max
107 : : // 10 characters long
108 : : static std::string description() { return "int"; }
109 : :
110 : : // Optional expected type
111 : : using type = std::streamsize;
112 : :
113 : : // Optional expected value lower bound
114 : : static const type lower = 1;
115 : :
116 : : // Optional expected value upper bound
117 : : static const type upper = 10;
118 : :
119 : : // Optional expected valid choices description, here giving
120 : : // information on the expected type and the valid bounds. Note that
121 : : // this can be any string, but if they exist, it is a good idea give
122 : : // at least some information on the bounds, as below, since the bounds
123 : : // are NOT displayed in the help for a keyword. This decision keeps
124 : : // the bounds specifications generic since they can be any type. As a
125 : : // result, the help structures, defined in HelpFactory.hpp, are simpler
126 : : // as they do not have to be parameterized by the type of the bounds,
127 : : // which greatly simplifies that code.
128 : : static std::string choices() {
129 : : return "integer [" + std::to_string(lower) + "..." +
130 : : std::to_string(upper) + ']';
131 : : }
132 : :
133 : : };
134 : :
135 : : };
136 : :
137 : : // Keyword definition, passing the above info struct as the first
138 : : // template argument, and the rest of the template arguments are the
139 : : // characters of the keyword to be matched by the parser. Remember: all
140 : : // keywords are case-sensitive. This one contrived example below defines
141 : : // keyword 'kw', matching the keyword 'KeYwOrD'.
142 : : using kw = keyword< keyword_info, K,e,Y,w,O,r,D >;
143 : : \endcode
144 : : \see Control/Keyword.hpp
145 : : \see Control/HelpFactory.hpp
146 : : */
147 : : // *****************************************************************************
148 : : #ifndef Keywords_h
149 : : #define Keywords_h
150 : :
151 : : #include <limits>
152 : :
153 : : #undef I
154 : : #include <pegtl/contrib/alphabet.hpp>
155 : :
156 : : #include "Types.hpp"
157 : : #include "Keyword.hpp"
158 : : #include "QuinoaBuildConfig.hpp"
159 : :
160 : : //! Keywords used by all input deck and command line parsers
161 : : namespace kw {
162 : :
163 : : using namespace tao::pegtl::alphabet;
164 : :
165 : : struct end_info {
166 : : static std::string name() { return "end"; }
167 : : static std::string shortDescription() { return "End of an input block"; }
168 : : static std::string longDescription() { return
169 : : R"(The end of a block is given by the 'end' keyword in the input file.
170 : : Example: "rngs ... end".)";
171 : : }
172 : : };
173 : : using end = keyword< end_info, TAOCPP_PEGTL_STRING("end") >;
174 : :
175 : : struct help_info {
176 : : static std::string name() { return "help"; }
177 : : static std::string shortDescription() { return
178 : 2941 : R"(Display one-liner help on all command-line arguments)"; }
179 : : static std::string longDescription() { return
180 : 2941 : R"(Get a short one-liner help on all command-line arguments from an
181 : : executable. It also triggers the help from the Charm++ runtime system and in
182 : : addition to that of the executable, it also lists command-line arguments
183 : : from Converse Machine, Tracing, Load Balancer, Record/Replay, and Charm++
184 : : command-line parameters.)";
185 : : }
186 : : using alias = Alias< h >;
187 : : };
188 : : using help = keyword< help_info, TAOCPP_PEGTL_STRING("help") >;
189 : :
190 : : struct helpctr_info {
191 : : static std::string name() { return "helpctr"; }
192 : : static std::string shortDescription() { return
193 : 2900 : "Display one-liner help on all control file keywords"; }
194 : : static std::string longDescription() { return
195 : 2900 : R"(This keyword can be used to get a short one-liner help on all control
196 : : file keywords from an executable.)";
197 : : }
198 : : using alias = Alias< C >;
199 : : };
200 : : using helpctr = keyword< helpctr_info, TAOCPP_PEGTL_STRING("helpctr") >;
201 : :
202 : : struct helpkw_info {
203 : : static std::string name() { return "helpkw"; }
204 : : static std::string shortDescription() { return
205 : 2941 : "Display verbose help on a single keyword"; }
206 : : static std::string longDescription() { return
207 : 2941 : R"(This keyword can be used to get a verbose help on a single command-line
208 : : argument or control-file keyword (i.e., help on keyword) from an
209 : : executable.)";
210 : : }
211 : : using alias = Alias< H >;
212 : : struct expect {
213 : : using type = std::string;
214 [ + - ]: 2941 : static std::string description() { return "string"; }
215 : : };
216 : : };
217 : : using helpkw = keyword< helpkw_info, TAOCPP_PEGTL_STRING("helpkw") >;
218 : :
219 : : struct pdfs_info {
220 : : static std::string name() { return "PDFs block"; }
221 : : static std::string shortDescription() { return
222 : : "Start of probability density function (PDF) input block"; }
223 : : static std::string longDescription() { return
224 : : R"(This keyword is used to start a block in the input file containing the
225 : : descriptions and settings of requested output for probability density
226 : : functions (PDFs). Example: "pdfs mypdf( y1 : 1.0e-2 ) end", which
227 : : requests a single-variate PDF to be output to file, whose sample space
228 : : variable is y1, using automatic determination of the bounds of the sample
229 : : space, using 1.0e-2 as the sample space bin size, and call the PDF
230 : : "mypdf". For more info on the structure of the pdfs ... end block, see
231 : : doc/pages/statistics_output.dox.)";
232 : : }
233 : : };
234 : : using pdfs = keyword< pdfs_info, TAOCPP_PEGTL_STRING("pdfs") >;
235 : :
236 : : struct raw_info {
237 : : static std::string name() { return "raw"; }
238 : : static std::string shortDescription() { return
239 : : "Select the raw initialization policy"; }
240 : : static std::string longDescription() { return
241 : : R"(This keyword is used to select the raw
242 : : initialization policy. The initialization policy is used to specify how
243 : : the initial conditions are set at t = 0 before time-integration.
244 : : Example: "init raw", which selects raw initialization policy, which
245 : : leaves the memory uninitialized. Note that this option may behave
246 : : differently depending on the particular equation or physical model. See the
247 : : the init policies in DiffEq/InitPolicy.hpp for valid options.)"; }
248 : : };
249 : : using raw = keyword< raw_info, TAOCPP_PEGTL_STRING("raw") >;
250 : :
251 : : struct zero_info {
252 : : static std::string name() { return "zero"; }
253 : : static std::string shortDescription() { return
254 : : "Select the zero initialization policy"; }
255 : : static std::string longDescription() { return
256 : : R"(This keyword is used to select the zero
257 : : initialization policy. The initialization policy is used to specify how
258 : : the initial conditions are set at t = 0 before time-integration.
259 : : Example: "init zero", which selects zero initialization policy, which
260 : : puts zeros in memory. Note that this option may behave differently
261 : : depending on the particular equation or physical model. See the init
262 : : policies in DiffEq/InitPolicy.hpp for valid options.)"; }
263 : : };
264 : : using zero = keyword< zero_info, TAOCPP_PEGTL_STRING("zero") >;
265 : :
266 : : struct ncomp_info {
267 : : static std::string name() { return "ncomp"; }
268 : : static std::string shortDescription() { return
269 : : "Set number of scalar components for a system of differential equations"; }
270 : : static std::string longDescription() { return
271 : : R"(This keyword is used to specify the number of scalar
272 : : components of a vector. 'ncomp' means "number of components". It is also
273 : : used for specifying the number of scalar components of a transporter scalar
274 : : (see also the keywords 'transport').)";
275 : : }
276 : : struct expect {
277 : : using type = std::size_t;
278 : : static constexpr type lower = 1;
279 : : static std::string description() { return "uint"; }
280 : : };
281 : : };
282 : : using ncomp = keyword< ncomp_info, TAOCPP_PEGTL_STRING("ncomp") >;
283 : :
284 : : struct ttyi_info {
285 : : static std::string name() { return "ttyi"; }
286 : : static std::string shortDescription() { return
287 : : "Set screen output interval"; }
288 : : static std::string longDescription() { return
289 : : R"(This keyword is used to specify the interval in time steps for screen
290 : : output during a simulation.)";
291 : : }
292 : : struct expect {
293 : : using type = uint32_t;
294 : : static constexpr type lower = 0;
295 : : static std::string description() { return "uint"; }
296 : : };
297 : : };
298 : : using ttyi = keyword< ttyi_info, TAOCPP_PEGTL_STRING("ttyi") >;
299 : :
300 : : struct control_info {
301 : : static std::string name() { return "control"; }
302 : : static std::string shortDescription()
303 : 2900 : { return "Specify the control file name [REQUIRED]"; }
304 : : static std::string longDescription() { return
305 : 2900 : R"(This keyword is used to specify the name of the control file from which
306 : : detailed user input is parsed.)";
307 : : }
308 : : using alias = Alias< c >;
309 : : struct expect {
310 : : using type = std::string;
311 [ + - ]: 2900 : static std::string description() { return "string"; }
312 : : };
313 : : };
314 : : using control = keyword< control_info, TAOCPP_PEGTL_STRING("control") >;
315 : :
316 : : struct verbose_info {
317 : : static std::string name() { return "verbose"; }
318 : : static std::string shortDescription() { return
319 : 2941 : "Select verbose screen output"; }
320 : : static std::string longDescription() { return
321 : 2941 : R"(This keyword is used to select verbose screen-output as opposed to the
322 : : default quiet output. With quiet output only the most important messages
323 : : are echoed to screen.)";
324 : : }
325 : : using alias = Alias< v >;
326 : : };
327 : : using verbose = keyword< verbose_info, TAOCPP_PEGTL_STRING("verbose") >;
328 : :
329 : : struct charestate_info {
330 : : static std::string name() { return "charestate"; }
331 : : static std::string shortDescription() { return
332 : 2941 : "Enable verbose chare state screen output"; }
333 : : static std::string longDescription() { return
334 : 2941 : R"(This keyword is used to enable verbose Charm++ chare state collection and
335 : : screen output. The chare state is displayed after a run is finished and the
336 : : data collected is grouped by chare id (thisIndex), and within groups data
337 : : is ordered by the time-stamp when a given chare member function is
338 : : called. See src/Base/ChareState.hpp for details on what is collected. Note
339 : : that to collect chare state, the given chare must be instrumented. Note that
340 : : if quescence detection is enabled,
341 : : chare state collection is also automatically enabled, but the chare state is
342 : : only output if quiescence is detected (which also triggers an error).)";
343 : : }
344 : : using alias = Alias< S >;
345 : : };
346 : : using charestate = keyword< charestate_info, TAOCPP_PEGTL_STRING("state") >;
347 : :
348 : : struct benchmark_info {
349 : : static std::string name() { return "benchmark"; }
350 : 2900 : static std::string shortDescription() { return "Select benchmark mode"; }
351 : : static std::string longDescription() { return
352 : 2900 : R"(This keyword is used to select benchmark mode. In benchmark mode no large
353 : : file output is performed, overriding the configuration in the control
354 : : file.)";
355 : : }
356 : : using alias = Alias< b >;
357 : : };
358 : :
359 : : using benchmark = keyword< benchmark_info, TAOCPP_PEGTL_STRING("benchmark") >;
360 : :
361 : : struct nonblocking_info {
362 : : static std::string name() { return "nonblocking"; }
363 : : static std::string shortDescription()
364 : 2900 : { return "Select non-blocking migration"; }
365 : : static std::string longDescription() { return
366 : 2900 : R"(This keyword is used to select non-blocking, instead of the default
367 : : blocking, migration. WARNING: This feature is experimental, not well
368 : : tested, and may not always work as expected.)";
369 : : }
370 : : using alias = Alias< n >;
371 : : };
372 : :
373 : : using nonblocking =
374 : : keyword< nonblocking_info, TAOCPP_PEGTL_STRING("nonblocking") >;
375 : :
376 : : struct lbfreq_info {
377 : : static std::string name() { return "Load balancing frequency"; }
378 : : static std::string shortDescription()
379 : 2900 : { return "Set load-balancing frequency during time stepping"; }
380 : : static std::string longDescription() { return
381 : 2900 : R"(This keyword is used to set the frequency of load-balancing during
382 : : time stepping. The default is 1, which means that load balancing is
383 : : initiated every time step. Note, however, that this does not necessarily
384 : : mean that load balancing will be performed by the runtime system every
385 : : time step, only that the Charm++ load-balancer is initiated. For more
386 : : information, see the Charm++ manual.)";
387 : : }
388 : : using alias = Alias< l >;
389 : : struct expect {
390 : : using type = std::size_t;
391 : : static constexpr type lower = 1;
392 : : static constexpr type upper = std::numeric_limits< type >::max()-1;
393 [ + - ]: 2900 : static std::string description() { return "int"; }
394 : 2900 : static std::string choices() {
395 [ + - ][ + - ]: 5800 : return "integer between [" + std::to_string(lower) + "..." +
[ + - ][ - + ]
[ - + ][ - + ]
[ + - ][ - - ]
[ - - ][ - - ]
[ - - ]
396 [ + - ]: 5800 : std::to_string(upper) + "] (both inclusive)";
397 : : }
398 : : };
399 : : };
400 : : using lbfreq = keyword< lbfreq_info, TAOCPP_PEGTL_STRING("lbfreq") >;
401 : :
402 : : struct rsfreq_info {
403 : : static std::string name() { return "Checkpoint/restart frequency"; }
404 : : static std::string shortDescription()
405 : 2900 : { return "Set checkpoint/restart frequency during time stepping"; }
406 : : static std::string longDescription() { return
407 : 2900 : R"(This keyword is used to set the frequency of dumping checkpoint/restart
408 : : files during time stepping. The default is 1000, which means that
409 : : checkpoint/restart files are dumped at every 1000th time step.)";
410 : : }
411 : : using alias = Alias< r >;
412 : : struct expect {
413 : : using type = std::size_t;
414 : : static constexpr type lower = 1;
415 : : static constexpr type upper = std::numeric_limits< type >::max()-1;
416 [ + - ]: 2900 : static std::string description() { return "int"; }
417 : 2900 : static std::string choices() {
418 [ + - ][ + - ]: 5800 : return "integer between [" + std::to_string(lower) + "..." +
[ + - ][ - + ]
[ - + ][ - + ]
[ + - ][ - - ]
[ - - ][ - - ]
[ - - ]
419 [ + - ]: 5800 : std::to_string(upper) + "] (both inclusive)";
420 : : }
421 : : };
422 : : };
423 : : using rsfreq = keyword< rsfreq_info, TAOCPP_PEGTL_STRING("rsfreq") >;
424 : :
425 : : struct feedback_info {
426 : : static std::string name() { return "feedback"; }
427 : 2900 : static std::string shortDescription() { return "Enable on-screen feedback"; }
428 : : static std::string longDescription() { return
429 : 2900 : R"(This keyword is used to enable more detailed on-screen feedback on
430 : : particular tasks and sub-tasks as they happen. This is useful for large
431 : : problems and debugging.)";
432 : : }
433 : : using alias = Alias< f >;
434 : : };
435 : : using feedback = keyword< feedback_info, TAOCPP_PEGTL_STRING("feedback") >;
436 : :
437 : : struct version_info {
438 : : static std::string name() { return "Show version"; }
439 : 2941 : static std::string shortDescription() { return "Show version information"; }
440 : : static std::string longDescription() { return
441 : 2941 : R"(This keyword is used to display version information for the
442 : : executable/tool on the standard output and exit successfully.)";
443 : : }
444 : : using alias = Alias< V >;
445 : : };
446 : : using version = keyword< version_info, TAOCPP_PEGTL_STRING("version") >;
447 : :
448 : : struct license_info {
449 : : static std::string name() { return "Show license"; }
450 : 2941 : static std::string shortDescription() { return "Show license information"; }
451 : : static std::string longDescription() { return
452 : 2941 : R"(This keyword is used to display license information for the
453 : : executable/tool on the standard output and exit successfully.)";
454 : : }
455 : : using alias = Alias< L >;
456 : : };
457 : : using license = keyword< license_info, TAOCPP_PEGTL_STRING("license") >;
458 : :
459 : : struct trace_info {
460 : : static std::string name() { return "trace"; }
461 : : static std::string shortDescription()
462 : 2941 : { return "Disable call and stack trace"; }
463 : 2941 : static std::string longDescription() { return R"(This keyword can be used to
464 : : disable the on-screen call trace and stack trace after an exception is
465 : : thrown. Trace output is on by default and in some cases, the call and
466 : : stack trace can be huge and not very helpful, hence this command line
467 : : option.)"; }
468 : : using alias = Alias< t >;
469 : : };
470 : : using trace = keyword< trace_info, TAOCPP_PEGTL_STRING("trace") >;
471 : :
472 : : struct quiescence_info {
473 : : static std::string name() { return "quiescence"; }
474 : : static std::string shortDescription()
475 : 2941 : { return "Enable quiescence detection"; }
476 : : static std::string longDescription() { return
477 : 2941 : R"(This keyword is used to enable the quiescence detection feature of
478 : : Charm++, used to catch logic errors in the asynchronous control flow,
479 : : resulting in deadlocks. This is useful for automated testing and
480 : : debugging and does have some overhead, so it is off by default.)";
481 : : }
482 : : using alias = Alias< q >;
483 : : };
484 : : using quiescence =
485 : : keyword< quiescence_info, TAOCPP_PEGTL_STRING("quiescence") >;
486 : :
487 : : struct virtualization_info {
488 : : static std::string name() { return "virtualization"; }
489 : : static std::string shortDescription() { return
490 : 2900 : R"(Set degree of virtualization)"; }
491 : : static std::string longDescription() { return
492 : 2900 : R"(This option is used to set the degree of virtualization
493 : : (over-decomposition). The virtualization parameter is a real number
494 : : between 0.0 and 1.0, inclusive, which controls the degree of
495 : : virtualization or over-decomposition. Independent of the value of
496 : : virtualization the work is approximately evenly distributed among the
497 : : available processing elements. For zero virtualization (no
498 : : over-decomposition), the work is simply decomposed into
499 : : total_work/numPEs, which yields the smallest number of Charm++ chares and
500 : : the largest chunks of work units. The other extreme is unity
501 : : virtualization, which decomposes the total work into the smallest size
502 : : work units possible, yielding the largest number of Charm++ chares.
503 : : Obviously, the optimum will be between 0.0 and 1.0, depending on the
504 : : problem.)";
505 : : }
506 : : using alias = Alias< u >;
507 : : struct expect {
508 : : using type = tk::real;
509 : : static constexpr type lower = 0.0;
510 : : static constexpr type upper = 1.0;
511 [ + - ]: 2900 : static std::string description() { return "real"; }
512 : 2900 : static std::string choices() {
513 [ + - ][ + - ]: 5800 : return "real between [" + std::to_string(lower) + "..." +
[ + - ][ - + ]
[ - + ][ - + ]
[ - + ][ - - ]
[ - - ][ - - ]
[ - - ]
514 [ + - ]: 5800 : std::to_string(upper) + "] (both inclusive)";
515 : : }
516 : : };
517 : : };
518 : : using virtualization =
519 : : keyword< virtualization_info, TAOCPP_PEGTL_STRING("virtualization") >;
520 : :
521 : : struct pdf_info {
522 : : static std::string name() { return "pdf"; }
523 : : static std::string shortDescription() { return
524 : : "Specify the name of the PDF output file"; }
525 : : static std::string longDescription() { return
526 : : R"(This keyword is used to specify the name of the output file in which to
527 : : store probability density functions (PDFs) during a simulation.)";
528 : : }
529 : : using alias = Alias< p >;
530 : : struct expect {
531 : : using type = std::string;
532 : : static std::string description() { return "string"; }
533 : : };
534 : : };
535 : : using pdf = keyword< pdf_info, TAOCPP_PEGTL_STRING("pdf") >;
536 : :
537 : : struct stat_info {
538 : : static std::string name() { return "stat"; }
539 : : static std::string shortDescription() { return
540 : : "Specify the name of the statistical moments output file"; }
541 : : static std::string longDescription() { return
542 : : R"(This keyword is used to specify the name of the output file in which to
543 : : store statistical moments during a simulation.)";
544 : : }
545 : : using alias = Alias< s >;
546 : : struct expect {
547 : : using type = std::string;
548 : : static std::string description() { return "string"; }
549 : : };
550 : : };
551 : : using stat = keyword< stat_info, TAOCPP_PEGTL_STRING("stat") >;
552 : :
553 : : struct input_info {
554 : : static std::string name() { return "input"; }
555 : 2936 : static std::string shortDescription() { return "Specify the input file"; }
556 : : static std::string longDescription() { return
557 : 2936 : R"(This option is used to define the name of input file.)";
558 : : }
559 : : using alias = Alias< i >;
560 : : struct expect {
561 : : using type = std::string;
562 [ + - ]: 2936 : static std::string description() { return "string"; }
563 : : };
564 : : };
565 : : using input = keyword< input_info, TAOCPP_PEGTL_STRING("input") >;
566 : :
567 : : struct output_info {
568 : : static std::string name() { return "output"; }
569 : 2936 : static std::string shortDescription() { return "Specify the output file"; }
570 : : static std::string longDescription() { return
571 : 2936 : R"(This option is used to define the output file name. In MeshConv, this is
572 : : used to specify the output mesh file name. In Inciter this is used to
573 : : specify the output base filename. The base filename is appended by
574 : : ".e-s.<meshid>.<numchares>.<chareid>", where 'e-s' probably stands for
575 : : ExodusII sequence (the output file format), <meshid> counts the number of
576 : : new meshes (this is incremented whenever the mesh is new compared to the
577 : : previous iteration, due to, e.g., mesh refinement), <numchares> is the total
578 : : number of mesh partitions, and <chareid> is the work unit (or mesh
579 : : partition) id.)";
580 : : }
581 : : using alias = Alias< o >;
582 : : struct expect {
583 : : using type = std::string;
584 [ + - ]: 2936 : static std::string description() { return "string"; }
585 : : };
586 : : };
587 : : using output = keyword< output_info, TAOCPP_PEGTL_STRING("output") >;
588 : :
589 : : struct refined_info {
590 : : static std::string name() { return "Refined field output"; }
591 : : static std::string shortDescription() { return
592 : : "Turn refined field output on/off"; }
593 : : static std::string longDescription() { return
594 : : R"(This keyword can be used to turn on/off refined field output, which
595 : : refines the mesh and evaluates the solution on the refined mesh for saving
596 : : the solution.)"; }
597 : : struct expect {
598 : : using type = bool;
599 : : static std::string description() { return "string"; }
600 : : static std::string choices() { return "true | false"; }
601 : : };
602 : : };
603 : : using refined =keyword< refined_info, TAOCPP_PEGTL_STRING("refined") >;
604 : :
605 : : struct screen_info {
606 : : static std::string name() { return "screen"; }
607 : : static std::string shortDescription() {
608 : 2941 : return "Specify the screen output file"; }
609 : : static std::string longDescription() { return
610 : 2941 : R"(This option is used to set the screen output file name. The default is
611 : : "<executable>_screen.log".)";
612 : : }
613 : : using alias = Alias< O >;
614 : : struct expect {
615 : : using type = std::string;
616 [ + - ]: 2941 : static std::string description() { return "string"; }
617 : : };
618 : : };
619 : : using screen = keyword< screen_info, TAOCPP_PEGTL_STRING("screen") >;
620 : :
621 : : struct restart_info {
622 : : static std::string name() { return "checkpoint/restart directory name"; }
623 : : static std::string shortDescription()
624 : 2900 : { return "Specify the directory for restart files"; }
625 : : static std::string longDescription() { return
626 : 2900 : R"(This option is used to specify the directory name in which to save
627 : : checkpoint/restart files.)";
628 : : }
629 : : using alias = Alias< R >;
630 : : struct expect {
631 : : using type = std::string;
632 [ + - ]: 2900 : static std::string description() { return "string"; }
633 : : };
634 : : };
635 : : using restart = keyword< restart_info, TAOCPP_PEGTL_STRING("restart") >;
636 : :
637 : : struct diagnostics_cmd_info {
638 : : static std::string name() { return "diagnostics"; }
639 : : static std::string shortDescription()
640 : 2900 : { return "Specify the diagnostics file name"; }
641 : : static std::string longDescription() { return
642 : 2900 : R"(This option is used to define the diagnostics file name.)";
643 : : }
644 : : using alias = Alias< d >;
645 : : struct expect {
646 : : using type = std::string;
647 [ + - ]: 2900 : static std::string description() { return "string"; }
648 : : };
649 : : };
650 : : using diagnostics_cmd =
651 : : keyword< diagnostics_cmd_info, TAOCPP_PEGTL_STRING("diagnostics") >;
652 : :
653 : : struct reorder_cmd_info {
654 : : static std::string name() { return "reorder"; }
655 : 36 : static std::string shortDescription() { return "Reorder mesh nodes"; }
656 : : static std::string longDescription() { return
657 : 36 : R"(This keyword is used as a command line argument to instruct the mesh
658 : : converter to not only convert but also reorder the mesh nodes using the
659 : : advancing front technique. Reordering is optional in meshconv and
660 : : inciter.)";
661 : : }
662 : : using alias = Alias< r >;
663 : : struct expect {
664 : : using type = bool;
665 [ + - ]: 36 : static std::string description() { return "string"; }
666 : : };
667 : : };
668 : : using reorder_cmd = keyword< reorder_cmd_info, TAOCPP_PEGTL_STRING("reorder") >;
669 : :
670 : : struct group_info {
671 : : static std::string name() { return "group"; }
672 : : static std::string shortDescription() { return
673 : 5 : "Select test group(s) to run"; }
674 : : static std::string longDescription() { return
675 : 5 : R"(This option can be used to select one or more test groups to run by
676 : : specifying the full or a partial name of a test group. All tests of a
677 : : selected group will be executed. If this option is not given, all test
678 : : groups are executed by default. Examples: '--group make_list' - run only
679 : : the 'make_list' test group, '--group Parser' - run the test groups that have
680 : : the string 'Parser' in their name, e.g., groups 'Control/FileParser' and
681 : : 'Control/StringParser'.)";
682 : : }
683 : : using alias = Alias< g >;
684 : : struct expect {
685 : : using type = std::string;
686 [ + - ]: 5 : static std::string description() { return "string"; }
687 : : };
688 : : };
689 : : using group = keyword< group_info, TAOCPP_PEGTL_STRING("group") >;
690 : :
691 : : struct inciter_info {
692 : : static std::string name() { return "inciter"; }
693 : : static std::string shortDescription() { return
694 : : "Start configuration block for inciter"; }
695 : : static std::string longDescription() { return
696 : : R"(This keyword is used to select inciter. Inciter, is a continuum-realm
697 : : shock hydrodynamics tool, solving a PDE.)";
698 : : }
699 : : };
700 : : using inciter = keyword< inciter_info, TAOCPP_PEGTL_STRING("inciter") >;
701 : :
702 : : struct sideset_info {
703 : : static std::string name() { return "sideset"; }
704 : : static std::string shortDescription() { return
705 : : "Specify configuration for setting BC on a side set";
706 : : }
707 : : static std::string longDescription() { return
708 : : R"(This keyword is used to specify boundary conditions on a side set for a
709 : : solving partial differential equation.)";
710 : : }
711 : : struct expect {
712 : : using type = std::string;
713 : : static std::string description() { return "strings"; }
714 : : };
715 : : };
716 : : using sideset = keyword< sideset_info, TAOCPP_PEGTL_STRING("sideset") >;
717 : :
718 : : // This will go away once all the keywords below are documented
719 : : struct undefined_info {
720 : : static std::string name() { return "undef"; }
721 : : static std::string shortDescription() { return "undefined"; }
722 : : static std::string longDescription() { return "Undefined."; }
723 : : };
724 : :
725 : : } // kw::
726 : :
727 : : #endif // Keywords_h
|