2004-01-10 01:09:51 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-01-10 11:20:15 +03:00
|
|
|
#ifndef LAM_COMMUNICATOR_H
|
|
|
|
#define LAM_COMMUNICATOR_H
|
2004-01-10 01:09:51 +03:00
|
|
|
|
2004-01-10 11:20:15 +03:00
|
|
|
#include "lam/stdint.h"
|
2004-01-10 01:09:51 +03:00
|
|
|
#include "lam/threads/mutex.h"
|
2004-01-11 03:13:22 +03:00
|
|
|
#include "mpi.h"
|
|
|
|
#include "mpi/group/group.h"
|
2004-01-10 01:09:51 +03:00
|
|
|
#include "mca/mpi/coll/coll.h"
|
|
|
|
|
2004-01-10 20:05:04 +03:00
|
|
|
struct lam_communicator_t {
|
2004-01-10 01:09:51 +03:00
|
|
|
char c_name[MPI_MAX_OBJECT_NAME];
|
2004-01-10 11:20:15 +03:00
|
|
|
uint32_t c_contextid;
|
|
|
|
int c_refcount;
|
|
|
|
int c_flags;
|
2004-01-10 01:09:51 +03:00
|
|
|
|
2004-01-10 20:05:04 +03:00
|
|
|
lam_group_t *c_local_group;
|
|
|
|
lam_group_t *c_remote_group;
|
2004-01-10 01:09:51 +03:00
|
|
|
|
2004-01-10 11:20:15 +03:00
|
|
|
/* Queues */
|
2004-01-10 01:09:51 +03:00
|
|
|
|
2004-01-10 11:20:15 +03:00
|
|
|
/* Attributes */
|
2004-01-10 01:09:51 +03:00
|
|
|
|
2004-01-10 11:20:15 +03:00
|
|
|
/* Topology information */
|
2004-01-10 01:09:51 +03:00
|
|
|
|
2004-01-10 11:20:15 +03:00
|
|
|
/* Error handling */
|
2004-01-10 01:09:51 +03:00
|
|
|
|
2004-01-10 11:20:15 +03:00
|
|
|
MPI_Errhandler c_error_handler;
|
2004-01-10 01:09:51 +03:00
|
|
|
|
2004-01-10 11:20:15 +03:00
|
|
|
/* Hooks for PML to hang things */
|
2004-01-12 06:13:53 +03:00
|
|
|
void* c_pml_comm;
|
2004-01-10 01:09:51 +03:00
|
|
|
|
2004-01-10 11:20:15 +03:00
|
|
|
/* Hooks for collectives to hang things */
|
2004-01-10 01:09:51 +03:00
|
|
|
|
2004-01-12 00:32:57 +03:00
|
|
|
mca_coll_1_0_0_t c_coll;
|
2004-01-10 11:20:15 +03:00
|
|
|
struct mca_coll_comm_t* c_coll_comm;
|
2004-01-10 20:05:04 +03:00
|
|
|
};
|
|
|
|
typedef struct lam_communicator_t lam_communicator_t;
|
2004-01-10 01:09:51 +03:00
|
|
|
|
2004-01-11 02:12:43 +03:00
|
|
|
|
|
|
|
/* return pointer to communicator associated with context id cid,
|
|
|
|
* No error checking is done*/
|
|
|
|
static inline lam_communicator_t *get_comm_ptr(uint32_t cid)
|
|
|
|
{
|
|
|
|
/* array of pointers to communicators, indexed by context ID */
|
|
|
|
extern lam_communicator_t **lam_cummunicator_ptrs;
|
|
|
|
extern uint32_t len_lam_cummunicator_ptrs;
|
|
|
|
#ifdef LAM_ENABLE_DEBUG
|
|
|
|
if(cid >= len_lam_cummunicator_ptrs)
|
|
|
|
return (lam_communicator_t *) NULL;
|
|
|
|
#endif
|
|
|
|
return lam_cummunicator_ptrs[cid];
|
|
|
|
}
|
|
|
|
|
2004-01-10 01:09:51 +03:00
|
|
|
#endif /* LAM_COMMUNICATOR_H */
|