9 #ifndef STK_UTIL_DIAG_Env_h 10 #define STK_UTIL_DIAG_Env_h 15 #include <stk_util/stk_config.h> 16 #if defined( STK_HAS_MPI ) 19 #include <stk_util/parallel/Parallel.hpp> 21 #include <stk_util/environment/ProgramOptions.hpp> 22 #include <stk_util/util/Bootstrap.hpp> 24 #include <stk_util/util/FeatureTest.hpp> 25 #include <stk_util/diag/Option.hpp> 26 #include <stk_util/diag/Writer_fwd.hpp> 112 void ShutDownSierra(
bool mpiInitFlag);
185 void startup(
int *argc,
char ***argv,
const char *
product_name,
const char *build_time,
186 ExecType mpi_key,
const std::vector<int> *peer_sizes);
212 void reset(MPI_Comm mpi_comm);
213 void setMpiCommunicator(MPI_Comm communicator);
214 bool is_comm_valid();
228 const std::string &
get_param(
const char *
const option);
241 void set_param(
const char *option,
const std::string &value);
270 void setInputFileName(std::string value);
271 std::string getInputFileName();
489 void request_shutdown(
bool shutdown =
true);
491 bool is_shutdown_requested();
601 #endif // STK_UTIL_DIAG_Env_h double cpu_now()
Member function cpu_now returns the accumlated cpu time for the process as a double precision value i...
std::ostream & output()
Function output returns the processor output log stream. This stream is connected via an mpi_filebuf ...
std::string title(const std::string &s)
Function title returns a first letter of each word capitalized of the string.
const std::string & startup_date()
Function startup_date returns the startup date of this application execution.
void set_param(const char *option, const std::string &value)
Member function set_param assigns the value to the parameter option.
void set_check_subcycle(bool value)
Function set_check_subcycle sets whether to check input file for subcycling. The default behavior cor...
Generic application using entire communicator (MPI_COMM_WORLD)
~Startup()
Destroys a Startup instance. IT closes all logging output streams and will finalize MPI only if the S...
double wall_now()
Member function wall_now returns the epoch as a double precision value in seconds to "millisecond" ac...
std::ostream & outputP0()
Function outputP0 returns the processor output log stream on processor 0 and the null log stream on a...
Split communicator application; non-Gemini.
const std::string working_directory()
Function working_directory returns the current working directory of this application execution...
const std::string & executable_file()
Function executable_file returns the path of this executable file. information.
std::ostream & outputNull()
Function outputNull returns the null output stream. All data is simply discarded by the buffer associ...
const std::string & architecture()
Function architecture returns the platform executing this product. This is obtained during startup by...
void abort()
Function abort aborts the execution of the sierra application.
static const std::string PARAM_ON
Option value when command line option specified without a parameter.
std::string section_title(const std::string &title)
Function section_title returns a section title. The title has date and time concatenated and right ju...
int parallel_rank()
function parallel_rank returns the rank of this processor in the current mpi communicator.
ExecType
Enumeration ExecutableType defines the known types of coordinated executables that operate with a sie...
double start_time()
Function start_time returns the start time of this application execution.
Class Startup is a sentry class for starting the application. It ensures that the command line argume...
MPI_Comm parallel_world_comm()
Function parallel_world_comm returns the MPI_COMM_WORLD communicator used by the sierra environment i...
const char * subsection_separator()
Function subsection_separator returns a c-style string to be used as a output subsection separator...
bool StartupSierra(int *argc, char ***argv, const char *product_name, const char *build_time, ExecType mpi_key, const std::vector< int > *peer_sizes)
Initialize MPI related operations for sierra, outputs banner, etc. returns 1 if MPI was initialized...
double vm_now()
Member function vm_now returns the virtual memory in use for the process as a double precision value ...
int peer_group()
Function peer_group returns the peer group rank for an application of type EXEC_TYPE_PEER.
int parallel_lag_master()
Function parallel_lag_master returns the global rank of the Sierra lagrangian application.
Gemini Euler application.
MPI_Comm parallel_comm()
Function parallel_comm returns the current MPI communicator used by the sierra environment.
int parallel_fluid_master()
Function parallel_lag_master returns the global rank of the Gemini Euler application.
const std::string & executable_date()
Function executable_date returns the build date of the executable file as a string in the form Mmm dd...
bool developer_mode()
Function developer_mode returns true if the –developer option was specified on the application comm...
void reset(MPI_Comm new_comm)
Function reset determines new parallel_size and parallel_rank. Flushes, closes, and reopens log files...
const std::string & get_param(const char *const option)
Function query_env_param searches the command line options for the specified option. If not found, a const reference to an empty string is returned.
int parallel_size()
function parallel_size returns the number of processors in the current mpi communicator.
Sierra Lagrangian application.
void set_input_file_required(bool value)
Function set_input_file_required sets whether lack of an input file specification will automatically ...
Startup(int *argc, char ***argv, const char *product_name, const char *build_date_time, ExecType mpi_key=EXEC_TYPE_WORLD, const std::vector< int > *peer_sizes=NULL)
Creates a new Startup instance.
void output_flush()
Function output_flush flushes all output on all currently open synchronous outptu files which were op...
const char * section_separator()
Function output_open opens an output file on processor zero for synchronous data output from all proc...
const std::string & product_name()
Function product_name returns the product's name. This name is used to query the product registry for...