nm_mpi_private.h
Go to the documentation of this file.
100 {
189static inline void nm_mpi_refcount_init(struct nm_refcount_s*p_refcount, const char*type __attribute__((unused)), int id)
235#define NM_MPI_TAG_PRIVATE_RMA_MASK_WIN ((nm_tag_t)(0xFFFFFFFF00000000 | NM_MPI_TAG_PRIVATE_RMA_BASE))
240#define NM_MPI_TAG_PRIVATE_RMA_MASK_SYNC ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE_SYNC | 0xFFFFFFFF000000FF))
277typedef void (nm_mpi_delete_subroutine_t)(int*id, int*keyval, void*attribute_val, void*extra_state, int*ierr);
282typedef int (nm_mpi_attr_delete_fn_t)(int object_id, int keyval_id, void*attribute_val, void*extra_state);
801NM_DATA_TYPE(mpi_datatype_wrapper, struct nm_data_mpi_datatype_wrapper_s, &nm_mpi_datatype_wrapper_ops);
1033 static void nm_mpi_handle_##ENAME##_finalize(struct nm_mpi_handle_##ENAME##_s*p_allocator, void(*destructor)(TYPE*)) \
1055 static TYPE*nm_mpi_handle_##ENAME##_store(struct nm_mpi_handle_##ENAME##_s*p_allocator, int id) \
1095 static void nm_mpi_handle_##ENAME##_release(struct nm_mpi_handle_##ENAME##_s*p_allocator, TYPE*e) \
1108 static void nm_mpi_handle_##ENAME##_free(struct nm_mpi_handle_##ENAME##_s*p_allocator, TYPE*e) \
1116 static TYPE*nm_mpi_handle_##ENAME##_get(struct nm_mpi_handle_##ENAME##_s*p_allocator, int id) \
1258struct nm_mpi_errhandler_s*nm_mpi_errhandler_alloc(enum nm_mpi_errhandler_kind_e kind, MPI_Handler_function*func);
1263struct nm_mpi_errhandler_s*nm_mpi_errhandler_get(int errhandler, enum nm_mpi_errhandler_kind_e kind);
1265void nm_mpi_errhandler_exec_internal(struct nm_mpi_errhandler_s*p_errhandler, enum nm_mpi_errhandler_kind_e kind, int handle, int err,
1337#define nm_mpi_datatype_ref_inc(P_DATATYPE, P_HOLDER) nm_refcount_inc(&(P_DATATYPE)->refcount, (P_HOLDER))
1344static inline void*nm_mpi_datatype_get_ptr(void*buf, nm_mpi_count_t count, const nm_mpi_datatype_t*p_datatype)
1350static inline void nm_mpi_data_build(struct nm_data_s*p_data, void*ptr, struct nm_mpi_datatype_s*p_datatype, nm_mpi_count_t count)
1352 nm_data_mpi_datatype_set(p_data, (struct nm_data_mpi_datatype_s){ .ptr = ptr, .p_datatype = p_datatype, .count = count });
1356static inline void nm_mpi_datatype_pack(void*outbuf, const void*inbuf, nm_mpi_datatype_t*p_datatype, nm_mpi_count_t count)
1364static inline void nm_mpi_datatype_unpack(const void*inbuf, void*outbuf, nm_mpi_datatype_t*p_datatype, nm_mpi_count_t count)
1372static inline void nm_mpi_datatype_copy(const void*src_buf, nm_mpi_datatype_t*p_src_type, nm_mpi_count_t src_count,
1397static inline nm_mpi_datatype_hash_t nm_mpi_datatype_hash_common(const nm_mpi_datatype_t*p_datatype)
1399 nm_mpi_datatype_hash_t z = puk_hash_oneatatime((const void*)&p_datatype->combiner, sizeof(nm_mpi_type_combiner_t))
1411nm_mpi_request_t*nm_mpi_request_alloc_send(nm_mpi_request_type_t type, nm_mpi_count_t count, const void*sbuf,
1417nm_mpi_request_t*nm_mpi_request_alloc_icol(nm_mpi_request_type_t type, nm_mpi_count_t count, struct nm_mpi_datatype_s*p_datatype,
1431static inline void nm_mpi_request_set_datatype(nm_mpi_request_t*p_req, struct nm_mpi_datatype_s*p_datatype)
1439static inline void nm_mpi_request_add_datatype2(nm_mpi_request_t*p_req, struct nm_mpi_datatype_s*p_datatype2)
1450void nm_mpi_file_request_status_update(nm_mpi_request_t*p_req, struct nm_mpi_status_s*p_status);
1495nm_mpi_request_t*nm_mpi_coll_isend(const void*buffer, nm_mpi_count_t count, nm_mpi_datatype_t*p_datatype, int dest, nm_tag_t tag, nm_mpi_communicator_t*p_comm);
1500nm_mpi_request_t*nm_mpi_coll_irecv(void*buffer, nm_mpi_count_t count, nm_mpi_datatype_t*p_datatype, int source, nm_tag_t tag, nm_mpi_communicator_t*p_comm);
1547 const void*sendbuf, const nm_mpi_count_t*sendcounts, const nm_mpi_aint_t*sdispls, nm_mpi_datatype_t*p_send_datatype,
1548 void*recvbuf, const nm_mpi_count_t*recvcounts, const nm_mpi_aint_t*rdispls, nm_mpi_datatype_t*p_recv_datatype);
1570void nm_mpi_operator_apply(void*invec, void*outvec, nm_mpi_count_t count, nm_mpi_datatype_t*p_datatype,
1575nm_mpi_communicator_t*nm_mpi_communicator_alloc(nm_comm_t p_nm_comm, struct nm_mpi_errhandler_s*p_errhandler,
1584#define nm_mpi_communicator_ref_inc(P_COMM, P_HOLDER) nm_refcount_inc(&(P_COMM)->refcount, (P_HOLDER));
1603int nm_mpi_attr_put(struct nm_mpi_attrs_s*p_attrs, struct nm_mpi_keyval_s*p_keyval, void*attr_value);
1605void nm_mpi_attr_get(struct nm_mpi_attrs_s*p_attrs, struct nm_mpi_keyval_s*p_keyval, void**p_attr_value, int*flag);
1668int nm_mpi_win_send_datatype(nm_mpi_datatype_t*p_datatype, int target_rank, nm_mpi_window_t*p_win);
1790static inline nm_mpi_count_t*nm_mpi_array_count_from_aint(nm_mpi_count_t n, const nm_mpi_aint_t*array_aint)
1803static inline nm_mpi_count_t*nm_mpi_array_count_copy(nm_mpi_count_t n, const nm_mpi_count_t*array_count)
1816static inline nm_mpi_aint_t*nm_mpi_array_aint_copy(nm_mpi_count_t n, const nm_mpi_aint_t*array_aint)
#define NM_MPI_TAG_PRIVATE_RMA_MASK_SEQ
Definition nm_mpi_private.h:234
#define NM_MPI_TAG_PRIVATE_RMA_MASK_WIN
Definition nm_mpi_private.h:235
void nm_mpi_info_destructor(char *p_key, char *p_data)
static void nm_mpi_refcount_init(struct nm_refcount_s *p_refcount, const char *type __attribute__((unused)), int id)
Definition nm_mpi_private.h:189
struct nm_mpi_errhandler_s * nm_mpi_file_errhandler
default errhandler for files, attached to MPI_FILE_NULL
PUK_HASHTABLE_TYPE(nm_mpi_info, char *, char *, &puk_hash_string_default_hash, &puk_hash_string_default_eq, &nm_mpi_info_destructor)
hashtable type for info entries
#define NM_DATA_TYPE(ENAME, CONTENT_TYPE, OPS)
macro to generate typed functions to init/access data fields.
Definition nm_data.h:222
static nm_len_t nm_data_size(const struct nm_data_s *p_data)
returns the amount of data contained in the descriptor
Definition nm_data.h:665
void nm_data_copy(struct nm_data_s *p_dest, struct nm_data_s *p_from)
copy from nm_data to another nm_data
void nm_data_copy_to(const struct nm_data_s *p_data, nm_len_t offset, nm_len_t len, const void *srcbuf)
copy chunk of data from contiguous buffer to user layout
void nm_data_copy_from(const struct nm_data_s *p_data, nm_len_t offset, nm_len_t len, void *destbuf)
copy chunk of data from user layout to contiguous buffer
nm_status_t nm_cond_status_t
status with synchronization (wait/signal)
Definition nm_core_interface.h:155
standard MPI public header
void(* nm_coll_req_notifier_t)(void *ref)
notification function for collective reqs
Definition nm_coll.h:96
static nm_gate_t nm_comm_get_gate(nm_comm_t p_comm, int rank)
Definition nm_coll_inline.h:47
static nm_session_t nm_comm_get_session(nm_comm_t p_comm)
Definition nm_coll_inline.h:62
static int nm_comm_get_dest(nm_comm_t p_comm, nm_gate_t p_gate)
Definition nm_coll_inline.h:57
static void nm_refcount_init(struct nm_refcount_s *p_refcount, char *p_object_id, const void *p_init_holder)
initialize a new refcount object; get the object ID to make debugging easier; we take ownership of ob...
Definition nm_core_interface.h:1347
assert(p_data->ops.p_traversal !=NULL)
int nm_group_size(nm_group_t group)
nm_gate_t nm_group_get_gate(nm_group_t p_group, int rank)
void MPI_User_function(void *invec, void *inoutvec, int *len, MPI_Datatype *datatype)
User combination function for reduction.
Definition nm_mpi_collective.h:33
void MPI_User_function_c(void *invec, void *inoutvec, MPI_Count *len, MPI_Datatype *datatype)
Definition nm_mpi_collective.h:35
void() MPI_File_errhandler_function(MPI_File *, int *,...)
Definition nm_mpi_io.h:39
static nm_tag_t nm_mpi_rma_seq_to_tag(uint16_t seq)
Encode a sequence number inside the tag to handle THREAD_MULTIPLE.
Definition nm_mpi_private.h:1700
int nm_mpi_irecv_init(nm_mpi_request_t *p_req, int source, nm_mpi_communicator_t *p_comm)
Initialises a receiving request.
void nm_mpi_info_lazy_init(void)
nm_mpi_request_t * nm_mpi_coll_irecv(void *buffer, nm_mpi_count_t count, nm_mpi_datatype_t *p_datatype, int source, nm_tag_t tag, nm_mpi_communicator_t *p_comm)
Receive data sent over the communicator via nm_mpi_coll_isend.
static int nm_mpi_win_valid_assert(int assert)
Check whether or not an assert if only a combination of defined symbols.
Definition nm_mpi_private.h:1649
static int nm_mpi_communicator_get_dest(nm_mpi_communicator_t *p_comm, nm_gate_t p_gate)
Gets the node associated to the given gate.
Definition nm_mpi_private.h:1222
nm_mpi_group_t * nm_mpi_group_alloc(void)
Allocate a new internal representation of a group.
int nm_mpi_attr_delete(struct nm_mpi_attrs_s *p_attrs, struct nm_mpi_keyval_s *p_keyval)
void nm_mpi_attrs_lazy_exit(void)
void nm_mpi_datatype_hashtable_insert(nm_mpi_datatype_t *p_datatype)
struct nm_mpi_win_locklist_s nm_mpi_win_locklist_t
static void nm_mpi_array_count_free(nm_mpi_count_t *array_count)
Definition nm_mpi_private.h:1829
void nm_mpi_cleanup_unregister(void(*p_func)(void *), void *p_arg)
void nm_mpi_datatype_exchange_init(void)
__PUK_SYM_INTERNAL const struct nm_data_ops_s nm_mpi_datatype_ops
void nm_mpi_datatype_deserialize(nm_mpi_datatype_ser_t *p_datatype, MPI_Datatype *p_newtype)
Deserialize a new datatype from the informations given in p_datatype.
nm_mpi_request_t * nm_mpi_coll_isend(const void *buffer, nm_mpi_count_t count, nm_mpi_datatype_t *p_datatype, int dest, nm_tag_t tag, nm_mpi_communicator_t *p_comm)
Collective send over the communicator.
struct nm_coll_req_s * nm_mpi_coll_ialltoall(nm_mpi_communicator_t *p_comm, const void *sendbuf, nm_mpi_count_t sendcount, nm_mpi_datatype_t *p_send_datatype, void *recvbuf, nm_mpi_count_t recvcount, nm_mpi_datatype_t *p_recv_datatype)
int nm_mpi_win_addr_is_valid(void *base, nm_mpi_aint_t extent, nm_mpi_window_t *p_win)
Check whether base is part of a memory segment attached to p_win, and if the data fit,...
nm_mpi_request_t * nm_mpi_request_alloc_send(nm_mpi_request_type_t type, nm_mpi_count_t count, const void *sbuf, struct nm_mpi_datatype_s *p_datatype, int tag, struct nm_mpi_communicator_s *p_comm)
void nm_mpi_info_update(struct nm_mpi_info_s *p_info_up, struct nm_mpi_info_s *p_info_origin)
Update or add new entry in p_info_origin based on the entry from p_info_up.
uint32_t nm_mpi_datatype_hash_t
a hash to identify a datatype across nodes
Definition nm_mpi_private.h:552
struct nm_mpi_info_s * nm_mpi_info_alloc(void)
Allocates a new instance of the internal representation of an info.
static int nm_mpi_win_completed_epoch(nm_mpi_win_epoch_t *p_epoch)
Returns whether the epoch requests are all completed.
Definition nm_mpi_private.h:1629
void nm_mpi_coll_wait(nm_mpi_request_t *p_req)
Wait for the end of the p2p communication over communicator via nm_mpi_coll_isend.
nm_mpi_communicator_t * nm_mpi_communicator_alloc(nm_comm_t p_nm_comm, struct nm_mpi_errhandler_s *p_errhandler, enum nm_mpi_communicator_kind_e kind)
__PUK_SYM_INTERNAL const struct nm_data_ops_s nm_mpi_datatype_serialize_ops
void nm_mpi_io_exit(void)
void nm_mpi_datatype_exchange_exit(void)
void nm_mpi_attrs_destroy(struct nm_mpi_attrs_s *p_old_attrs)
int nm_mpi_attr_put(struct nm_mpi_attrs_s *p_attrs, struct nm_mpi_keyval_s *p_keyval, void *attr_value)
struct nm_mpi_info_s * nm_mpi_info_dup(struct nm_mpi_info_s *p_info)
Duplicates the internal representation of the given info.
struct nm_mpi_datatype_s * p_datatype2
second datatype for collectives that need different types for send & recv; used only for ref counting
Definition nm_mpi_private.h:17
void nm_mpi_info_lazy_exit(void)
void nm_mpi_file_request_status_update(nm_mpi_request_t *p_req, struct nm_mpi_status_s *p_status)
int nm_mpi_coll_reduce(nm_mpi_communicator_t *p_comm, int root, nm_mpi_count_t count, nm_mpi_datatype_t *p_datatype, const void *sendbuf, void *recvbuf, nm_tag_t tag, nm_mpi_operator_t *p_operator)
blocking reduce
void nm_mpi_info_free(struct nm_mpi_info_s *p_info)
Frees the given instance of the internal representation of an info.
static nm_session_t nm_mpi_communicator_get_session(nm_mpi_communicator_t *p_comm)
Definition nm_mpi_private.h:1234
nm_mpi_request_t * nm_mpi_request_alloc(void)
static nm_mpi_aint_t * nm_mpi_array_aint_copy(nm_mpi_count_t n, const nm_mpi_aint_t *array_aint)
Definition nm_mpi_private.h:1816
struct nm_coll_req_s * nm_mpi_coll_iallgather(nm_mpi_communicator_t *p_comm, const void *sendbuf, nm_mpi_count_t sendcount, nm_mpi_datatype_t *p_send_datatype, void *recvbuf, nm_mpi_count_t recvcount, nm_mpi_datatype_t *p_recv_datatype)
int nm_mpi_datatype_send(nm_gate_t gate, nm_mpi_datatype_t *p_datatype)
Send a datatype to a distant node identified by its gate.
static void * nm_mpi_datatype_get_ptr(void *buf, nm_mpi_count_t count, const nm_mpi_datatype_t *p_datatype)
get a pointer on the count'th data buffer
Definition nm_mpi_private.h:1344
int nm_mpi_thread_level_get(int required)
static nm_mpi_count_t * nm_mpi_array_count_copy(nm_mpi_count_t n, const nm_mpi_count_t *array_count)
Definition nm_mpi_private.h:1803
PUK_LIST_DECLARE_TYPE(nm_mpi_request)
static void nm_mpi_datatype_unpack(const void *inbuf, void *outbuf, nm_mpi_datatype_t *p_datatype, nm_mpi_count_t count)
Unpack data from a contiguous buffers.
Definition nm_mpi_private.h:1364
void nm_mpi_coll_free(nm_mpi_request_t *p_req)
int nm_mpi_win_create_keyval_fort(nm_mpi_copy_subroutine_t *win_copy_attr_fn, nm_mpi_delete_subroutine_t *win_delete_attr_fn, int *win_keyval, void *extra_state)
static void nm_mpi_array_aint_free(nm_mpi_aint_t *array_aint)
Definition nm_mpi_private.h:1835
void nm_mpi_op_lazy_init(void)
nm_mpi_request_t * nm_mpi_request_alloc_recv(nm_mpi_count_t count, void *rbuf, struct nm_mpi_datatype_s *p_datatype, int tag, struct nm_mpi_communicator_s *p_comm)
static nm_gate_t nm_mpi_communicator_get_gate(nm_mpi_communicator_t *p_comm, int node)
Gets the in/out gate for the given node.
Definition nm_mpi_private.h:1209
void nm_mpi_datatype_lazy_exit(void)
struct nm_mpi_keyval_s * nm_mpi_keyval_get(int id)
struct nm_mpi_win_pass_mngmt_s nm_mpi_win_pass_mngmt_t
void nm_mpi_group_lazy_exit(void)
void nm_mpi_info_copy(struct nm_mpi_info_s *p_dest_info, struct nm_mpi_info_s *p_src_info)
Copy content o p_src_info into p_dest_info.
void nm_mpi_win_exit(void)
int nm_mpi_type_create_keyval_fort(nm_mpi_copy_subroutine_t *type_copy_attr_fn, nm_mpi_delete_subroutine_t *type_delete_attr_fn, int *type_keyval, void *extra_state)
void nm_mpi_op_lazy_exit(void)
nm_mpi_request_t * nm_mpi_request_get(MPI_Request req_id)
nm_mpi_count_t nm_mpi_datatype_get_elements(nm_mpi_datatype_t *p_datatype, nm_len_t size)
get how many base elements from datatype fit into given size
void nm_mpi_comm_lazy_exit(void)
int nm_mpi_win_send_datatype(nm_mpi_datatype_t *p_datatype, int target_rank, nm_mpi_window_t *p_win)
Looks up in the hashtable if the datatype is already exchanged with the target node.
void nm_mpi_info_define(struct nm_mpi_info_s *p_info, const char *p_key, const char *p_value)
Define a value in the given infoset.
void nm_mpi_coll_ireduce_start(struct nm_coll_req_s *p_coll_req)
start an already initialized ireduce
__PUK_SYM_INTERNAL const struct nm_data_ops_s nm_mpi_datatype_wrapper_ops
int nm_mpi_request_test(nm_mpi_request_t *p_req)
int() nm_mpi_attr_delete_fn_t(int object_id, int keyval_id, void *attribute_val, void *extra_state)
Definition nm_mpi_private.h:282
#define nm_mpi_datatype_ref_inc(P_DATATYPE, P_HOLDER)
increment refcount on given datatype
Definition nm_mpi_private.h:1337
void nm_mpi_attrs_create(struct nm_mpi_attrs_s *p_attrs, int id)
struct nm_coll_req_s * nm_mpi_coll_ireduce_init(nm_mpi_communicator_t *p_comm, int root, nm_mpi_count_t count, nm_mpi_datatype_t *p_datatype, const void *sendbuf, void *recvbuf, nm_tag_t tag, nm_mpi_operator_t *p_operator, nm_coll_req_notifier_t p_notify, void *ref)
internal implementation of collective Ireduce
void nm_mpi_request_free(nm_mpi_request_t *req)
static nm_mpi_aint_t * nm_mpi_array_aint_from_int(nm_mpi_count_t n, const int *array_int)
convert an array of int to an array of aint
Definition nm_mpi_private.h:1776
void nm_mpi_session_lazy_exit(void)
static int nm_mpi_win_is_ready(nm_mpi_win_epoch_t *p_epoch)
Check whether the epoch (exposure or acces, passive or active) is opened.
Definition nm_mpi_private.h:1639
void() nm_mpi_delete_subroutine_t(int *id, int *keyval, void *attribute_val, void *extra_state, int *ierr)
Definition nm_mpi_private.h:277
void nm_mpi_attr_destructor(struct nm_mpi_keyval_s *p_keyval, void *p_value)
nm_mpi_datatype_t * nm_mpi_datatype_hashtable_get(nm_mpi_datatype_hash_t datatype_hash)
Gets the internal representation of the given datatype from its hash.
nm_mpi_window_t * nm_mpi_window_get(MPI_Win win)
Gets the internal representation of the given window.
int nm_mpi_comm_create_keyval_fort(nm_mpi_copy_subroutine_t *comm_copy_attr_fn, nm_mpi_delete_subroutine_t *comm_delete_attr_fn, int *comm_keyval, void *extra_state)
struct nm_mpi_keyval_s * nm_mpi_keyval_new(void)
static void nm_mpi_datatype_copy(const void *src_buf, nm_mpi_datatype_t *p_src_type, nm_mpi_count_t src_count, void *dest_buf, nm_mpi_datatype_t *p_dest_type, nm_mpi_count_t dest_count)
Copy data using datatype layout.
Definition nm_mpi_private.h:1372
void(* nm_mpi_datatype_apply_t)(void *ptr, nm_len_t len, void *_ref)
function apply to each datatype or sub-datatype upon traversal
Definition nm_mpi_private.h:785
static nm_tag_t nm_mpi_rma_create_usertag(uint16_t seq, int user_tag)
Create the tag for private rma operations, without the window encoded id.
Definition nm_mpi_private.h:1726
void nm_mpi_attrs_lazy_init(void)
int nm_mpi_datatype_ref_dec(nm_mpi_datatype_t *p_datatype, const void *p_holder)
decrements refcount on given datatype, free datatype if refcount reaches 0.
static nm_tag_t nm_mpi_rma_mpi_op_to_tag(MPI_Op op)
Encode an operation id inside the tag for MPI_Accumulate and MPI_Get_accumulate functions.
Definition nm_mpi_private.h:1717
struct nm_mpi_errhandler_s * nm_mpi_errhandler_alloc(enum nm_mpi_errhandler_kind_e kind, MPI_Handler_function *func)
Allocate a new internal representation of a errhandler.
struct nm_coll_req_s * nm_mpi_coll_ialltoallv(nm_mpi_communicator_t *p_comm, const void *sendbuf, const nm_mpi_count_t *sendcounts, const nm_mpi_aint_t *sdispls, nm_mpi_datatype_t *p_send_datatype, void *recvbuf, const nm_mpi_count_t *recvcounts, const nm_mpi_aint_t *rdispls, nm_mpi_datatype_t *p_recv_datatype)
static int nm_mpi_rma_tag_to_win(nm_tag_t tag)
Decode the win_id from the tag.
Definition nm_mpi_private.h:1676
static uint16_t nm_mpi_win_get_next_seq(nm_mpi_window_t *p_win)
Returns the next sequence number for the given window, and increments it, lock free.
Definition nm_mpi_private.h:1621
int nm_mpi_request_wait(nm_mpi_request_t *p_req)
int nm_mpi_irecv(nm_mpi_request_t *p_req, int source, nm_mpi_communicator_t *p_comm)
Receives data.
static MPI_Op nm_mpi_rma_tag_to_mpi_op(nm_tag_t tag)
Decode the operation id from the tag.
Definition nm_mpi_private.h:1708
nm_mpi_request_t * nm_mpi_request_alloc_icol(nm_mpi_request_type_t type, nm_mpi_count_t count, struct nm_mpi_datatype_s *p_datatype, struct nm_mpi_communicator_s *p_comm)
void nm_mpi_datatype_properties_compute(nm_mpi_datatype_t *p_datatype)
Computes properties for datatype (LB, UB, extent, contig, etc.) Called automatically upon commit or d...
int nm_mpi_file_request_wait(nm_mpi_request_t *p_req)
static nm_mpi_datatype_hash_t nm_mpi_datatype_hash_common(const nm_mpi_datatype_t *p_datatype)
Definition nm_mpi_private.h:1397
static void nm_mpi_request_add_datatype2(nm_mpi_request_t *p_req, struct nm_mpi_datatype_s *p_datatype2)
attach a second datatype to this request
Definition nm_mpi_private.h:1439
static void nm_mpi_data_build(struct nm_data_s *p_data, void *ptr, struct nm_mpi_datatype_s *p_datatype, nm_mpi_count_t count)
build a data descriptor for mpi data
Definition nm_mpi_private.h:1350
nm_mpi_operator_t * nm_mpi_operator_get(MPI_Op op)
Gets the function associated to the given operator.
struct nm_coll_req_s * nm_mpi_coll_iallreduce(nm_mpi_communicator_t *p_comm, nm_mpi_count_t count, nm_mpi_datatype_t *p_datatype, const void *sendbuf, void *recvbuf, nm_tag_t tag, nm_mpi_operator_t *p_operator)
static void nm_mpi_request_set_datatype(nm_mpi_request_t *p_req, struct nm_mpi_datatype_s *p_datatype)
attach data to a request
Definition nm_mpi_private.h:1431
void nm_mpi_request_complete(nm_mpi_request_t *p_req, MPI_Request *request)
void() nm_mpi_copy_subroutine_t(int *id, int *keyval, void *extra_state, void *attribute_val_in, void *attribute_val_out, int *flag, int *ierr)
subroutine types for FORTRAN attributes binding
Definition nm_mpi_private.h:275
int nm_mpi_attrs_copy(struct nm_mpi_attrs_s *p_old_attrs, struct nm_mpi_attrs_s *p_new_attrs)
void nm_mpi_errhandler_exec_internal(struct nm_mpi_errhandler_s *p_errhandler, enum nm_mpi_errhandler_kind_e kind, int handle, int err, const char *func, const char *file, const int line)
void nm_mpi_rma_exit(void)
void nm_mpi_cleanup_register(void(*p_func)(void *), void *p_arg)
nm_mpi_communicator_t * nm_mpi_communicator_get(MPI_Comm comm)
Gets the internal representation of the given communicator.
struct nm_mpi_datatype_ser_s nm_mpi_datatype_ser_t
Serialized version of the internal datatype.
static nm_mpi_count_t * nm_mpi_array_count_from_int(nm_mpi_count_t n, const int *array_int)
convert an array of int to an array of counts
Definition nm_mpi_private.h:1762
static uint16_t nm_mpi_rma_tag_to_seq(nm_tag_t tag)
Decode the sequence number from the tag.
Definition nm_mpi_private.h:1692
static void nm_mpi_datatype_pack(void *outbuf, const void *inbuf, nm_mpi_datatype_t *p_datatype, nm_mpi_count_t count)
Pack data into a contiguous buffers.
Definition nm_mpi_private.h:1356
void nm_mpi_datatype_traversal_apply(const void *_content, struct nm_data_op_s *p_op)
void nm_mpi_request_lazy_exit(void)
struct nm_mpi_errhandler_s * nm_mpi_errhandler_get(int errhandler, enum nm_mpi_errhandler_kind_e kind)
Gets the internal representation of the given errhandler.
PUK_LIST_CREATE_FUNCS(nm_mpi_request)
void nm_mpi_communicator_ref_dec(nm_mpi_communicator_t *p_comm, const void *p_holder)
void nm_mpi_session_lazy_init(void)
int nm_mpi_isend_init(nm_mpi_request_t *p_req, int dest, nm_mpi_communicator_t *p_comm)
Initialises a sending request.
int nm_mpi_file_request_test(nm_mpi_request_t *p_req)
nm_mpi_win_epoch_t * p_epoch
corresponding epoch management structure for rma operations
Definition nm_mpi_private.h:105
size_t nm_mpi_datatype_size(nm_mpi_datatype_t *p_datatype)
Gets the size of the given datatype.
void nm_mpi_keyval_delete(struct nm_mpi_keyval_s *p_keyval)
struct nm_mpi_info_s * nm_mpi_info_get(MPI_Info info)
Gets the internal representation of the given info.
static nm_tag_t nm_mpi_rma_win_to_tag(int win_id)
Encode a window id inside the tag to handle the multiple windows.
Definition nm_mpi_private.h:1684
void nm_mpi_operator_apply(void *invec, void *outvec, nm_mpi_count_t count, nm_mpi_datatype_t *p_datatype, nm_mpi_operator_t *p_operator)
Apply the operator to every chunk of data described by p_datatype and pointed by outvec,...
static nm_tag_t nm_mpi_rma_create_tag(int win_id, uint16_t seq_num, int user_tag)
Create the tag for private rma operations, with the first 32 bits used for window id.
Definition nm_mpi_private.h:1735
nm_mpi_group_t * nm_mpi_group_get(MPI_Group group)
Gets the internal representation of the given group.
int() nm_mpi_attr_copy_fn_t(int object_id, int keyval_id, void *extra_state, void *attribute_val_in, void *attribute_val_out, int *flag)
generic C type for comm/win/types attributes
Definition nm_mpi_private.h:280
nm_mpi_datatype_t * nm_mpi_datatype_get(MPI_Datatype datatype)
Gets the internal representation of the given datatype.
void nm_mpi_attr_get(struct nm_mpi_attrs_s *p_attrs, struct nm_mpi_keyval_s *p_keyval, void **p_attr_value, int *flag)
int nm_mpi_isend(nm_mpi_request_t *p_req, int dest, nm_mpi_communicator_t *p_comm)
Sends data.
static nm_mpi_count_t * nm_mpi_array_count_from_aint(nm_mpi_count_t n, const nm_mpi_aint_t *array_aint)
convert an array of MPI_Aint to an array of counts
Definition nm_mpi_private.h:1790
int MPI_Grequest_free_function(void *extra_state)
Definition nm_mpi_types.h:228
int MPI_Grequest_cancel_function(void *extra_state, int complete)
Definition nm_mpi_types.h:229
void() MPI_Comm_errhandler_function(MPI_Comm *, int *,...)
Definition nm_mpi_types.h:507
void() MPI_Win_errhandler_function(MPI_Win *, int *,...)
Definition nm_mpi_types.h:509
void MPI_Session_errhandler_function(MPI_Session *, int *error_code,...)
Definition nm_mpi_types.h:512
int MPI_Grequest_query_function(void *extra_state, MPI_Status *status)
Definition nm_mpi_types.h:227
nm_len_t size
size of the onsided data (not incuding target-side completion)
Definition nm_onesided_private.h:1
main header for private nmad definitions.
This is the common public header for NewMad.
Definition nm_coll_private.h:55
nm_coll_req_notifier_t p_notify
notification function for op termination
Definition nm_coll_private.h:59
Definition nm_coll_inline.h:19
content for datatype traversal and sending
Definition nm_mpi_private.h:796
Definition nm_data.h:161
a data descriptor, used to pack/unpack data from app layout to/from contiguous buffers
Definition nm_data.h:199
int id
ID of the object this table is attached to (comm, datatype, win, ...)
Definition nm_mpi_private.h:306
nm_group_t p_remote_group
Definition nm_mpi_private.h:353
nm_group_t p_local_group
Definition nm_mpi_private.h:352
struct nm_mpi_attrs_s attrs
communicator attributes, hashed by keyval descriptor
Definition nm_mpi_private.h:326
struct nm_mpi_communicator_s::nm_mpi_cart_topology_s cart_topology
struct nm_refcount_s refcount
number of references pointing to this type (active communications, handle)
Definition nm_mpi_private.h:330
nm_mpi_communicator_kind_e
Definition nm_mpi_private.h:332
@ NM_MPI_COMMUNICATOR_INTRA
Definition nm_mpi_private.h:334
@ NM_MPI_COMMUNICATOR_UNSPEC
Definition nm_mpi_private.h:333
@ NM_MPI_COMMUNICATOR_INTER
Definition nm_mpi_private.h:335
enum nm_mpi_communicator_s::nm_mpi_topology_kind_e topo
nm_comm_t p_nm_comm
underlying nmad intra-communicator (or overlay for inter-communicator)
Definition nm_mpi_private.h:325
enum nm_mpi_communicator_s::nm_mpi_communicator_kind_e kind
struct nm_mpi_communicator_s::nm_mpi_intercomm_s intercomm
nm_mpi_errhandler_t * p_errhandler
error handler attached to communicator
Definition nm_mpi_private.h:328
struct nm_mpi_datatype_s::@67::@75 HINDEXED
struct nm_mpi_datatype_s::@67::@77 HINDEXED_BLOCK
struct nm_mpi_datatype_s::@67::@74 INDEXED
struct nm_mpi_datatype_s::@67::@79 STRUCT
struct nm_mpi_datatype_s::@67::@73 HVECTOR
struct nm_mpi_datatype_s::@67::@71 CONTIGUOUS
struct nm_mpi_attrs_s attrs
datatype attributes, hashed by keyval descriptor
Definition nm_mpi_private.h:768
struct nm_mpi_datatype_s::@67::@74::nm_mpi_type_indexed_map_s * p_map
nm_mpi_aint_t * array_of_displacements
Definition nm_mpi_private.h:743
struct nm_refcount_s refcount
number of references pointing to this type (active communications, handle)
Definition nm_mpi_private.h:686
nm_mpi_count_t * array_of_displacements
Definition nm_mpi_private.h:737
struct nm_mpi_datatype_s::@67::@70 RESIZED
struct nm_mpi_datatype_s::@67::@78::nm_mpi_type_subarray_dim_s * p_dims
struct nm_mpi_datatype_s::@67::@76 INDEXED_BLOCK
struct nm_mpi_datatype_s::@67::@72 VECTOR
struct nm_mpi_datatype_s::@67::@78 SUBARRAY
struct nm_mpi_datatype_s::@67::@69 DUP
Definition nm_mpi_private.h:580
nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_contiguous_s::old_type
nm_mpi_datatype_hash_t old_type
Definition nm_mpi_private.h:581
Definition nm_mpi_private.h:570
nm_mpi_datatype_hash_t old_type
Definition nm_mpi_private.h:571
Definition nm_mpi_private.h:626
nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_hindexed_block_s::DATA
void * DATA
The following array inlined in the structure : MPI_Aint*displacements; < displacement in bytes.
Definition nm_mpi_private.h:633
nm_mpi_datatype_hash_t old_type
Definition nm_mpi_private.h:627
int blocklength
Definition nm_mpi_private.h:628
Definition nm_mpi_private.h:606
nm_mpi_datatype_hash_t old_type
Definition nm_mpi_private.h:607
void * DATA
The two following arrays inlined in the structure : int*blocklengths; MPI_Aint*displacements; < displ...
Definition nm_mpi_private.h:613
Definition nm_mpi_private.h:590
nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_hvector_s::blocklength
nm_mpi_count_t blocklength
Definition nm_mpi_private.h:593
nm_mpi_datatype_hash_t old_type
Definition nm_mpi_private.h:591
Definition nm_mpi_private.h:616
void * DATA
The following array inlined in the structure : int*displacements;.
Definition nm_mpi_private.h:623
nm_mpi_datatype_hash_t old_type
Definition nm_mpi_private.h:617
int blocklength
Definition nm_mpi_private.h:618
Definition nm_mpi_private.h:596
void * DATA
The two following arrays inlined in the structure : int*blocklengths; int*displacements; < displaceme...
Definition nm_mpi_private.h:603
nm_mpi_datatype_hash_t old_type
Definition nm_mpi_private.h:597
Definition nm_mpi_private.h:574
nm_mpi_count_t lb
Definition nm_mpi_private.h:576
nm_mpi_datatype_hash_t old_type
Definition nm_mpi_private.h:575
nm_mpi_count_t extent
Definition nm_mpi_private.h:577
Definition nm_mpi_private.h:649
void * DATA
The three following arrays inlined in the structure : nm_mpi_datatype_hash_t*old_types; int*blockleng...
Definition nm_mpi_private.h:656
Definition nm_mpi_private.h:636
int order
Definition nm_mpi_private.h:639
int ndims
Definition nm_mpi_private.h:638
nm_mpi_datatype_hash_t old_type
Definition nm_mpi_private.h:637
void * DATA
The three following arrays inlined in the structure : int*sizes; int*subsizes; int*starts;.
Definition nm_mpi_private.h:646
Definition nm_mpi_private.h:584
nm_mpi_count_t blocklength
Definition nm_mpi_private.h:587
nm_mpi_datatype_hash_t old_type
Definition nm_mpi_private.h:585
union nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u p
MPI_Comm_errhandler_function * comm_func
Definition nm_mpi_private.h:94
union nm_mpi_errhandler_s::@34 function
enum nm_mpi_errhandler_s::nm_mpi_errhandler_kind_e kind
nm_mpi_errhandler_kind_e
Definition nm_mpi_private.h:100
@ NM_MPI_ERRHANDLER_SESSION
Definition nm_mpi_private.h:105
MPI_File_errhandler_function * file_func
Definition nm_mpi_private.h:96
MPI_Session_errhandler_function * session_func
Definition nm_mpi_private.h:97
nm_mpi_attr_delete_fn_t * delete_fn
delete callback function for C binding
Definition nm_mpi_private.h:289
struct nm_refcount_s refcount
number of attributes indexed by this keyval
Definition nm_mpi_private.h:293
nm_mpi_delete_subroutine_t * delete_subroutine
delete callback function for Fortran binding
Definition nm_mpi_private.h:291
nm_mpi_copy_subroutine_t * copy_subroutine
copy callback function for Fortran binding
Definition nm_mpi_private.h:290
struct nm_mpi_request_s::@37::@39::@42::@45 reduce
struct nm_mpi_request_s::@37::@40 partitioned
nm_mpi_win_epoch_t * p_epoch
corresponding epoch management structure for rma operations
Definition nm_mpi_private.h:523
struct nm_mpi_request_s::@37::@41 rma
fields for send/recv requests created by the RMA operations
struct nm_mpi_request_s::@37::nm_mpi_grequest_s grequest
struct nm_mpi_request_s::@37::@39::@42::@47 gather
struct nm_mpi_request_s::@37::@39::@42::@46 allreduce
struct nm_mpi_request_s::@37::@39::@42::@48 allgather
struct nm_mpi_request_s::@37::@39::@42::@44 bcast
int request_source
rank of the source node (used for incoming request)
Definition nm_mpi_private.h:429
struct nm_mpi_request_s::@37::@39::@42::@49 alltoall
struct nm_mpi_request_s::@37::@39 collective
nm_cond_status_t completed
set to NM_STATUS_FINALIZED when user signals completion
Definition nm_mpi_private.h:519
struct nm_mpi_request_s::@37::@39::@42::@50 alltoallv
struct nm_mpi_datatype_s * p_datatype2
second datatype for collectives that need different types for send & recv; used only for ref counting
Definition nm_mpi_private.h:435
Definition nm_mpi_private.h:363
Definition nm_mpi_private.h:826
Definition nm_mpi_private.h:815
Definition nm_mpi_private.h:838
uint64_t excl_pending
whether there is an exclusive lock request pending
Definition nm_mpi_private.h:839
uint64_t naccess
number of procs that are currently accessing this window
Definition nm_mpi_private.h:841
struct nm_sr_monitor_s monitor
window core monitor for asynchronous call
Definition nm_mpi_private.h:867
nm_mpi_win_pass_mngmt_t waiting_queue
management queue for passive target
Definition nm_mpi_private.h:900
struct nm_mpi_attrs_s attrs
window attributes, hashed by keyval descriptor
Definition nm_mpi_private.h:884
struct nm_sr_monitor_s monitor_sync
window core monitor for asynchronous lock
Definition nm_mpi_private.h:869
int flavor
bit-vector window's flavor (the function used to allocate the window
Definition nm_mpi_private.h:874
uint64_t * msg_count
counter to receive the amount of messages to be expected from a given distant window
Definition nm_mpi_private.h:898
a reference-counter that keeps trace of who increments/decrements in debug: full reference tracking i...
Definition nm_core_interface.h:1221
Definition nm_session_private.h:24
a global monitor to listen to events on the full session
Definition nm_sendrecv_interface.h:83
combiner specific parameters
Definition nm_mpi_private.h:568
struct nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_struct_s STRUCT
struct nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_subarray_s SUBARRAY
struct nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_contiguous_s CONTIGUOUS
struct nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_hindexed_s HINDEXED
struct nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_dup_s DUP
struct nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_hindexed_block_s HINDEXED_BLOCK
struct nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_indexed_block_s INDEXED_BLOCK
struct nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_resized_s RESIZED
struct nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_indexed_s INDEXED
struct nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_hvector_s HVECTOR
struct nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_vector_s VECTOR