Interface for creating parallel applications with COSTA. More...
#include "cta_system.h"
#include "cta_handles.h"
#include "cta_datatypes.h"
Go to the source code of this file.
Enumerations | |
enum | CTA_ParProcType { CTA_ParMaster, CTA_ParWorker, CTA_ParOther } |
Functions | |
CTAEXPORT int | CTA_Par_WorkerSpawn (int StartPar) |
Initialises parallel environment for a process that spawned The executable is spawned using MPI_COMM_SPAWN or MPI_COMM_SPAWN_MULTIPLE. | |
CTAEXPORT int | CTA_Par_CreateGroups (int parConfig, int StartPar) |
Initialises parallel environment and create process groups. | |
CTAEXPORT void | CTA_Par_GetGroupInfo (int *iGroup, int *itime) |
Get the Fortran (integer handles) of the communicators. | |
Variables | |
CTAEXPORT int | CTA_FILTER_PROCESS |
CTAEXPORT int | CTA_IS_PARALLEL |
CTAEXPORT int | CTA_PAR_MY_RANK |
CTAEXPORT enum CTA_ParProcType | CTA_MY_PROC_TYPE |
Interface for creating parallel applications with COSTA.
Definition in file cta_par.h.
enum CTA_ParProcType |
CTAEXPORT int CTA_Par_CreateGroups | ( | int | parConfig, | |
int | StartPar | |||
) |
Initialises parallel environment and create process groups.
parConfig | I configuration input from XML-file | |
StartPar | I CTA_TRUE/CTA_FALSE start parallel model builder |
Note when a worker process is part of a Master-Worker model and it does not implement the COSTA model interface it should not start the parallel model builder
CTAEXPORT void CTA_Par_GetGroupInfo | ( | int * | iGroup, | |
int * | itime | |||
) |
Get the Fortran (integer handles) of the communicators.
cta_comm_world | O Fortran communcator CTA_COMM_WORLD | |
cta_comm_myworld | O Fortran communcator CTA_COMM_MYWORLD | |
cta_comm_master_worker | O Fortran communcator CTA_COMM_MASTER_WORKER Get a communicator for a process group by index | |
indx | I indx of communicator | |
comm | O MPI communicator |
itime | O The index of this process in the group | |
iGroup | O The group number of this process belongs to (1..nGroups) |
CTAEXPORT int CTA_Par_WorkerSpawn | ( | int | StartPar | ) |
Initialises parallel environment for a process that spawned The executable is spawned using MPI_COMM_SPAWN or MPI_COMM_SPAWN_MULTIPLE.
It will set up the communication groups and optionally starts the parallel model builder
StartPar | I CTA_TRUE/CTA_FALSE start parallel model builder |
Note when a worker process is part of a Master-Worker model and it does not implement the COSTA model interface it should not start the parallel model builder
CTAEXPORT int CTA_FILTER_PROCESS |
Flag to indicate whether this is a filter process or model/worker process
CTAEXPORT int CTA_IS_PARALLEL |
Flag CTA_TRUE/CTA_FALSE to indicate whether run is in a parallel environment
CTAEXPORT enum CTA_ParProcType CTA_MY_PROC_TYPE |
Kind of this process
CTAEXPORT int CTA_PAR_MY_RANK |
Rank in world of all processes Note this variable is only used for debugging and output.