28 auto &m = root_module;
35 "loglevel must be below 128");
40 "If you've seen spam in your life i can garantee you, this is worst");
83 "get_compiler_id_string",
85 return shamrock_compiler_id_string;
88 Return compiler_id_string
103 return version_string;
106 Return version_string
119 "enable_experimental_features",
124 Enable experimental features
129 [](std::string prefix) {
130#ifdef SHAMROCK_USE_PROFILING
139 "dump_profiling_chrome",
140 [](std::string prefix) {
141#ifdef SHAMROCK_USE_PROFILING
150 "clear_profiling_data",
152#ifdef SHAMROCK_USE_PROFILING
175 Get the synchronized wall time across all MPI ranks.
178 This is an MPI collective operation and MUST be called by all ranks
179 simultaneously to avoid deadlocks.
182 py::module sys_module = m.def_submodule("sys",
"system handling part of shamrock");
185 shamsys::instance::register_pymodules(sys_module);
void signal_callback_handler(int signum)
The handler that will be called when a signal is catched.
std::uint32_t u32
32 bit unsigned integer
This header file contains utility functions related to exception handling in the code.
void set_loglevel(i8 val)
Set the global log level.
i8 get_loglevel()
Get the current global log level.
ExcptTypes make_except_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Create an exception with a message and a location.
i32 world_rank()
Gives the rank of the current process in the MPI communicator.
void enable_experimental_features()
Allow the use of experimental features.
constexpr i8 i8_max
i8 max value
Pybind11 include and definitions.
#define ON_PYTHON_INIT
Register a Python module init function using static initialization.
void print_active_level()
Prints the active log levels.
void raw_ln(Types... var2)
Prints a log message with multiple arguments followed by a newline.
This file contains the definition for the stacktrace related functionality.
void dump_profilings(const std::string &process_prefix, u32 world_rank)
Dump the profiling data in a JSON format to a file.
void dump_profilings_chrome(const std::string &process_prefix, u32 world_rank)
Dump the profiling data in a Chrome Tracing format.
f64 get_wtime()
Returns the current wall clock time in seconds.
void clear_profiling_data()
Clear the profiling data. (should be done in large run to avoid out-of-memory).