|
IBAMR
IBAMR version 0.19.
|
Manages an algorithm consisting of multiple relaunchable jobs. More...
#include <tbox/JobRelauncher.h>
Public Member Functions | |
| JobRelauncher () | |
| void | runAlgorithm (RelaunchableJob *initial_job) |
| Begin the algorithm. More... | |
| void | setAlgorithmAdvanceMode (const std::string &algo_advance_mode) |
| Set the mode for advancing the asynchronous implementation. More... | |
| AsyncCommStage & | getCommStage () |
| Return the communication stage managing jobs that are waiting for communication to finish. More... | |
| List< RelaunchableJob * > & | getRelaunchQueue () |
| Return the queue of jobs waiting for non-communications work. More... | |
Private Types | |
| enum | AlgoAdvanceMode { ROUND_ROBIN, ADVANCE_ANY, ADVANCE_SOME, SYNCHRONOUS } |
| Method for advancing the algorithm. More... | |
Private Member Functions | |
| void | runAlgorithm_synchronous (RelaunchableJob *initial_job) |
| Version of runAlgorithm() that waits for each communication stage to complete before moving on, thus resulting in synchronous execution. More... | |
| void | runAlgorithm_round_robin (RelaunchableJob *initial_job) |
| Version of runAlgorithm() checking communication stages in round-robin fashion instead of using AsyncCommStage. More... | |
| void | runAlgorithm_advance_any (RelaunchableJob *initial_job) |
| Version of runAlgorithm() that advances an execution node through its communication stage by using AsyncCommStage::advanceAny(). More... | |
| void | runAlgorithm_advance_some (RelaunchableJob *initial_job) |
| Version of runAlgorithm() that advances an execution node through its communication stage by using AsyncCommStage::advanceSome(). More... | |
Static Private Member Functions | |
| static void | freeTimers () |
Private Attributes | |
| List< RelaunchableJob * > | d_relaunch_queue |
| Queue on which to append jobs to be launched or relaunched. More... | |
| AsyncCommStage | d_comm_stage |
| Stage handling multiple asynchronous communication groups. More... | |
| AlgoAdvanceMode | d_algo_advance_mode |
Static Private Attributes | |
| static Pointer< Timer > | t_compute |
| Compute timer. More... | |
| static Pointer< Timer > | t_commwait |
| Communication-wait timer for all modes. More... | |
| static Pointer< Timer > | t_commwait_any |
| Communication-wait timer for ADVANCE_ANY mode. More... | |
| static Pointer< Timer > | t_commwait_some |
| Communication-wait timer for ADVANCE_SOME mode. More... | |
| static Pointer< Timer > | t_commwait_sync |
| Communication-wait timer for SYNCHRONOUS mode. More... | |
The jobs, defined by the RelaunchableJob base class, may be paused to wait for communication or non-communication to finish and then be restarted.
|
private |
Each corresponds to a choice permitted by setAlgorithmAdvanceMode().
| Enumerator | |
|---|---|
| ROUND_ROBIN | |
| ADVANCE_ANY | |
| ADVANCE_SOME | |
| SYNCHRONOUS | |
| SAMRAI::tbox::JobRelauncher::JobRelauncher | ( | ) |
| void SAMRAI::tbox::JobRelauncher::runAlgorithm | ( | RelaunchableJob * | initial_job | ) |
The algorithm begins with the job given. It may add more jobs to the relaunch queue as it progresses. See getRelaunchQueue().
| initial_job | The initial job in the algorithm. |
| void SAMRAI::tbox::JobRelauncher::setAlgorithmAdvanceMode | ( | const std::string & | algo_advance_mode | ) |
Choices are:
The default is "ADVANCE_SOME". This generally is fastest, but the other modes may be better for debugging.
Asynchronous modes are NOT guaranteed to compute the output graph nodes in any particular order. The order depends on the ordering of message completion, which is not deterministic. If you require consistent outputs, we suggest you have a scheme for reordering your output.
| AsyncCommStage& SAMRAI::tbox::JobRelauncher::getCommStage | ( | ) |
| List<RelaunchableJob*>& SAMRAI::tbox::JobRelauncher::getRelaunchQueue | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
Free static timers.
To be called by shutdown registry to make sure memory for timers does not leak.
|
private |
What is placed on the queue depends on the version of runAlgorithm_...() used.
|
private |
|
private |
1.8.17