HMLP: High-performance Machine Learning Primitives
|
RunTime is statically created in hmlp_runtime.cpp. More...
#include <runtime.hpp>
Public Member Functions | |
RunTime () | |
hmlpError_t | init (mpi::Comm comm) |
Initialize the runtime system with an MPI communicator. More... | |
hmlpError_t | init (int *argc, char ***argv, mpi::Comm comm) |
Initialize the runtime system with arguments and an MPI communicator. More... | |
hmlpError_t | run () |
Consume all tasks in the graph. More... | |
hmlpError_t | finalize () |
bool | isInit () const noexcept |
bool | isInEpochSession () const noexcept |
void | ExecuteNestedTasksWhileWaiting (Task *waiting_task) |
hmlpError_t | setNumberOfWorkers (int num_of_workers) noexcept |
Adjust the number of workers in the next epoch. More... | |
int | getNumberOfWorkers () const noexcept |
Public Attributes | |
thread_communicator * | mycomm |
class Worker | workers [MAX_WORKER] |
class Device | host |
class Device * | device [1] |
Scheduler * | scheduler |
hmlp::RunTime::RunTime | ( | ) |
end Scheduler::Summary() class RunTime
void hmlp::RunTime::ExecuteNestedTasksWhileWaiting | ( | Task * | waiting_task | ) |
Consuming nested tasks while in a epoch session.
Use omp_get_thread_num() to acquire tid.
If I am not in a epoch session, then return.
hmlpError_t hmlp::RunTime::finalize | ( | ) |
end RunTime::Run() Stop and clean up the runtime syste.
Finalize the scheduler and delete it.
Set the initialized flag to false.
Finalize MPI if it was initialized by HMLP.
|
noexcept |
hmlpError_t hmlp::RunTime::init | ( | mpi::Comm | comm = MPI_COMM_WORLD | ) |
Initialize the runtime system with an MPI communicator.
[in] | comm | the MPI communicator. |
Check whether MPI has been initialized?
hmlpError_t hmlp::RunTime::init | ( | int * | argc, |
char *** | argv, | ||
mpi::Comm | comm = MPI_COMM_WORLD |
||
) |
Initialize the runtime system with arguments and an MPI communicator.
[in] | argc | the &argc from main(). |
[in] | argv | the &argv from main(). |
[in] | comm | the MPI communicator. |
Set argument count.
Set argument values.
Acquire the number of (maximum) workers from OpenMP.
Check whether MPI has been initialized?
Initialize MPI inside HMLP otherwise.
Flag that MPI is initialized by HMLP.
Initialize the scheduler.
Set the flag such that this is only executed once.
|
noexcept |
Whether the runtime is in a epoch session.
|
noexcept |
Whether the runtime is initialized.
hmlpError_t hmlp::RunTime::run | ( | ) |
Consume all tasks in the graph.
Begin this epoch session.
Schedule jobs to n workers.
Clean up.
Finish this epoch session.
Return without error.
|
noexcept |
Adjust the number of workers in the next epoch.
end RunTime::ExecuteNestedTasksWhileWaiting()
[in] | num_of_workers | the number of workers |