NewMadeleine

Documentation

nm_mpi_private.h File Reference

Internal data structures for MPI. More...

#include <stdint.h>
#include <limits.h>
#include <unistd.h>
#include <assert.h>
#include <complex.h>
#include <execinfo.h>
#include <sys/stat.h>
#include <Padico/Puk.h>
#include <nm_private_config.h>
#include <nm_public.h>
#include <nm_core_interface.h>
#include <nm_sendrecv_interface.h>
#include <nm_pack_interface.h>
#include <nm_launcher_interface.h>
#include <nm_coll_interface.h>
#include <nm_private.h>
#include "nm_mpi.h"
Include dependency graph for nm_mpi_private.h:

Go to the source code of this file.

Data Structures

struct  nm_mpi_errhandler_s
 error handler More...
 
struct  nm_mpi_refcount_s
 a reference-counter that keeps trace of who increments/decrements More...
 
struct  nm_mpi_info_s
 content for MPI_Info More...
 
struct  nm_mpi_keyval_s
 a keyval used to index comm/types/win attributes More...
 
struct  nm_mpi_attrs_s
 an attribute table More...
 
struct  nm_mpi_group_s
 Internal group. More...
 
struct  nm_mpi_communicator_s
 Internal communicator. More...
 
struct  nm_mpi_communicator_s::nm_mpi_cart_topology_s
 < cartesian topology More...
 
struct  nm_mpi_communicator_s::nm_mpi_intercomm_s
 
struct  nm_mpi_session_s
 
struct  nm_mpi_request_s
 Internal communication request. More...
 
struct  nm_mpi_operator_s
 Internal reduce operators. More...
 
struct  nm_mpi_datatype_ser_s
 Serialized version of the internal datatype. More...
 
union  nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u
 combiner specific parameters More...
 
struct  nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_dup_s
 
struct  nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_resized_s
 
struct  nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_contiguous_s
 
struct  nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_vector_s
 
struct  nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_hvector_s
 
struct  nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_indexed_s
 
struct  nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_hindexed_s
 
struct  nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_indexed_block_s
 
struct  nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_hindexed_block_s
 
struct  nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_subarray_s
 
struct  nm_mpi_datatype_ser_s::nm_mpi_datatype_ser_param_u::nm_mpi_datatype_ser_param_struct_s
 
struct  nm_mpi_datatype_s
 Internal datatype. More...
 
struct  nm_data_mpi_datatype_s
 content for datatype traversal More...
 
struct  nm_data_mpi_datatype_header_s
 
struct  nm_data_mpi_datatype_wrapper_s
 content for datatype traversal and sending More...
 
struct  nm_mpi_win_locklist_s
 
struct  nm_mpi_win_epoch_s
 
struct  nm_mpi_win_pass_mngmt_s
 
struct  nm_mpi_window_s
 Content for MPI_Win. More...
 

Macros

#define NM_MPI_HANDLE_DEBUG   0
 
#define NM_MPI_HANDLE_TYPE(ENAME, TYPE, OFFSET, SLABSIZE)
 typed handle manager and object allocator for objects indexed by ID More...
 
#define NM_MPI_HANDLE_NULL   { .allocator = NULL, .next_id = -1 }
 
#define nm_mpi_datatype_ref_inc(P_DATATYPE, P_HOLDER)   nm_mpi_refcount_inc(&(P_DATATYPE)->refcount, (P_HOLDER))
 increment refcount on given datatype More...
 
#define nm_mpi_communicator_ref_inc(P_COMM, P_HOLDER)   nm_mpi_refcount_inc(&(P_COMM)->refcount, (P_HOLDER));
 increment refcount on given communicator More...
 
Target communication modes
#define NM_MPI_WIN_UNUSED   0
 
#define NM_MPI_WIN_ACTIVE_TARGET   1
 
#define NM_MPI_WIN_PASSIVE_TARGET   2
 
#define NM_MPI_WIN_PASSIVE_TARGET_END   4
 
#define NM_MPI_WIN_PASSIVE_TARGET_PENDING   8
 
Lock types for private use
#define NM_MPI_LOCK_NONE   ((uint16_t)0)
 
#define NM_MPI_LOCK_EXCLUSIVE   ((uint16_t)MPI_LOCK_EXCLUSIVE)
 
#define NM_MPI_LOCK_SHARED   ((uint16_t)MPI_LOCK_SHARED)
 
#define _NM_MPI_LOCK_OFFSET   ((uint16_t)3)
 

Typedefs

Communicators
typedef struct nm_mpi_group_s nm_mpi_group_t
 Internal group. More...
 
typedef struct nm_mpi_communicator_s nm_mpi_communicator_t
 Internal communicator. More...
 
Window
typedef struct nm_mpi_window_s nm_mpi_window_t
 
typedef struct nm_mpi_win_epoch_s nm_mpi_win_epoch_t
 
Reduce operators
typedef struct nm_mpi_operator_s nm_mpi_operator_t
 Internal reduce operators. More...
 
Requests list with its locks
typedef struct nm_mpi_win_locklist_s nm_mpi_win_locklist_t
 
Management structure for passive target mode
typedef struct nm_mpi_win_pass_mngmt_s nm_mpi_win_pass_mngmt_t
 

Functions

 PUK_LIST_LINK (nm_mpi_request)
 Link for nm_mpi_reqlist_t lists. More...
 
void nm_mpi_err_lazy_init (void)
 increment refcount to 'err' submodule More...
 
void nm_mpi_err_lazy_exit (void)
 decrement refcount to 'err' submodule More...
 
void nm_mpi_request_lazy_init (void)
 init request sub-system More...
 
void nm_mpi_request_lazy_exit (void)
 
void nm_mpi_comm_lazy_init (void)
 init communicator sub-system More...
 
void nm_mpi_comm_lazy_exit (void)
 
void nm_mpi_session_lazy_init (void)
 
void nm_mpi_session_lazy_exit (void)
 
void nm_mpi_group_lazy_init (void)
 increment refcount for 'group' sub-system More...
 
void nm_mpi_group_lazy_exit (void)
 
void nm_mpi_datatype_lazy_init (void)
 init datatype subsystem More...
 
void nm_mpi_datatype_lazy_exit (void)
 
void nm_mpi_datatype_exchange_init (void)
 
void nm_mpi_datatype_exchange_exit (void)
 
void nm_mpi_op_lazy_init (void)
 
void nm_mpi_op_lazy_exit (void)
 
void nm_mpi_io_init (void)
 init MPI I/O sub-system More...
 
void nm_mpi_io_exit (void)
 
void nm_mpi_attrs_lazy_init (void)
 
void nm_mpi_attrs_lazy_exit (void)
 
void nm_mpi_win_init (void)
 init window sub-system More...
 
void nm_mpi_win_exit (void)
 
void nm_mpi_rma_init (void)
 init rma sub-system More...
 
void nm_mpi_rma_exit (void)
 
void nm_mpi_info_lazy_init (void)
 
void nm_mpi_info_lazy_exit (void)
 
void nm_mpi_cleanup_register (void(*p_func)(void *), void *p_arg)
 
void nm_mpi_cleanup_unregister (void(*p_func)(void *), void *p_arg)
 
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. More...
 
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. More...
 
static nm_session_t nm_mpi_communicator_get_session (nm_mpi_communicator_t *p_comm)
 
nm_mpi_group_tnm_mpi_group_alloc (void)
 Allocate a new internal representation of a group. More...
 
nm_mpi_group_tnm_mpi_group_get (MPI_Group group)
 Gets the internal representation of the given group. More...
 
struct nm_mpi_errhandler_snm_mpi_errhandler_alloc (enum nm_mpi_errhandler_kind_e kind, MPI_Handler_function *func)
 Allocate a new internal representation of a errhandler. More...
 
struct nm_mpi_errhandler_snm_mpi_errhandler_get (int errhandler, enum nm_mpi_errhandler_kind_e kind)
 Gets the internal representation of the given errhandler. More...
 
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)
 
int nm_mpi_err_lastused (void)
 get the last used error class More...
 
struct nm_mpi_info_snm_mpi_info_alloc (void)
 Allocates a new instance of the internal representation of an info. More...
 
void nm_mpi_info_free (struct nm_mpi_info_s *p_info)
 Frees the given instance of the internal representation of an info. More...
 
struct nm_mpi_info_snm_mpi_info_get (MPI_Info info)
 Gets the internal representation of the given info. More...
 
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. More...
 
struct nm_mpi_info_snm_mpi_info_dup (struct nm_mpi_info_s *p_info)
 Duplicates the internal representation of the given info. More...
 
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. More...
 
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. More...
 
size_t nm_mpi_datatype_size (nm_mpi_datatype_t *p_datatype)
 Gets the size of the given datatype. More...
 
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 More...
 
nm_mpi_datatype_tnm_mpi_datatype_get (MPI_Datatype datatype)
 Gets the internal representation of the given datatype. More...
 
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 deserialize. More...
 
void nm_mpi_datatype_traversal_apply (const void *_content, nm_data_apply_t apply, void *_context)
 
nm_mpi_datatype_tnm_mpi_datatype_hashtable_get (nm_mpi_datatype_hash_t datatype_hash)
 Gets the internal representation of the given datatype from its hash. More...
 
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. More...
 
void nm_mpi_datatype_pack (void *dest_ptr, const void *src_ptr, nm_mpi_datatype_t *p_datatype, nm_mpi_count_t count)
 
void nm_mpi_datatype_unpack (const void *src_ptr, void *dest_ptr, nm_mpi_datatype_t *p_datatype, nm_mpi_count_t count)
 
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)
 
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 More...
 
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 More...
 
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. More...
 
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. More...
 
void nm_mpi_datatype_hashtable_insert (nm_mpi_datatype_t *p_datatype)
 
static nm_mpi_datatype_hash_t nm_mpi_datatype_hash_common (const nm_mpi_datatype_t *p_datatype)
 
nm_mpi_request_t * nm_mpi_request_alloc (void)
 
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)
 
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)
 
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_request_free (nm_mpi_request_t *req)
 
nm_mpi_request_t * nm_mpi_request_get (MPI_Request req_id)
 
int nm_mpi_request_test (nm_mpi_request_t *p_req)
 
int nm_mpi_request_wait (nm_mpi_request_t *p_req)
 
void nm_mpi_request_complete (nm_mpi_request_t *p_req, MPI_Request *request)
 
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 More...
 
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 More...
 
void nm_mpi_file_request_status_update (nm_mpi_request_t *p_req, struct nm_mpi_status_s *p_status)
 
int nm_mpi_file_request_test (nm_mpi_request_t *p_req)
 
int nm_mpi_file_request_wait (nm_mpi_request_t *p_req)
 
int nm_mpi_isend_init (nm_mpi_request_t *p_req, int dest, nm_mpi_communicator_t *p_comm)
 Initialises a sending request. More...
 
int nm_mpi_isend_start (nm_mpi_request_t *p_req)
 Starts a sending request. More...
 
int nm_mpi_isend (nm_mpi_request_t *p_req, int dest, nm_mpi_communicator_t *p_comm)
 Sends data. More...
 
int nm_mpi_irecv_init (nm_mpi_request_t *p_req, int source, nm_mpi_communicator_t *p_comm)
 Initialises a receiving request. More...
 
int nm_mpi_irecv_start (nm_mpi_request_t *p_req)
 Starts a receiving request. More...
 
int nm_mpi_irecv (nm_mpi_request_t *p_req, int source, nm_mpi_communicator_t *p_comm)
 Receives data. More...
 
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. More...
 
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. More...
 
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. More...
 
struct nm_coll_req_snm_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 More...
 
void nm_mpi_coll_ireduce_start (struct nm_coll_req_s *p_coll_req)
 start an already initialized ireduce More...
 
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 More...
 
struct nm_coll_req_snm_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)
 
struct nm_coll_req_snm_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)
 
struct nm_coll_req_snm_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)
 
struct nm_coll_req_snm_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)
 
nm_mpi_operator_tnm_mpi_operator_get (MPI_Op op)
 Gets the function associated to the given operator. More...
 
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, with the result stored in outvec. More...
 
nm_mpi_communicator_tnm_mpi_communicator_alloc (nm_comm_t p_nm_comm, struct nm_mpi_errhandler_s *p_errhandler, enum nm_mpi_communicator_kind_e kind)
 
nm_mpi_communicator_tnm_mpi_communicator_get (MPI_Comm comm)
 Gets the internal representation of the given communicator. More...
 
void nm_mpi_communicator_ref_dec (nm_mpi_communicator_t *p_comm, const void *p_holder)
 
struct nm_mpi_keyval_snm_mpi_keyval_new (void)
 
void nm_mpi_keyval_delete (struct nm_mpi_keyval_s *p_keyval)
 
struct nm_mpi_keyval_snm_mpi_keyval_get (int id)
 
void nm_mpi_attrs_create (struct nm_mpi_attrs_s *p_attrs, int id)
 
int nm_mpi_attrs_copy (struct nm_mpi_attrs_s *p_old_attrs, struct nm_mpi_attrs_s *p_new_attrs)
 
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)
 
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_attr_delete (struct nm_mpi_attrs_s *p_attrs, struct nm_mpi_keyval_s *p_keyval)
 
nm_mpi_window_tnm_mpi_window_get (MPI_Win win)
 Gets the internal representation of the given window. More...
 
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. More...
 
static int nm_mpi_win_completed_epoch (nm_mpi_win_epoch_t *p_epoch)
 Returns whether the epoch requests are all completed. More...
 
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. More...
 
static int nm_mpi_win_valid_assert (int assert)
 Check whether or not an assert if only a combination of defined symbols. More...
 
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, based on its extent. More...
 
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. More...
 
static int nm_mpi_rma_tag_to_win (nm_tag_t tag)
 Decode the win_id from the tag. More...
 
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. More...
 
static uint16_t nm_mpi_rma_tag_to_seq (nm_tag_t tag)
 Decode the sequence number from the tag. More...
 
static nm_tag_t nm_mpi_rma_seq_to_tag (uint16_t seq)
 Encode a sequence number inside the tag to handle THREAD_MULTIPLE. More...
 
static MPI_Op nm_mpi_rma_tag_to_mpi_op (nm_tag_t tag)
 Decode the operation id from the tag. More...
 
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. More...
 
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. More...
 
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. More...
 
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)
 
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)
 
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)
 
int nm_mpi_thread_level_get (int required)
 
static MPI_Countnm_mpi_array_count_from_int (nm_mpi_count_t n, const int *array_int)
 convert an array of int to an array of counts More...
 
static MPI_Aintnm_mpi_array_aint_from_int (nm_mpi_count_t n, const int *array_int)
 convert an array of int to an array of aint More...
 
static MPI_Countnm_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 More...
 
static void nm_mpi_array_count_free (MPI_Count *array_count)
 
static void nm_mpi_array_aint_free (MPI_Aint *array_aint)
 

Variables

MPI_Request id
 identifier of the request More...
 
nm_sr_request_t request_nmad
 nmad request for sendrecv interface More...
 
nm_mpi_request_type_t request_type
 type of the request More...
 
nm_mpi_status_t status
 status of request More...
 
int user_tag
 tag given by the user More...
 
int request_source
 rank of the source node (used for incoming request) More...
 
int request_error
 error status of the request, using MPI error codes More...
 
struct nm_mpi_datatype_sp_datatype
 type of the exchanged data More...
 
struct nm_mpi_datatype_sp_datatype2
 second datatype for collectives that need different types for send & recv; used only for ref counting More...
 
nm_gate_t gate
 gate of the destination or the source node More...
 
nm_mpi_communicator_tp_comm
 communicator used for communication More...
 
nm_mpi_count_t count
 number of elements to be exchanged More...
 
union {
   void *   rbuf
 pointer used for receiving More...
 
   const void *   sbuf
 pointer for sending More...
 
   char   static_buf [64]
 static buffer of max predefined datatype size More...
 
   struct nm_mpi_file_op_s *   p_file_op
 MPI-IO operation. More...
 
   struct nm_mpi_grequest_s *   p_grequest
 generalized request More...
 
}; 
 pointer to the data to be exchanged More...
 
union {
   struct {
      struct nm_coll_req_s *   p_coll_req
 non-blocking nmad native collective More...
 
   }   collective
 
   struct {
      int   partitions
 number of partitions More...
 
   }   partitioned
 
   struct nm_mpi_grequest_s {
      MPI_Grequest_query_function *   query_fn
 
      MPI_Grequest_free_function *   free_fn
 
      MPI_Grequest_cancel_function *   cancel_fn
 
      void *   extra_state
 
      nm_cond_status_t   completed
 set to NM_STATUS_FINALIZED when user signals completion More...
 
   }   grequest
 
   struct {
      nm_mpi_win_epoch_t *   p_epoch
 corresponding epoch management structure for rma operations More...
 
      nm_mpi_window_t *   p_win
 corresponding rma window More...
 
   }   rma
 fields for send/recv requests created by the RMA operations More...
 
}; 
 variable fields depending on request type More...
 
#define nm_mpi_spinlock_t   nm_spinlock_t
 
#define nm_mpi_spin_init(LOCK)   nm_spin_init(LOCK)
 
#define nm_mpi_spin_destroy(LOCK)   nm_spin_destroy(LOCK)
 
#define nm_mpi_spin_lock(LOCK)   nm_spin_lock(LOCK)
 
#define nm_mpi_spin_unlock(LOCK)   nm_spin_unlock(LOCK)
 
#define nm_mpi_errhandler_exec(P_ERRHANDLER, KIND, HANDLE, ERR)
 
#define NM_MPI_ERROR_INTERNAL(ERRORCODE)   (ERRORCODE)
 marks an error as internal, not needing to call the handler More...
 
#define NM_MPI_ERROR_COMM(P_COMM, ERRORCODE)
 
#define NM_MPI_ERROR_SESSION(P_SESSION, ERRORCODE)
 raise an error on the given session More...
 
#define NM_MPI_ERROR_WIN(P_WIN, ERRORCODE)
 raise an error on the given window More...
 
#define NM_MPI_ERROR_FILE(P_FILE, ERRORCODE)
 raise an error on the given file More...
 
#define NM_MPI_ERROR_FILE_DEFAULT(ERRORCODE)
 raise an error on the default errhandler for file (attached to MPI_FILE_NULL) More...
 
#define NM_MPI_ERROR_WORLD(ERRORCODE)
 
#define NM_MPI_COMMUNICATOR_CHECK(P_COMM)
 check that the given communicator is valid More...
 
#define NM_MPI_GROUP_CHECK(P_GROUP)
 check that the given group is valid More...
 
#define NM_MPI_SESSION_CHECK(P_SESSION)
 check that the given session is valid More...
 
#define NM_MPI_DATATYPE_CHECK(P_DATATYPE)
 check that the given datatype is valid More...
 
#define NM_MPI_TAG_CHECK_RECV(TAG)    do { if(((TAG) != MPI_ANY_TAG) && ((TAG) < 0 || (TAG) > NM_MPI_TAG_MAX)) return NM_MPI_ERROR_COMM(p_comm, MPI_ERR_TAG); } while(0)
 check that tag is a valid tag for a recv operation More...
 
#define NM_MPI_TAG_CHECK_SEND(TAG)    do { if( ((TAG) < 0) || ((TAG) > NM_MPI_TAG_MAX) || ((TAG) == MPI_ANY_TAG)) return NM_MPI_ERROR_COMM(p_comm, MPI_ERR_TAG); } while(0)
 check that tag is a valid tag for a send operation More...
 
#define NM_MPI_WARNING(...)   NM_WARN(__VA_ARGS__)
 
#define NM_MPI_FATAL_ERROR(...)   NM_FATAL(__VA_ARGS__)
 
#define NM_MPI_TRACE(str, ...)   NM_TRACEF(str, ## __VA_ARGS__)
 
#define FREE_AND_SET_NULL(p)   do { padico_free(p); p = NULL; } while (0/*CONSTCOND*/)
 
#define NM_MPI_REFCOUNT_INVALID   { .refcount = -1 }
 
#define nm_mpi_refcount_inc(REFCOUNT, HOLDER)    nm_mpi_refcount_inc_internal(REFCOUNT, HOLDER, __FUNCTION__, __FILE__, __LINE__)
 
#define NM_MPI_TAG_MAX   ((nm_tag_t)(0x7FFFFFFF))
 Maximum value of the tag specified by the end-user. More...
 
#define NM_MPI_TAG_PRIVATE_MASK   ((nm_tag_t)(0x80000000))
 Mask for private tags. More...
 
#define NM_MPI_TAG_PRIVATE_BASE   ((nm_tag_t)(0xF0000000))
 Base value for private tags. More...
 
#define NM_MPI_TAG_PRIVATE_BARRIER   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x11))
 
#define NM_MPI_TAG_PRIVATE_BCAST   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x12))
 
#define NM_MPI_TAG_PRIVATE_GATHER   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x13))
 
#define NM_MPI_TAG_PRIVATE_GATHERV   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x14))
 
#define NM_MPI_TAG_PRIVATE_SCATTER   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x15))
 
#define NM_MPI_TAG_PRIVATE_SCATTERV   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x16))
 
#define NM_MPI_TAG_PRIVATE_ALLTOALL   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x17))
 
#define NM_MPI_TAG_PRIVATE_ALLTOALLV   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x18))
 
#define NM_MPI_TAG_PRIVATE_REDUCE   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x19))
 
#define NM_MPI_TAG_PRIVATE_ALLREDUCE   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x1A))
 
#define NM_MPI_TAG_PRIVATE_SCAN   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x1B))
 
#define NM_MPI_TAG_PRIVATE_REDUCESCATTER   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x1C))
 
#define NM_MPI_TAG_PRIVATE_ALLGATHER   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x1D))
 
#define NM_MPI_TAG_PRIVATE_TYPE_ADD   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x21))
 add a datatype; tag is 0xF0XXXX21 where XXXX is seq number (16 bits) More...
 
#define NM_MPI_TAG_PRIVATE_TYPE_ADD_ACK   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x22))
 answer to add request More...
 
#define NM_MPI_TAG_PRIVATE_WIN_INIT   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x23))
 
#define NM_MPI_TAG_PRIVATE_WIN_FENCE   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x24))
 
#define NM_MPI_TAG_PRIVATE_WIN_BARRIER   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x25))
 
#define NM_MPI_TAG_PRIVATE_COMM_SPLIT   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0xF1))
 
#define NM_MPI_TAG_PRIVATE_COMM_CREATE   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0xF2))
 
#define NM_MPI_TAG_PRIVATE_COMM_INFO   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0xF3))
 
#define NM_MPI_TAG_PRIVATE_FILE_OPEN   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0xF4))
 
#define NM_MPI_TAG_PRIVATE_RMA_BASE   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x08000000))
 Masks for RMA-communication tags. More...
 
#define NM_MPI_TAG_PRIVATE_RMA_BASE_SYNC   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_BASE | 0x04000000))
 
#define NM_MPI_TAG_PRIVATE_RMA_MASK_OP   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE | 0x0F))
 rma operation mask More...
 
#define NM_MPI_TAG_PRIVATE_RMA_MASK_AOP   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE | 0xF0))
 acc operation mask More...
 
#define NM_MPI_TAG_PRIVATE_RMA_MASK_FOP
 full operation mask More...
 
#define NM_MPI_TAG_PRIVATE_RMA_MASK_SEQ   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE | 0xFFFF00))
 
#define NM_MPI_TAG_PRIVATE_RMA_MASK_WIN   ((nm_tag_t)(0xFFFFFFFF00000000 | NM_MPI_TAG_PRIVATE_RMA_BASE))
 
#define NM_MPI_TAG_PRIVATE_RMA_MASK_USER
 
#define NM_MPI_TAG_PRIVATE_RMA_MASK
 
#define NM_MPI_TAG_PRIVATE_RMA_MASK_SYNC   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE_SYNC | 0xFFFFFFFF000000FF))
 
#define NM_MPI_TAG_PRIVATE_RMA_START   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE_SYNC | 0x01))
 
#define NM_MPI_TAG_PRIVATE_RMA_END   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE_SYNC | 0x02))
 
#define NM_MPI_TAG_PRIVATE_RMA_LOCK   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE_SYNC | 0x13))
 lock request More...
 
#define NM_MPI_TAG_PRIVATE_RMA_LOCK_R   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE_SYNC | 0x04))
 lock ACK More...
 
#define NM_MPI_TAG_PRIVATE_RMA_UNLOCK   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE_SYNC | 0x05))
 unlock request More...
 
#define NM_MPI_TAG_PRIVATE_RMA_UNLOCK_R   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE_SYNC | 0x06))
 unlock ACK More...
 
#define NM_MPI_TAG_PRIVATE_RMA_OP_CHECK   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE_SYNC | 0x0F))
 If dynamic window, tells if target address is valid. More...
 
#define NM_MPI_TAG_PRIVATE_RMA_PUT   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE | 0x1))
 
#define NM_MPI_TAG_PRIVATE_RMA_GET_REQ   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE | 0x2))
 
#define NM_MPI_TAG_PRIVATE_RMA_ACC   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE | 0x3))
 accumulate More...
 
#define NM_MPI_TAG_PRIVATE_RMA_GACC_REQ   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE | 0x4))
 get_accumulate More...
 
#define NM_MPI_TAG_PRIVATE_RMA_FAO_REQ   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE | 0x5))
 fetch and op More...
 
#define NM_MPI_TAG_PRIVATE_RMA_CAS_REQ   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE | 0x6))
 compare and swap More...
 
#define NM_MPI_TAG_PRIVATE_RMA_REQ_RESP   ((nm_tag_t)(NM_MPI_TAG_PRIVATE_RMA_BASE | 0xF))
 
typedef struct nm_mpi_errhandler_s nm_mpi_errhandler_t
 error handler More...
 
struct nm_mpi_errhandler_snm_mpi_file_errhandler
 default errhandler for files, attached to MPI_FILE_NULL
More...
 
 PUK_LIST_TYPE (nm_mpi_refcount_holder, const void *p_holder;const char *func;const char *file;int line;)
 elements for nm_mpi_refcount_s More...
 
static void nm_mpi_refcount_init (struct nm_mpi_refcount_s *p_refcount, const char *type __attribute__((unused)), int id)
 initialize a new refcount object; get the type of object and its ID to make debugging easier More...
 
static void nm_mpi_refcount_dump (struct nm_mpi_refcount_s *p_refcount __attribute__((unused)))
 
static void nm_mpi_refcount_destroy (struct nm_mpi_refcount_s *p_refcount __attribute__((unused)))
 
static void nm_mpi_refcount_inc_internal (struct nm_mpi_refcount_s *p_refcount, const void *p_holder __attribute__((unused)), const char *func __attribute__((unused)), const char *file __attribute__((unused)), const int line __attribute__((unused)))
 
static int nm_mpi_refcount_dec (struct nm_mpi_refcount_s *p_refcount, const void *p_holder __attribute__((unused)))
 decrement refcount for holder; returns refcount (if 0, caller may free ref-counted resource) More...
 
void nm_mpi_info_destructor (char *p_key, char *p_data)
 
 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 More...
 

Requests

#define NM_MPI_REQUEST_ZERO   ((nm_mpi_request_type_t)0x0000)
 
#define NM_MPI_REQUEST_RECV   ((nm_mpi_request_type_t)0x0001)
 
#define NM_MPI_REQUEST_PRECV   ((nm_mpi_request_type_t)0x0041)
 
#define NM_MPI_REQUEST_PROBE   ((nm_mpi_request_type_t)0x0002)
 
#define NM_MPI_REQUEST_SEND   ((nm_mpi_request_type_t)0x0004)
 
#define NM_MPI_REQUEST_RSEND   ((nm_mpi_request_type_t)0x0014)
 
#define NM_MPI_REQUEST_SSEND   ((nm_mpi_request_type_t)0x0024)
 
#define NM_MPI_REQUEST_PSEND   ((nm_mpi_request_type_t)0x0044)
 
#define NM_MPI_REQUEST_FILE   ((nm_mpi_request_type_t)0x0008)
 
#define NM_MPI_REQUEST_GREQUEST   ((nm_mpi_request_type_t)0x0080)
 
#define NM_MPI_REQUEST_IBARRIER   ((nm_mpi_request_type_t)0x1100)
 
#define NM_MPI_REQUEST_IBCAST   ((nm_mpi_request_type_t)0x2100)
 
#define NM_MPI_REQUEST_IREDUCE   ((nm_mpi_request_type_t)0x3100)
 
#define NM_MPI_REQUEST_IALLREDUCE   ((nm_mpi_request_type_t)0x4100)
 
#define NM_MPI_REQUEST_IALLTOALL   ((nm_mpi_request_type_t)0x5100)
 
#define NM_MPI_REQUEST_IALLTOALLV   ((nm_mpi_request_type_t)0x6100)
 
#define NM_MPI_REQUEST_IGATHER   ((nm_mpi_request_type_t)0x7100)
 
#define NM_MPI_REQUEST_IALLGATHER   ((nm_mpi_request_type_t)0x8100)
 
#define NM_MPI_REQUEST_COLLECTIVE   ((nm_mpi_request_type_t)0x0100)
 bitmask for collective operations More...
 
#define NM_MPI_REQUEST_PARTITIONED   ((nm_mpi_request_type_t)0x0040)
 bitmask for partitioned operations More...
 
#define NM_MPI_STATUS_NONE   ((nm_mpi_status_t)0x00)
 
#define NM_MPI_REQUEST_CANCELLED   ((nm_mpi_status_t)0x04)
 request has been cancelled More...
 
#define NM_MPI_REQUEST_PERSISTENT   ((nm_mpi_status_t)0x08)
 request is persistent More...
 
#define _NM_MPI_MAX_DATATYPE_SIZE   64
 
typedef int32_t nm_mpi_request_type_t
 Type of a communication request. More...
 
typedef int8_t nm_mpi_status_t
 
 PUK_LIST_DECLARE_TYPE (nm_mpi_request)
 
struct nm_mpi_request_s __attribute__ ((__may_alias__)) nm_mpi_request_t
 Internal communication request. More...
 
 PUK_LIST_CREATE_FUNCS (nm_mpi_request)
 

keyval and attributes

typedef 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 More...
 
typedef void() nm_mpi_delete_subroutine_t(int *id, int *keyval, void *attribute_val, void *extra_state, int *ierr)
 
typedef 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 More...
 
typedef int() nm_mpi_attr_delete_fn_t(int object_id, int keyval_id, void *attribute_val, void *extra_state)
 
void nm_mpi_attr_destructor (struct nm_mpi_keyval_s *p_keyval, void *p_value)
 
 PUK_HASHTABLE_TYPE (nm_mpi_attr, struct nm_mpi_keyval_s *, void *, &puk_hash_pointer_default_hash, &puk_hash_pointer_default_eq, &nm_mpi_attr_destructor)
 

Datatypes

typedef uint32_t nm_mpi_datatype_hash_t
 a hash to identify a datatype across nodes More...
 
typedef struct nm_mpi_datatype_ser_s nm_mpi_datatype_ser_t
 Serialized version of the internal datatype. More...
 
typedef struct nm_mpi_datatype_s nm_mpi_datatype_t
 Internal datatype. More...
 
typedef void(* nm_mpi_datatype_apply_t) (void *ptr, nm_len_t len, void *_ref)
 function apply to each datatype or sub-datatype upon traversal More...
 
__PUK_SYM_INTERNAL const struct nm_data_ops_s nm_mpi_datatype_ops
 
__PUK_SYM_INTERNAL const struct nm_data_ops_s nm_mpi_datatype_wrapper_ops
 
__PUK_SYM_INTERNAL const struct nm_data_ops_s nm_mpi_datatype_serialize_ops
 
 NM_DATA_TYPE (mpi_datatype, struct nm_data_mpi_datatype_s, &nm_mpi_datatype_ops)
 
 NM_DATA_TYPE (mpi_datatype_wrapper, struct nm_data_mpi_datatype_wrapper_s, &nm_mpi_datatype_wrapper_ops)
 
 NM_DATA_TYPE (mpi_datatype_serial, struct nm_mpi_datatype_s *, &nm_mpi_datatype_serialize_ops)
 

Detailed Description

Internal data structures for MPI.

Definition in file nm_mpi_private.h.

Macro Definition Documentation

◆ _NM_MPI_LOCK_OFFSET

#define _NM_MPI_LOCK_OFFSET   ((uint16_t)3)

Definition at line 978 of file nm_mpi_private.h.

◆ _NM_MPI_MAX_DATATYPE_SIZE

#define _NM_MPI_MAX_DATATYPE_SIZE   64

Definition at line 517 of file nm_mpi_private.h.

◆ nm_mpi_communicator_ref_inc

#define nm_mpi_communicator_ref_inc (   P_COMM,
  P_HOLDER 
)    nm_mpi_refcount_inc(&(P_COMM)->refcount, (P_HOLDER));

increment refcount on given communicator

Definition at line 1612 of file nm_mpi_private.h.

◆ nm_mpi_datatype_ref_inc

#define nm_mpi_datatype_ref_inc (   P_DATATYPE,
  P_HOLDER 
)    nm_mpi_refcount_inc(&(P_DATATYPE)->refcount, (P_HOLDER))

increment refcount on given datatype

Definition at line 1392 of file nm_mpi_private.h.

◆ NM_MPI_HANDLE_DEBUG

#define NM_MPI_HANDLE_DEBUG   0

Definition at line 999 of file nm_mpi_private.h.

◆ NM_MPI_HANDLE_NULL

#define NM_MPI_HANDLE_NULL   { .allocator = NULL, .next_id = -1 }

Definition at line 1193 of file nm_mpi_private.h.

◆ NM_MPI_HANDLE_TYPE

#define NM_MPI_HANDLE_TYPE (   ENAME,
  TYPE,
  OFFSET,
  SLABSIZE 
)

typed handle manager and object allocator for objects indexed by ID

Definition at line 1005 of file nm_mpi_private.h.

◆ NM_MPI_LOCK_EXCLUSIVE

#define NM_MPI_LOCK_EXCLUSIVE   ((uint16_t)MPI_LOCK_EXCLUSIVE)

Definition at line 976 of file nm_mpi_private.h.

◆ NM_MPI_LOCK_NONE

#define NM_MPI_LOCK_NONE   ((uint16_t)0)

Definition at line 975 of file nm_mpi_private.h.

◆ NM_MPI_LOCK_SHARED

#define NM_MPI_LOCK_SHARED   ((uint16_t)MPI_LOCK_SHARED)

Definition at line 977 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_CANCELLED

#define NM_MPI_REQUEST_CANCELLED   ((nm_mpi_status_t)0x04)

request has been cancelled

Definition at line 514 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_COLLECTIVE

#define NM_MPI_REQUEST_COLLECTIVE   ((nm_mpi_request_type_t)0x0100)

bitmask for collective operations

Definition at line 508 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_FILE

#define NM_MPI_REQUEST_FILE   ((nm_mpi_request_type_t)0x0008)

Definition at line 496 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_GREQUEST

#define NM_MPI_REQUEST_GREQUEST   ((nm_mpi_request_type_t)0x0080)

Definition at line 497 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_IALLGATHER

#define NM_MPI_REQUEST_IALLGATHER   ((nm_mpi_request_type_t)0x8100)

Definition at line 505 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_IALLREDUCE

#define NM_MPI_REQUEST_IALLREDUCE   ((nm_mpi_request_type_t)0x4100)

Definition at line 501 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_IALLTOALL

#define NM_MPI_REQUEST_IALLTOALL   ((nm_mpi_request_type_t)0x5100)

Definition at line 502 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_IALLTOALLV

#define NM_MPI_REQUEST_IALLTOALLV   ((nm_mpi_request_type_t)0x6100)

Definition at line 503 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_IBARRIER

#define NM_MPI_REQUEST_IBARRIER   ((nm_mpi_request_type_t)0x1100)

Definition at line 498 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_IBCAST

#define NM_MPI_REQUEST_IBCAST   ((nm_mpi_request_type_t)0x2100)

Definition at line 499 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_IGATHER

#define NM_MPI_REQUEST_IGATHER   ((nm_mpi_request_type_t)0x7100)

Definition at line 504 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_IREDUCE

#define NM_MPI_REQUEST_IREDUCE   ((nm_mpi_request_type_t)0x3100)

Definition at line 500 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_PARTITIONED

#define NM_MPI_REQUEST_PARTITIONED   ((nm_mpi_request_type_t)0x0040)

bitmask for partitioned operations

Definition at line 510 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_PERSISTENT

#define NM_MPI_REQUEST_PERSISTENT   ((nm_mpi_status_t)0x08)

request is persistent

Definition at line 515 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_PRECV

#define NM_MPI_REQUEST_PRECV   ((nm_mpi_request_type_t)0x0041)

Definition at line 490 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_PROBE

#define NM_MPI_REQUEST_PROBE   ((nm_mpi_request_type_t)0x0002)

Definition at line 491 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_PSEND

#define NM_MPI_REQUEST_PSEND   ((nm_mpi_request_type_t)0x0044)

Definition at line 495 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_RECV

#define NM_MPI_REQUEST_RECV   ((nm_mpi_request_type_t)0x0001)

Definition at line 489 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_RSEND

#define NM_MPI_REQUEST_RSEND   ((nm_mpi_request_type_t)0x0014)

Definition at line 493 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_SEND

#define NM_MPI_REQUEST_SEND   ((nm_mpi_request_type_t)0x0004)

Definition at line 492 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_SSEND

#define NM_MPI_REQUEST_SSEND   ((nm_mpi_request_type_t)0x0024)

Definition at line 494 of file nm_mpi_private.h.

◆ NM_MPI_REQUEST_ZERO

#define NM_MPI_REQUEST_ZERO   ((nm_mpi_request_type_t)0x0000)

Definition at line 488 of file nm_mpi_private.h.

◆ NM_MPI_STATUS_NONE

#define NM_MPI_STATUS_NONE   ((nm_mpi_status_t)0x00)

Definition at line 513 of file nm_mpi_private.h.

◆ NM_MPI_WIN_ACTIVE_TARGET

#define NM_MPI_WIN_ACTIVE_TARGET   1

Definition at line 967 of file nm_mpi_private.h.

◆ NM_MPI_WIN_PASSIVE_TARGET

#define NM_MPI_WIN_PASSIVE_TARGET   2

Definition at line 968 of file nm_mpi_private.h.

◆ NM_MPI_WIN_PASSIVE_TARGET_END

#define NM_MPI_WIN_PASSIVE_TARGET_END   4

Definition at line 969 of file nm_mpi_private.h.

◆ NM_MPI_WIN_PASSIVE_TARGET_PENDING

#define NM_MPI_WIN_PASSIVE_TARGET_PENDING   8

Definition at line 970 of file nm_mpi_private.h.

◆ NM_MPI_WIN_UNUSED

#define NM_MPI_WIN_UNUSED   0

Definition at line 966 of file nm_mpi_private.h.

Typedef Documentation

◆ nm_mpi_attr_copy_fn_t

typedef 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 at line 386 of file nm_mpi_private.h.

◆ nm_mpi_attr_delete_fn_t

typedef int() nm_mpi_attr_delete_fn_t(int object_id, int keyval_id, void *attribute_val, void *extra_state)

Definition at line 388 of file nm_mpi_private.h.

◆ nm_mpi_communicator_t

Internal communicator.

◆ nm_mpi_copy_subroutine_t

typedef 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 at line 381 of file nm_mpi_private.h.

◆ nm_mpi_datatype_apply_t

typedef 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 at line 840 of file nm_mpi_private.h.

◆ nm_mpi_datatype_hash_t

typedef uint32_t nm_mpi_datatype_hash_t

a hash to identify a datatype across nodes

Definition at line 607 of file nm_mpi_private.h.

◆ nm_mpi_datatype_ser_t

Serialized version of the internal datatype.

Note
: each array in the types are inlined

◆ nm_mpi_datatype_t

Internal datatype.

◆ nm_mpi_delete_subroutine_t

typedef void() nm_mpi_delete_subroutine_t(int *id, int *keyval, void *attribute_val, void *extra_state, int *ierr)

Definition at line 383 of file nm_mpi_private.h.

◆ nm_mpi_group_t

Internal group.

◆ nm_mpi_operator_t

Internal reduce operators.

◆ nm_mpi_request_type_t

typedef int32_t nm_mpi_request_type_t

Type of a communication request.

Definition at line 487 of file nm_mpi_private.h.

◆ nm_mpi_status_t

typedef int8_t nm_mpi_status_t

Definition at line 512 of file nm_mpi_private.h.

◆ nm_mpi_win_epoch_t

Definition at line 481 of file nm_mpi_private.h.

◆ nm_mpi_win_locklist_t

◆ nm_mpi_win_pass_mngmt_t

◆ nm_mpi_window_t

Definition at line 479 of file nm_mpi_private.h.

Function Documentation

◆ __attribute__()

struct nm_mpi_request_s __attribute__ ( (__may_alias__)  )

Internal communication request.

◆ NM_DATA_TYPE() [1/3]

NM_DATA_TYPE ( mpi_datatype  ,
struct nm_data_mpi_datatype_s  ,
nm_mpi_datatype_ops 
)

◆ NM_DATA_TYPE() [2/3]

NM_DATA_TYPE ( mpi_datatype_serial  ,
struct nm_mpi_datatype_s ,
nm_mpi_datatype_serialize_ops 
)

◆ NM_DATA_TYPE() [3/3]

NM_DATA_TYPE ( mpi_datatype_wrapper  ,
struct nm_data_mpi_datatype_wrapper_s  ,
nm_mpi_datatype_wrapper_ops 
)

◆ nm_mpi_array_aint_free()

static void nm_mpi_array_aint_free ( MPI_Aint array_aint)
inlinestatic

Definition at line 1837 of file nm_mpi_private.h.

◆ nm_mpi_array_aint_from_int()

static MPI_Aint * nm_mpi_array_aint_from_int ( nm_mpi_count_t  n,
const int *  array_int 
)
inlinestatic

convert an array of int to an array of aint

Definition at line 1804 of file nm_mpi_private.h.

◆ nm_mpi_array_count_free()

static void nm_mpi_array_count_free ( MPI_Count array_count)
inlinestatic

Definition at line 1831 of file nm_mpi_private.h.

◆ nm_mpi_array_count_from_aint()

static MPI_Count * nm_mpi_array_count_from_aint ( nm_mpi_count_t  n,
const nm_mpi_aint_t array_aint 
)
inlinestatic

convert an array of MPI_Aint to an array of counts

Definition at line 1818 of file nm_mpi_private.h.

◆ nm_mpi_array_count_from_int()

static MPI_Count * nm_mpi_array_count_from_int ( nm_mpi_count_t  n,
const int *  array_int 
)
inlinestatic

convert an array of int to an array of counts

Definition at line 1790 of file nm_mpi_private.h.

◆ nm_mpi_attr_delete()

int nm_mpi_attr_delete ( struct nm_mpi_attrs_s p_attrs,
struct nm_mpi_keyval_s p_keyval 
)

◆ nm_mpi_attr_destructor()

void nm_mpi_attr_destructor ( struct nm_mpi_keyval_s p_keyval,
void *  p_value 
)

◆ nm_mpi_attr_get()

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 
)

◆ nm_mpi_attr_put()

int nm_mpi_attr_put ( struct nm_mpi_attrs_s p_attrs,
struct nm_mpi_keyval_s p_keyval,
void *  attr_value 
)

◆ nm_mpi_attrs_copy()

int nm_mpi_attrs_copy ( struct nm_mpi_attrs_s p_old_attrs,
struct nm_mpi_attrs_s p_new_attrs 
)

◆ nm_mpi_attrs_create()

void nm_mpi_attrs_create ( struct nm_mpi_attrs_s p_attrs,
int  id 
)

◆ nm_mpi_attrs_destroy()

void nm_mpi_attrs_destroy ( struct nm_mpi_attrs_s p_old_attrs)

◆ nm_mpi_attrs_lazy_exit()

void nm_mpi_attrs_lazy_exit ( void  )

◆ nm_mpi_attrs_lazy_init()

void nm_mpi_attrs_lazy_init ( void  )

◆ nm_mpi_cleanup_register()

void nm_mpi_cleanup_register ( void(*)(void *)  p_func,
void *  p_arg 
)

◆ nm_mpi_cleanup_unregister()

void nm_mpi_cleanup_unregister ( void(*)(void *)  p_func,
void *  p_arg 
)

◆ nm_mpi_coll_iallgather()

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 
)

◆ nm_mpi_coll_iallreduce()

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 
)

◆ nm_mpi_coll_ialltoall()

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 
)

◆ nm_mpi_coll_ialltoallv()

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 
)

◆ nm_mpi_coll_irecv()

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.

◆ nm_mpi_coll_ireduce_init()

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

◆ nm_mpi_coll_ireduce_start()

void nm_mpi_coll_ireduce_start ( struct nm_coll_req_s p_coll_req)

start an already initialized ireduce

Note
separate init/start so that even in case of immediate completion, p_reduce will not be uninitialized in iallreduce

◆ nm_mpi_coll_isend()

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.

◆ nm_mpi_coll_reduce()

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

◆ nm_mpi_coll_wait()

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_comm_create_keyval_fort()

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 
)

◆ nm_mpi_comm_lazy_exit()

void nm_mpi_comm_lazy_exit ( void  )

◆ nm_mpi_comm_lazy_init()

void nm_mpi_comm_lazy_init ( void  )

init communicator sub-system

◆ nm_mpi_communicator_alloc()

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 
)

◆ nm_mpi_communicator_get()

nm_mpi_communicator_t * nm_mpi_communicator_get ( MPI_Comm  comm)

Gets the internal representation of the given communicator.

◆ nm_mpi_communicator_get_dest()

static int nm_mpi_communicator_get_dest ( nm_mpi_communicator_t p_comm,
nm_gate_t  p_gate 
)
inlinestatic

◆ nm_mpi_communicator_get_gate()

static nm_gate_t nm_mpi_communicator_get_gate ( nm_mpi_communicator_t p_comm,
int  node 
)
inlinestatic

◆ nm_mpi_communicator_get_session()

static nm_session_t nm_mpi_communicator_get_session ( nm_mpi_communicator_t p_comm)
inlinestatic

Definition at line 1289 of file nm_mpi_private.h.

References nm_comm_get_session(), p_comm, and nm_mpi_communicator_s::p_nm_comm.

Here is the call graph for this function:

◆ nm_mpi_communicator_ref_dec()

void nm_mpi_communicator_ref_dec ( nm_mpi_communicator_t p_comm,
const void *  p_holder 
)

◆ nm_mpi_data_build()

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 
)
inlinestatic

build a data descriptor for mpi data

Definition at line 1412 of file nm_mpi_private.h.

References count, nm_mpi_datatype_s::count, and p_datatype.

◆ nm_mpi_datatype_copy()

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 
)

◆ nm_mpi_datatype_deserialize()

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_datatype_exchange_exit()

void nm_mpi_datatype_exchange_exit ( void  )

◆ nm_mpi_datatype_exchange_init()

void nm_mpi_datatype_exchange_init ( void  )

◆ nm_mpi_datatype_get()

nm_mpi_datatype_t * nm_mpi_datatype_get ( MPI_Datatype  datatype)

Gets the internal representation of the given datatype.

◆ nm_mpi_datatype_get_elements()

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

◆ nm_mpi_datatype_get_ptr()

static void * nm_mpi_datatype_get_ptr ( void *  buf,
nm_mpi_count_t  count,
const nm_mpi_datatype_t p_datatype 
)
inlinestatic

get a pointer on the count'th data buffer

Definition at line 1406 of file nm_mpi_private.h.

References count, nm_mpi_datatype_s::extent, and p_datatype.

◆ nm_mpi_datatype_hash_common()

static nm_mpi_datatype_hash_t nm_mpi_datatype_hash_common ( const nm_mpi_datatype_t p_datatype)
inlinestatic

◆ nm_mpi_datatype_hashtable_get()

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_datatype_hashtable_insert()

void nm_mpi_datatype_hashtable_insert ( nm_mpi_datatype_t p_datatype)

◆ nm_mpi_datatype_lazy_exit()

void nm_mpi_datatype_lazy_exit ( void  )

◆ nm_mpi_datatype_lazy_init()

void nm_mpi_datatype_lazy_init ( void  )

init datatype subsystem

◆ nm_mpi_datatype_pack()

void nm_mpi_datatype_pack ( void *  dest_ptr,
const void *  src_ptr,
nm_mpi_datatype_t p_datatype,
nm_mpi_count_t  count 
)

◆ nm_mpi_datatype_properties_compute()

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 deserialize.

◆ nm_mpi_datatype_ref_dec()

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.

◆ nm_mpi_datatype_send()

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.

This function blocks until it recieve an acknowledgement from the distant node that the type can now be used.

◆ nm_mpi_datatype_size()

size_t nm_mpi_datatype_size ( nm_mpi_datatype_t p_datatype)

Gets the size of the given datatype.

◆ nm_mpi_datatype_traversal_apply()

void nm_mpi_datatype_traversal_apply ( const void *  _content,
nm_data_apply_t  apply,
void *  _context 
)

◆ nm_mpi_datatype_unpack()

void nm_mpi_datatype_unpack ( const void *  src_ptr,
void *  dest_ptr,
nm_mpi_datatype_t p_datatype,
nm_mpi_count_t  count 
)

◆ nm_mpi_err_lastused()

int nm_mpi_err_lastused ( void  )

get the last used error class

◆ nm_mpi_err_lazy_exit()

void nm_mpi_err_lazy_exit ( void  )

decrement refcount to 'err' submodule

◆ nm_mpi_err_lazy_init()

void nm_mpi_err_lazy_init ( void  )

increment refcount to 'err' submodule

◆ nm_mpi_errhandler_alloc()

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.

◆ nm_mpi_errhandler_exec_internal()

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 
)

◆ nm_mpi_errhandler_get()

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.

◆ nm_mpi_file_request_status_update()

void nm_mpi_file_request_status_update ( nm_mpi_request_t *  p_req,
struct nm_mpi_status_s p_status 
)

◆ nm_mpi_file_request_test()

int nm_mpi_file_request_test ( nm_mpi_request_t *  p_req)

◆ nm_mpi_file_request_wait()

int nm_mpi_file_request_wait ( nm_mpi_request_t *  p_req)

◆ nm_mpi_group_alloc()

nm_mpi_group_t * nm_mpi_group_alloc ( void  )

Allocate a new internal representation of a group.

◆ nm_mpi_group_get()

nm_mpi_group_t * nm_mpi_group_get ( MPI_Group  group)

Gets the internal representation of the given group.

◆ nm_mpi_group_lazy_exit()

void nm_mpi_group_lazy_exit ( void  )

◆ nm_mpi_group_lazy_init()

void nm_mpi_group_lazy_init ( void  )

increment refcount for 'group' sub-system

◆ nm_mpi_info_alloc()

struct nm_mpi_info_s * nm_mpi_info_alloc ( void  )

Allocates a new instance of the internal representation of an info.

◆ nm_mpi_info_copy()

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.

◆ nm_mpi_info_define()

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.

◆ nm_mpi_info_dup()

struct nm_mpi_info_s * nm_mpi_info_dup ( struct nm_mpi_info_s p_info)

Duplicates the internal representation of the given info.

◆ nm_mpi_info_free()

void nm_mpi_info_free ( struct nm_mpi_info_s p_info)

Frees the given instance of the internal representation of an info.

◆ nm_mpi_info_get()

struct nm_mpi_info_s * nm_mpi_info_get ( MPI_Info  info)

Gets the internal representation of the given info.

◆ nm_mpi_info_lazy_exit()

void nm_mpi_info_lazy_exit ( void  )

◆ nm_mpi_info_lazy_init()

void nm_mpi_info_lazy_init ( void  )

◆ nm_mpi_info_update()

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.

This function only update already existing entries. It does NOT create any new entry.

◆ nm_mpi_io_exit()

void nm_mpi_io_exit ( void  )

◆ nm_mpi_io_init()

void nm_mpi_io_init ( void  )

init MPI I/O sub-system

◆ nm_mpi_irecv()

int nm_mpi_irecv ( nm_mpi_request_t *  p_req,
int  source,
nm_mpi_communicator_t p_comm 
)

Receives data.

◆ nm_mpi_irecv_init()

int nm_mpi_irecv_init ( nm_mpi_request_t *  p_req,
int  source,
nm_mpi_communicator_t p_comm 
)

Initialises a receiving request.

◆ nm_mpi_irecv_start()

int nm_mpi_irecv_start ( nm_mpi_request_t *  p_req)

Starts a receiving request.

◆ nm_mpi_isend()

int nm_mpi_isend ( nm_mpi_request_t *  p_req,
int  dest,
nm_mpi_communicator_t p_comm 
)

Sends data.

◆ nm_mpi_isend_init()

int nm_mpi_isend_init ( nm_mpi_request_t *  p_req,
int  dest,
nm_mpi_communicator_t p_comm 
)

Initialises a sending request.

◆ nm_mpi_isend_start()

int nm_mpi_isend_start ( nm_mpi_request_t *  p_req)

Starts a sending request.

◆ nm_mpi_keyval_delete()

void nm_mpi_keyval_delete ( struct nm_mpi_keyval_s p_keyval)

◆ nm_mpi_keyval_get()

struct nm_mpi_keyval_s * nm_mpi_keyval_get ( int  id)

◆ nm_mpi_keyval_new()

struct nm_mpi_keyval_s * nm_mpi_keyval_new ( void  )

◆ nm_mpi_op_lazy_exit()

void nm_mpi_op_lazy_exit ( void  )

◆ nm_mpi_op_lazy_init()

void nm_mpi_op_lazy_init ( void  )

◆ nm_mpi_operator_apply()

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, with the result stored in outvec.

The invec parameter is an address of a pointer to a contiguous buffer of predefined types, corresponding to each element pointed by outvec.

◆ nm_mpi_operator_get()

nm_mpi_operator_t * nm_mpi_operator_get ( MPI_Op  op)

Gets the function associated to the given operator.

◆ nm_mpi_request_add_datatype2()

static void nm_mpi_request_add_datatype2 ( nm_mpi_request_t *  p_req,
struct nm_mpi_datatype_s p_datatype2 
)
inlinestatic

attach a second datatype to this request

Definition at line 1474 of file nm_mpi_private.h.

References nm_mpi_datatype_ref_inc, and p_datatype2.

◆ nm_mpi_request_alloc()

nm_mpi_request_t * nm_mpi_request_alloc ( void  )

◆ nm_mpi_request_alloc_icol()

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 
)

◆ nm_mpi_request_alloc_recv()

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 
)

◆ nm_mpi_request_alloc_send()

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 
)

◆ nm_mpi_request_complete()

void nm_mpi_request_complete ( nm_mpi_request_t *  p_req,
MPI_Request request 
)

◆ nm_mpi_request_free()

void nm_mpi_request_free ( nm_mpi_request_t *  req)

◆ nm_mpi_request_get()

nm_mpi_request_t * nm_mpi_request_get ( MPI_Request  req_id)

◆ nm_mpi_request_lazy_exit()

void nm_mpi_request_lazy_exit ( void  )

◆ nm_mpi_request_lazy_init()

void nm_mpi_request_lazy_init ( void  )

init request sub-system

◆ nm_mpi_request_set_datatype()

static void nm_mpi_request_set_datatype ( nm_mpi_request_t *  p_req,
struct nm_mpi_datatype_s p_datatype 
)
inlinestatic

attach data to a request

Definition at line 1466 of file nm_mpi_private.h.

References nm_mpi_datatype_ref_inc, and p_datatype.

◆ nm_mpi_request_test()

int nm_mpi_request_test ( nm_mpi_request_t *  p_req)

◆ nm_mpi_request_wait()

int nm_mpi_request_wait ( nm_mpi_request_t *  p_req)

◆ nm_mpi_rma_create_tag()

static nm_tag_t nm_mpi_rma_create_tag ( int  win_id,
uint16_t  seq_num,
int  user_tag 
)
inlinestatic

Create the tag for private rma operations, with the first 32 bits used for window id.

Definition at line 1763 of file nm_mpi_private.h.

References nm_mpi_rma_create_usertag(), nm_mpi_rma_win_to_tag(), and user_tag.

Here is the call graph for this function:

◆ nm_mpi_rma_create_usertag()

static nm_tag_t nm_mpi_rma_create_usertag ( uint16_t  seq,
int  user_tag 
)
inlinestatic

Create the tag for private rma operations, without the window encoded id.

Definition at line 1754 of file nm_mpi_private.h.

References nm_mpi_rma_seq_to_tag(), seq, and user_tag.

Referenced by nm_mpi_rma_create_tag().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nm_mpi_rma_exit()

void nm_mpi_rma_exit ( void  )

◆ nm_mpi_rma_init()

void nm_mpi_rma_init ( void  )

init rma sub-system

◆ nm_mpi_rma_mpi_op_to_tag()

static nm_tag_t nm_mpi_rma_mpi_op_to_tag ( MPI_Op  op)
inlinestatic

Encode an operation id inside the tag for MPI_Accumulate and MPI_Get_accumulate functions.

Definition at line 1745 of file nm_mpi_private.h.

◆ nm_mpi_rma_seq_to_tag()

static nm_tag_t nm_mpi_rma_seq_to_tag ( uint16_t  seq)
inlinestatic

Encode a sequence number inside the tag to handle THREAD_MULTIPLE.

Definition at line 1728 of file nm_mpi_private.h.

References seq.

Referenced by nm_mpi_rma_create_usertag().

Here is the caller graph for this function:

◆ nm_mpi_rma_tag_to_mpi_op()

static MPI_Op nm_mpi_rma_tag_to_mpi_op ( nm_tag_t  tag)
inlinestatic

Decode the operation id from the tag.

Definition at line 1736 of file nm_mpi_private.h.

References tag.

◆ nm_mpi_rma_tag_to_seq()

static uint16_t nm_mpi_rma_tag_to_seq ( nm_tag_t  tag)
inlinestatic

Decode the sequence number from the tag.

Definition at line 1720 of file nm_mpi_private.h.

References NM_MPI_TAG_PRIVATE_RMA_MASK_SEQ, and tag.

◆ nm_mpi_rma_tag_to_win()

static int nm_mpi_rma_tag_to_win ( nm_tag_t  tag)
inlinestatic

Decode the win_id from the tag.

Definition at line 1704 of file nm_mpi_private.h.

References NM_MPI_TAG_PRIVATE_RMA_MASK_WIN, and tag.

◆ nm_mpi_rma_win_to_tag()

static nm_tag_t nm_mpi_rma_win_to_tag ( int  win_id)
inlinestatic

Encode a window id inside the tag to handle the multiple windows.

Definition at line 1712 of file nm_mpi_private.h.

Referenced by nm_mpi_rma_create_tag().

Here is the caller graph for this function:

◆ nm_mpi_session_lazy_exit()

void nm_mpi_session_lazy_exit ( void  )

◆ nm_mpi_session_lazy_init()

void nm_mpi_session_lazy_init ( void  )

◆ nm_mpi_thread_level_get()

int nm_mpi_thread_level_get ( int  required)

◆ nm_mpi_type_create_keyval_fort()

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 
)

◆ nm_mpi_win_addr_is_valid()

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, based on its extent.

◆ nm_mpi_win_completed_epoch()

static int nm_mpi_win_completed_epoch ( nm_mpi_win_epoch_t p_epoch)
inlinestatic

Returns whether the epoch requests are all completed.

Definition at line 1657 of file nm_mpi_private.h.

References nm_mpi_win_epoch_s::completed, nm_mpi_win_epoch_s::nmsg, and p_epoch.

◆ nm_mpi_win_create_keyval_fort()

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 
)

◆ nm_mpi_win_exit()

void nm_mpi_win_exit ( void  )

◆ nm_mpi_win_get_next_seq()

static uint16_t nm_mpi_win_get_next_seq ( nm_mpi_window_t p_win)
inlinestatic

Returns the next sequence number for the given window, and increments it, lock free.

Definition at line 1649 of file nm_mpi_private.h.

References nm_mpi_window_s::next_seq, and p_win.

◆ nm_mpi_win_init()

void nm_mpi_win_init ( void  )

init window sub-system

◆ nm_mpi_win_is_ready()

static int nm_mpi_win_is_ready ( nm_mpi_win_epoch_t p_epoch)
inlinestatic

Check whether the epoch (exposure or acces, passive or active) is opened.

Definition at line 1667 of file nm_mpi_private.h.

References nm_mpi_win_epoch_s::mode, NM_MPI_WIN_UNUSED, and p_epoch.

◆ nm_mpi_win_send_datatype()

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.

If it is, it returns immediately. Otherwhise, it exchanges the datatype information with the target, and set the proper entry in the hashtable.

◆ nm_mpi_win_valid_assert()

static int nm_mpi_win_valid_assert ( int  assert)
inlinestatic

Check whether or not an assert if only a combination of defined symbols.

Definition at line 1677 of file nm_mpi_private.h.

References MPI_MODE_NOCHECK, MPI_MODE_NOPRECEDE, MPI_MODE_NOPUT, MPI_MODE_NOSTORE, and MPI_MODE_NOSUCCEED.

◆ nm_mpi_window_get()

nm_mpi_window_t * nm_mpi_window_get ( MPI_Win  win)

Gets the internal representation of the given window.

◆ PUK_HASHTABLE_TYPE()

PUK_HASHTABLE_TYPE ( nm_mpi_attr  ,
struct nm_mpi_keyval_s ,
void *  ,
puk_hash_pointer_default_hash,
puk_hash_pointer_default_eq,
nm_mpi_attr_destructor 
)

◆ PUK_LIST_CREATE_FUNCS()

PUK_LIST_CREATE_FUNCS ( nm_mpi_request  )

◆ PUK_LIST_DECLARE_TYPE()

PUK_LIST_DECLARE_TYPE ( nm_mpi_request  )

◆ PUK_LIST_LINK()

__attribute__::PUK_LIST_LINK ( nm_mpi_request  )

Link for nm_mpi_reqlist_t lists.

Variable Documentation

◆ 

union { ... }

pointer to the data to be exchanged

◆ 

union { ... }

variable fields depending on request type

◆ cancel_fn

Definition at line 48 of file nm_mpi_private.h.

◆ 

struct { ... } collective

◆ completed

nm_cond_status_t completed

set to NM_STATUS_FINALIZED when user signals completion

Definition at line 50 of file nm_mpi_private.h.

◆ count

number of elements to be exchanged

Definition at line 23 of file nm_mpi_private.h.

Referenced by nm_mpi_data_build(), nm_mpi_datatype_get_ptr(), and nm_pw_ref_dec().

◆ extra_state

void* extra_state

Definition at line 49 of file nm_mpi_private.h.

◆ free_fn

Definition at line 47 of file nm_mpi_private.h.

◆ gate

nm_gate_t gate

gate of the destination or the source node

Definition at line 19 of file nm_mpi_private.h.

◆ 

struct { ... } ::nm_mpi_grequest_s grequest

◆ id

identifier of the request

Definition at line 1 of file nm_mpi_private.h.

Referenced by nm_mpi_refcount_init().

◆ nm_mpi_datatype_ops

__PUK_SYM_INTERNAL const struct nm_data_ops_s nm_mpi_datatype_ops
extern

◆ nm_mpi_datatype_serialize_ops

__PUK_SYM_INTERNAL const struct nm_data_ops_s nm_mpi_datatype_serialize_ops
extern

◆ nm_mpi_datatype_wrapper_ops

__PUK_SYM_INTERNAL const struct nm_data_ops_s nm_mpi_datatype_wrapper_ops
extern

◆ p_coll_req

struct nm_coll_req_s* p_coll_req

non-blocking nmad native collective

Definition at line 38 of file nm_mpi_private.h.

Referenced by nm_coll_req_container(), and nm_coll_req_payload().

◆ p_comm

◆ p_datatype

struct nm_mpi_datatype_s* p_datatype

type of the exchanged data

Definition at line 15 of file nm_mpi_private.h.

Referenced by nm_mpi_data_build(), nm_mpi_datatype_get_ptr(), nm_mpi_datatype_hash_common(), and nm_mpi_request_set_datatype().

◆ p_datatype2

struct nm_mpi_datatype_s* p_datatype2

second datatype for collectives that need different types for send & recv; used only for ref counting

Definition at line 17 of file nm_mpi_private.h.

Referenced by nm_mpi_request_add_datatype2().

◆ p_epoch

corresponding epoch management structure for rma operations

Definition at line 54 of file nm_mpi_private.h.

Referenced by nm_mpi_win_completed_epoch(), and nm_mpi_win_is_ready().

◆ p_file_op

struct nm_mpi_file_op_s* p_file_op

MPI-IO operation.

Definition at line 30 of file nm_mpi_private.h.

◆ p_grequest

struct nm_mpi_grequest_s* p_grequest

generalized request

Definition at line 31 of file nm_mpi_private.h.

◆ p_win

corresponding rma window

Definition at line 55 of file nm_mpi_private.h.

Referenced by nm_mpi_win_get_next_seq().

◆ 

struct { ... } partitioned

◆ partitions

int partitions

number of partitions

Definition at line 42 of file nm_mpi_private.h.

◆ query_fn

Definition at line 46 of file nm_mpi_private.h.

◆ rbuf

void* rbuf

pointer used for receiving

Definition at line 27 of file nm_mpi_private.h.

◆ request_error

int request_error

error status of the request, using MPI error codes

Definition at line 13 of file nm_mpi_private.h.

◆ request_nmad

nm_sr_request_t request_nmad

nmad request for sendrecv interface

Definition at line 3 of file nm_mpi_private.h.

◆ request_source

int request_source

rank of the source node (used for incoming request)

Definition at line 11 of file nm_mpi_private.h.

◆ request_type

nm_mpi_request_type_t request_type

type of the request

Definition at line 5 of file nm_mpi_private.h.

◆ 

struct { ... } rma

fields for send/recv requests created by the RMA operations

◆ sbuf

const void* sbuf

pointer for sending

Definition at line 28 of file nm_mpi_private.h.

◆ static_buf

char static_buf[64]

static buffer of max predefined datatype size

Definition at line 29 of file nm_mpi_private.h.

◆ status

status of request

Definition at line 7 of file nm_mpi_private.h.

Referenced by nm_sr_request_test(), and nm_status_spinwait().

◆ user_tag

int user_tag

tag given by the user

Definition at line 9 of file nm_mpi_private.h.

Referenced by nm_mpi_rma_create_tag(), and nm_mpi_rma_create_usertag().