41 common::mpi_initializer mi_;
42 common::runtime_options opts_;
43 common::singleton_initializer<common::topology::instance> topo_;
44 common::singleton_initializer<common::wallclock::instance> clock_;
45 common::singleton_initializer<common::profiler::instance> prof_;
46 common::singleton_initializer<ito::instance> ito_;
47 common::singleton_initializer<ori::instance> ori_;
50 using instance = common::singleton<ityr>;
69 inline void init(MPI_Comm comm = MPI_COMM_WORLD) {
186 common::ityr_ucx_log_enable(1);
187 ucs_info(
"Itoyori profiler begin");
199 ucs_info(
"Itoyori profiler end");
200 common::ityr_ucx_log_enable(0);
215 common::ityr_ucx_log_flush();
static void init(Args &&... args)
Definition: util.hpp:190
static void fini()
Definition: util.hpp:194
#define ITYR_CHECK(cond)
Definition: util.hpp:48
void end()
Definition: profiler.hpp:334
singleton< profiler< mode > > instance
Definition: profiler.hpp:259
void begin()
Definition: profiler.hpp:329
void flush()
Definition: profiler.hpp:338
rank_t n_ranks()
Definition: topology.hpp:208
int rank_t
Definition: topology.hpp:12
MPI_Comm mpicomm()
Definition: topology.hpp:206
rank_t my_rank()
Definition: topology.hpp:207
uint64_t wallclock_t
Definition: wallclock.hpp:13
wallclock_t gettime_ns()
Definition: wallclock.hpp:88
void print_runtime_options()
Definition: options.hpp:111
void print_compile_options()
Definition: options.hpp:16
void mpi_barrier(MPI_Comm comm)
Definition: mpi_util.hpp:42
void print_compile_options()
Definition: options.hpp:8
void migrate_to(common::topology::rank_t target_rank, PreSuspendCallback &&pre_suspend_cb, PostSuspendCallback &&post_suspend_cb)
Definition: ito.hpp:80
void dag_prof_print()
Definition: ito.hpp:132
bool is_root()
Definition: ito.hpp:66
bool is_spmd()
Definition: ito.hpp:61
void dag_prof_begin()
Definition: ito.hpp:120
void dag_prof_end()
Definition: ito.hpp:126
void cache_prof_begin()
Definition: ori.hpp:232
void print_compile_options()
Definition: options.hpp:8
void release()
Definition: ori.hpp:196
void cache_prof_print()
Definition: ori.hpp:240
void cache_prof_end()
Definition: ori.hpp:236
void acquire()
Definition: ori.hpp:206
Definition: allocator.hpp:16
bool is_spmd()
Return true if the current execution context is within the SPMD region.
Definition: ityr.hpp:143
rank_t my_rank()
Return the rank of the process running the current thread.
Definition: ityr.hpp:99
void profiler_end()
Stop the profiler (collective).
Definition: ityr.hpp:196
void print_runtime_options()
Print the runtime options to stdout.
Definition: ityr.hpp:236
bool is_master()
Return true if ityr::my_rank() == 0.
Definition: ityr.hpp:115
wallclock_t gettime_ns()
Return the current wallclock time in nanoseconds.
Definition: ityr.hpp:171
void profiler_begin()
Start the profiler (collective).
Definition: ityr.hpp:180
void print_compile_options()
Print the compile-time options to stdout.
Definition: ityr.hpp:226
rank_t n_ranks()
Return the total number of processes.
Definition: ityr.hpp:107
void fini()
Finalize Itoyori (collective).
Definition: ityr.hpp:84
void migrate_to(rank_t target_rank)
Migrate the current thread to target_rank. For the root thread only.
Definition: ityr.hpp:129
bool is_root()
Return true if the current thread is the root thread.
Definition: ityr.hpp:122
void migrate_to_master()
Migrate the current thread to the master worker (of rank 0).
Definition: ityr.hpp:136
void init(MPI_Comm comm=MPI_COMM_WORLD)
Initialize Itoyori (collective).
Definition: ityr.hpp:69
void barrier()
Barrier for all processes (collective).
Definition: ityr.hpp:150
common::topology::rank_t rank_t
Process rank (ID) starting from 0 (corresponding to an MPI rank).
Definition: ityr.hpp:93
void profiler_flush()
Print the profiled results to stdout (collective).
Definition: ityr.hpp:212
common::wallclock::wallclock_t wallclock_t
Wallclock time in nanoseconds.
Definition: ityr.hpp:161