1 #ifndef __PLE_COUPLING_H__ 2 #define __PLE_COUPLING_H__ 31 #include "ple_config.h" 33 #if defined(PLE_HAVE_MPI) 62 #define PLE_COUPLING_INIT (1 << 0) 64 #define PLE_COUPLING_NO_SYNC (1 << 1) 65 #define PLE_COUPLING_STOP (1 << 2) 66 #define PLE_COUPLING_LAST (1 << 3) 70 #define PLE_COUPLING_NEW_ITERATION (1 << 4) 71 #define PLE_COUPLING_REDO_ITERATION (1 << 5) 103 #define PLE_COUPLING_TS_MIN (1 << 6) 104 #define PLE_COUPLING_TS_LEADER (1 << 7) 107 #define PLE_COUPLING_TS_FOLLOWER (1 << 15) 110 #define PLE_COUPLING_TS_INDEPENDENT (1 << 16) 116 #define PLE_COUPLING_UNSTEADY (1 << 8) 117 #define PLE_COUPLING_STEADY (1 << 9) 118 #define PLE_COUPLING_CONVERGED (1 << 10) 122 #define PLE_COUPLING_USER_1 (1 << 11) 123 #define PLE_COUPLING_USER_2 (1 << 12) 124 #define PLE_COUPLING_USER_3 (1 << 13) 125 #define PLE_COUPLING_USER_4 (1 << 14) 131 #if defined(PLE_HAVE_MPI) 135 typedef struct _ple_coupling_mpi_set_t ple_coupling_mpi_set_t;
144 const char *app_type;
145 const char *app_name;
155 #if defined(PLE_HAVE_MPI) 180 const char *group_name);
205 ple_coupling_mpi_set_t *
207 const char *app_type,
208 const char *app_name,
359 int distant_range[2]);
const int * ple_coupling_mpi_set_get_status(const ple_coupling_mpi_set_t *s)
Get status of applications in a set.
Definition: ple_coupling.c:846
int ple_coupling_mpi_set_n_apps(const ple_coupling_mpi_set_t *s)
Return the number of applications in a coupled set.
Definition: ple_coupling.c:703
Definition: ple_coupling.h:145
const double * ple_coupling_mpi_set_get_timestep(const ple_coupling_mpi_set_t *s)
Get time steps in a set.
Definition: ple_coupling.c:871
int ple_coupling_mpi_name_to_id(MPI_Comm comm, const char *group_name)
Build a group id within a communicator based on its name.
Definition: ple_coupling.c:313
int ple_coupling_mpi_set_get_app_id(const ple_coupling_mpi_set_t *s)
Return the id of the local application in a coupled set.
Definition: ple_coupling.c:724
ple_coupling_mpi_set_info_t ple_coupling_mpi_set_get_info(const ple_coupling_mpi_set_t *s, int app_id)
Return application information in set's common communicator.
Definition: ple_coupling.c:746
void ple_coupling_mpi_intracomm_create(MPI_Comm base_comm, MPI_Comm app_comm, int distant_root, MPI_Comm *new_comm, int local_range[2], int distant_range[2])
Create an intracommunicator from a local and distant communicator within a base communicator.
Definition: ple_coupling.c:976
ple_coupling_mpi_set_t * ple_coupling_mpi_set_create(int sync_flag, const char *app_type, const char *app_name, MPI_Comm base_comm, MPI_Comm app_comm)
Discover other applications in a set with a common communicator.
Definition: ple_coupling.c:486
void ple_coupling_mpi_set_dump(const ple_coupling_mpi_set_t *s)
Dump printout of an PLE coupling MPI set info structure.
Definition: ple_coupling.c:1074
void ple_coupling_mpi_set_destroy(ple_coupling_mpi_set_t **s)
Free an PLE coupling MPI set info structure.
Definition: ple_coupling.c:679
double ple_coupling_mpi_set_compute_timestep(const ple_coupling_mpi_set_t *s)
Compute recommended time step for the current application based on provided flags and values of appli...
Definition: ple_coupling.c:898
MPI_Comm ple_coupling_mpi_set_get_base_comm(const ple_coupling_mpi_set_t *s)
Get base communicator of an PLE coupling MPI set.
Definition: ple_coupling.c:1053
void ple_coupling_mpi_set_synchronize(ple_coupling_mpi_set_t *s, int sync_flag, double time_step)
Synchronize applications in a set.
Definition: ple_coupling.c:786