CnC
|
Inherits dist_init< C1, C2, C3, C4, C5 >.
Public Member Functions | |
dist_cnc_init (bool dist_env, long flag=0) | |
dist_cnc_init (long flag, bool dist_env=false) | |
To enable remote CnC you must create one such object. The lifetime of the object defines the "scope" of distribution. Contexts created in the "scope" of the dist_cnc_init objects (e.g. when it exists) will get distributed to participating processes (see Running distCnC).
Usually, a single dist_cnc_init object is created for the entire lifetime of a program. e.g. the dist_cnc_init object is created right when entering main and (auto-)destructed when main terminates. In this default mode all processes other than the root/host process exit the program when the dist_cnc_init objects gets dextructed.
Actually, the current implementation allows only a single dist_cnc_init object at a time for every process. Hence, all contexts on a given process are distributed in the same way. However, an optional parameter/flag allows allows defining the processes that actually "share" the dist_cnc_init object (and so their contexts). An optional flag/parameter is interpreted as a MPI_Comm to be used by the dist_cnc_init scope. This allows different groups of processes (defined by the MPI_Comm's) to work on different CnC contexts/graphs concurrently. If no MPI_Comm was specified (e.g. the default) client processes exit the program when the host dist_cnc_init object is destructed. If a MPI_Comm is provided they also wait until the host process destructs its dist_cnc_init object but simply returns from the constructor rather than exiting the program. Apparently all this only works when using the MPI communication infrastructure.
Additionally, two modes of operation are supported:
Execution and other internal details described in CnC::Internal::dist_init
Definition at line 576 of file dist_cnc.h.
|
inline |
dist_env | enable SPMD-style access to contexts |
flag | MPI_Comm to be used (MPI only) |
Definition at line 581 of file dist_cnc.h.
|
inline |
dist_env | enable SPMD-style access to contexts |
flag | MPI_Comm to be used (MPI only) |
Definition at line 584 of file dist_cnc.h.