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)
75 #define PLE_COUPLING_TS_MIN (1 << 6)
76 #define PLE_COUPLING_TS_LEADER (1 << 7)
82 #define PLE_COUPLING_UNSTEADY (1 << 8)
83 #define PLE_COUPLING_STEADY (1 << 9)
84 #define PLE_COUPLING_CONVERGED (1 << 10)
88 #define PLE_COUPLING_USER_1 (1 << 11)
89 #define PLE_COUPLING_USER_2 (1 << 12)
90 #define PLE_COUPLING_USER_3 (1 << 13)
91 #define PLE_COUPLING_USER_4 (1 << 14)
97 #if defined(PLE_HAVE_MPI)
101 typedef struct _ple_coupling_mpi_set_t ple_coupling_mpi_set_t;
110 const char *app_type;
111 const char *app_name;
121 #if defined(PLE_HAVE_MPI)
146 const char *group_name);
171 ple_coupling_mpi_set_t *
173 const char *app_type,
174 const char *app_name,
308 int distant_range[2]);
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
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
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
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
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:977
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_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:900
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
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
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
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
Definition: ple_coupling.h:103