Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
pyShamsys.cpp File Reference
Include dependency graph for pyShamsys.cpp:

Go to the source code of this file.

Functions

def ("change_loglevel", [](u32 loglevel) { if(loglevel > i8_max) { throw shambase::make_except_with_loc< std::invalid_argument >("loglevel must be below 128");} if(loglevel==i8_max) { logger::raw_ln("If you've seen spam in your life i can garantee you, this is worst");} logger::raw_ln("-> modified loglevel to", logger::get_loglevel(), "enabled log types : ");logger::set_loglevel(loglevel);logger::print_active_level();}, R"pbdoc( Change the loglevel )pbdoc")
def ("get_git_info", []() { return git_info_str;}, R"pbdoc( Return git_info_str )pbdoc")
def ("print_git_info", []() { logger::raw_ln(git_info_str);}, R"pbdoc( print git_info_str )pbdoc")
def ("get_compile_arg", []() { return compile_arg;}, R"pbdoc( Return compile_arg )pbdoc")
def ("get_compiler_id_string", []() { return shamrock_compiler_id_string;}, R"pbdoc( Return compiler_id_string )pbdoc")
def ("print_compile_arg", []() { logger::raw_ln(compile_arg);}, R"pbdoc( print compile_arg )pbdoc")
def ("version_string", []() { return version_string;}, R"pbdoc( Return version_string )pbdoc")
def ("is_git", []() { return is_git;}, R"pbdoc( Return is_git )pbdoc")
def ("enable_experimental_features", []() { shamrock::enable_experimental_features();}, R"pbdoc( Enable experimental features )pbdoc")
def ("dump_profiling", [](std::string prefix) { shambase::details::dump_profilings(prefix, shamcomm::world_rank());}, R"pbdoc( dump profiling data )pbdoc")
def ("dump_profiling_chrome", [](std::string prefix) { shambase::details::dump_profilings_chrome(prefix, shamcomm::world_rank());}, R"pbdoc( dump profiling data )pbdoc")
def ("clear_profiling_data", []() { shambase::details::clear_profiling_data();}, R"pbdoc( dump profiling data )pbdoc")
def ("get_wtime", []() { return shambase::details::get_wtime();}, R"pbdoc( Get the wall time. )pbdoc")
def ("get_wtime_sync", []() { return shamalgs::collective::allreduce_max(shambase::details::get_wtime());}, R"pbdoc( Get the synchronized wall time across all MPI ranks. .. warning:: This is an MPI collective operation and MUST be called by all ranks simultaneously to avoid deadlocks. )pbdoc")
sys_module def ("signal_handler", &shamsys::details::signal_callback_handler)

Variables

 ON_PYTHON_INIT
py::module sys_module = m.def_submodule("sys", "system handling part of shamrock")

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file pyShamsys.cpp.

Variable Documentation

◆ ON_PYTHON_INIT

ON_PYTHON_INIT
Initial value:
{
auto &m = root_module

Definition at line 27 of file pyShamsys.cpp.

◆ sys_module

py::module sys_module = m.def_submodule("sys", "system handling part of shamrock")

Definition at line 148 of file pyShamsys.cpp.