21#include "pism/util/pism_options.hh"
22#include "pism/util/pism_utilities.hh"
23#include "pism/pism_config.hh"
25#include "pism/util/Logger.hh"
30void show_usage(
const Logger &log,
const std::string &execname,
const std::string &usage) {
32 "%s is a PISM (http://www.pism.io) executable.\n"
33 "Options cheat-sheet:\n",
37 "Parallel run using N processes (typical case): mpiexec -n N %s ...\n"
38 "For more help with PISM:\n"
39 " 1. download PDF User's Manual or read the online version on the website:\n"
40 " http://www.pism.io\n"
41 " 2. read browser for technical details:\n"
42 " http://www.pism.io/doxygen\n"
43 " 3. view issues/bugs at source host: https://github.com/pism/pism/issues\n"
44 " 4. do '%s -help | grep foo' to see PISM and PETSc options with 'foo'.\n"
45 " 5. email for help: uaf-pism@alaska.edu\n",
46 execname.c_str(), execname.c_str());
52 const std::string &usage) {
53 const bool keep_running =
false;
54 const bool terminate =
true;
56 log.
message(2,
"%s %s\n", execname.c_str(), pism::revision);
58 if (
options::Bool(
"-version",
"print PISM version and stop")) {
void message(int threshold, const char format[],...) const __attribute__((format(printf
Print a message to the log.
bool Bool(const std::string &option, const std::string &description)
void show_usage(const Logger &log, const std::string &execname, const std::string &usage)
Print a usage message.
bool maybe_show_usage(const Logger &log, const std::string &execname, const std::string &usage)
In a single call a driver program can provide a usage string to the user and check if required option...