16#ifndef NM_SYNC_CLOCKS_H
17#define NM_SYNC_CLOCKS_H
22#define SYNC_CLOCKS_USE_PUK
23#include "nm_sync_clocks_generic.h"
72#define nm_sync_clocks_compute_offsets sync_clocks_generic_synchronize
74#define nm_sync_clocks_apply_offset sync_clocks_generic_remote_to_global
78 return t + sync_clocks_generic_get_origin(p_clocks);;
126 static const struct sync_clocks_backend_s backend =
134 struct sync_clocks_generic_s*p_clocks = malloc(
sizeof(
struct sync_clocks_generic_s));
135 p_clocks->backend = backend;
140 sync_clocks_generic_init(p_clocks);
148 sync_clocks_generic_shutdown(p_clocks);
153 return sync_clocks_generic_get_time_usec(p_clocks);
158 return sync_clocks_generic_remote_to_global(p_clocks, rank, remote_time);
163 return sync_clocks_generic_local_to_global(p_clocks, local_time);
168 return sync_clocks_generic_global_to_local(p_clocks, global_time);
173 sync_clocks_generic_synchronize(p_clocks);
178 return sync_clocks_generic_barrier(p_clocks, barrier_local_time);
183 return sync_clocks_generic_get_skew(p_clocks, rank);
188 return sync_clocks_generic_get_origin(p_clocks);
void nm_coll_gather(nm_comm_t comm, int root, const void *sbuf, nm_len_t slen, void *rbuf, nm_len_t rlen, nm_tag_t tag)
void nm_coll_barrier(nm_comm_t comm, nm_tag_t tag)
void nm_coll_bcast(nm_comm_t comm, int root, void *buffer, nm_len_t len, nm_tag_t tag)
void nm_comm_destroy(nm_comm_t p_comm)
destroy a communicator- no synchronization is done
nm_comm_t nm_comm_dup(nm_comm_t comm)
get a duplicate of the given communicator- collective on parent communicator
static int nm_comm_rank(nm_comm_t p_comm)
static nm_gate_t nm_comm_get_gate(nm_comm_t p_comm, int rank)
static int nm_comm_size(nm_comm_t p_comm)
static nm_session_t nm_comm_get_session(nm_comm_t p_comm)
nm_tag_t tag
the user-supplied tag
static nm_session_t p_session
nm_len_t size
size of the onsided data (not incuding target-side completion)
static int nm_sr_recv(nm_session_t p_session, nm_gate_t p_gate, nm_tag_t tag, void *data, nm_len_t len)
blocking recv
static int nm_sr_send(nm_session_t p_session, nm_gate_t p_gate, nm_tag_t tag, const void *data, nm_len_t len)
blocking send
static void nm_sync_clocks_send(nm_sync_clocks_t p_clocks, int dest, int tag, void *p_data, int size)
static double nm_sync_clocks_global_to_local(nm_sync_clocks_t p_clocks, double global_time)
get local time for the given global time
static void nm_sync_clocks_shutdown(nm_sync_clocks_t p_clocks)
destroy the given clock
static double nm_sync_clocks_add_real_origin_usec(nm_sync_clocks_t p_clocks, double t)
static void nm_sync_clocks_nm_barrier(nm_sync_clocks_t p_clocks)
static void nm_sync_clocks_recv(nm_sync_clocks_t p_clocks, int from, int tag, void *p_data, int size)
static double nm_sync_clocks_remote_to_global(nm_sync_clocks_t p_clocks, int rank, double t)
get global clock (in usec.) from remote local clock
static void nm_sync_clocks_bcast(nm_sync_clocks_t p_clocks, int root, int tag, void *p_data, int size)
static double nm_sync_clocks_local_to_global(nm_sync_clocks_t p_clocks, double local_t)
compute global time for the given local time
static nm_sync_clocks_t nm_sync_clocks_init(nm_comm_t p_comm)
struct sync_clocks_generic_s * nm_sync_clocks_t
an opaque sync-clocks object
static long double nm_sync_clocks_get_skew(nm_sync_clocks_t p_clocks, int rank)
get the clock skew between master and given rank
static void nm_sync_clocks_synchronize(nm_sync_clocks_t p_clocks)
synchronize time offsets between nodes; collective operation on communicator
static double nm_sync_clocks_get_origin(nm_sync_clocks_t p_clocks)
get the real time origin
static double nm_sync_clocks_get_time_usec(nm_sync_clocks_t p_clocks)
get local time, in usec.
static void nm_sync_clocks_gather(nm_sync_clocks_t p_clocks, int root, int tag, void *p_sbuf, int size, void *p_rbuf)
static int nm_sync_clocks_barrier(nm_sync_clocks_t p_clocks, double *barrier_local_time)
a barrier that unlocks all node at the same time as much as possible parameter barrier_local_time wil...
uint64_t nm_tag_t
user tags, 64 bits, contained in indirect hashtable
Connection to another process.