NewMadeleine

Documentation

« back to PM2 home.
nm_sync_clocks_interface.h File Reference
#include <nm_coll_interface.h>
#include <nm_sendrecv_interface.h>
#include "nm_sync_clocks_generic.h"
Include dependency graph for nm_sync_clocks_interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  nm_sync_clocks_nmad_s
 

Macros

#define SYNC_CLOCKS_USE_PUK
 
#define nm_sync_clocks_compute_offsets   sync_clocks_generic_synchronize
 
#define nm_sync_clocks_apply_offset   sync_clocks_generic_remote_to_global
 

Typedefs

typedef struct sync_clocks_generic_s * nm_sync_clocks_t
 an opaque sync-clocks object
 

Functions

static nm_sync_clocks_t nm_sync_clocks_init (nm_comm_t p_comm)
 
static void nm_sync_clocks_shutdown (nm_sync_clocks_t p_clocks)
 destroy the given clock
 
static double nm_sync_clocks_get_time_usec (nm_sync_clocks_t p_clocks)
 get local time, in usec.
 
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 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 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 void nm_sync_clocks_synchronize (nm_sync_clocks_t p_clocks)
 synchronize time offsets between nodes; collective operation on communicator
 
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 will contain barrier time in local clock returns -1 if the barrier was missed, 0 otherwise
 
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 double nm_sync_clocks_get_origin (nm_sync_clocks_t p_clocks)
 get the real time origin
 
static double nm_sync_clocks_add_real_origin_usec (nm_sync_clocks_t p_clocks, double t)
 
static void nm_sync_clocks_send (nm_sync_clocks_t p_clocks, int dest, int tag, void *p_data, int size)
 
static void nm_sync_clocks_recv (nm_sync_clocks_t p_clocks, int from, int tag, void *p_data, int size)
 
static void nm_sync_clocks_bcast (nm_sync_clocks_t p_clocks, int root, int tag, void *p_data, int size)
 
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 void nm_sync_clocks_nm_barrier (nm_sync_clocks_t p_clocks)
 

Macro Definition Documentation

◆ nm_sync_clocks_apply_offset

#define nm_sync_clocks_apply_offset   sync_clocks_generic_remote_to_global

Definition at line 74 of file nm_sync_clocks_interface.h.

◆ nm_sync_clocks_compute_offsets

#define nm_sync_clocks_compute_offsets   sync_clocks_generic_synchronize

Definition at line 72 of file nm_sync_clocks_interface.h.

◆ SYNC_CLOCKS_USE_PUK

#define SYNC_CLOCKS_USE_PUK

Definition at line 22 of file nm_sync_clocks_interface.h.

Typedef Documentation

◆ nm_sync_clocks_t

typedef struct sync_clocks_generic_s* nm_sync_clocks_t

an opaque sync-clocks object

Definition at line 35 of file nm_sync_clocks_interface.h.

Function Documentation

◆ nm_sync_clocks_add_real_origin_usec()

static double nm_sync_clocks_add_real_origin_usec ( nm_sync_clocks_t  p_clocks,
double  t 
)
inlinestatic

Definition at line 76 of file nm_sync_clocks_interface.h.

◆ nm_sync_clocks_barrier()

static int nm_sync_clocks_barrier ( nm_sync_clocks_t  p_clocks,
double *  barrier_local_time 
)
inlinestatic

a barrier that unlocks all node at the same time as much as possible parameter barrier_local_time will contain barrier time in local clock returns -1 if the barrier was missed, 0 otherwise

Definition at line 176 of file nm_sync_clocks_interface.h.

◆ nm_sync_clocks_bcast()

static void nm_sync_clocks_bcast ( nm_sync_clocks_t  p_clocks,
int  root,
int  tag,
void *  p_data,
int  size 
)
inlinestatic

Definition at line 104 of file nm_sync_clocks_interface.h.

References nm_coll_bcast(), nm_sync_clocks_nmad_s::p_comm, root, size, and tag.

Referenced by nm_sync_clocks_init().

Here is the call graph for this function:

◆ nm_sync_clocks_gather()

static void nm_sync_clocks_gather ( nm_sync_clocks_t  p_clocks,
int  root,
int  tag,
void *  p_sbuf,
int  size,
void *  p_rbuf 
)
inlinestatic

Definition at line 109 of file nm_sync_clocks_interface.h.

References nm_coll_gather(), nm_sync_clocks_nmad_s::p_comm, root, size, and tag.

Referenced by nm_sync_clocks_init().

Here is the call graph for this function:

◆ nm_sync_clocks_get_origin()

static double nm_sync_clocks_get_origin ( nm_sync_clocks_t  p_clocks)
inlinestatic

get the real time origin

Definition at line 186 of file nm_sync_clocks_interface.h.

◆ nm_sync_clocks_get_skew()

static long double nm_sync_clocks_get_skew ( nm_sync_clocks_t  p_clocks,
int  rank 
)
inlinestatic

get the clock skew between master and given rank

Definition at line 181 of file nm_sync_clocks_interface.h.

◆ nm_sync_clocks_get_time_usec()

static double nm_sync_clocks_get_time_usec ( nm_sync_clocks_t  p_clocks)
inlinestatic

get local time, in usec.

from origin

Definition at line 151 of file nm_sync_clocks_interface.h.

◆ nm_sync_clocks_global_to_local()

static double nm_sync_clocks_global_to_local ( nm_sync_clocks_t  p_clocks,
double  global_time 
)
inlinestatic

get local time for the given global time

Definition at line 166 of file nm_sync_clocks_interface.h.

◆ nm_sync_clocks_init()

◆ nm_sync_clocks_local_to_global()

static double nm_sync_clocks_local_to_global ( nm_sync_clocks_t  p_clocks,
double  local_t 
)
inlinestatic

compute global time for the given local time

Definition at line 161 of file nm_sync_clocks_interface.h.

◆ nm_sync_clocks_nm_barrier()

static void nm_sync_clocks_nm_barrier ( nm_sync_clocks_t  p_clocks)
inlinestatic

Definition at line 114 of file nm_sync_clocks_interface.h.

References nm_coll_barrier(), nm_sync_clocks_nmad_s::p_comm, and tag.

Referenced by nm_sync_clocks_init().

Here is the call graph for this function:

◆ nm_sync_clocks_recv()

static void nm_sync_clocks_recv ( nm_sync_clocks_t  p_clocks,
int  from,
int  tag,
void *  p_data,
int  size 
)
inlinestatic

Definition at line 97 of file nm_sync_clocks_interface.h.

References nm_comm_get_gate(), nm_comm_get_session(), nm_sr_recv(), nm_sync_clocks_nmad_s::p_comm, p_gate, p_session, size, and tag.

Referenced by nm_sync_clocks_init().

Here is the call graph for this function:

◆ nm_sync_clocks_remote_to_global()

static double nm_sync_clocks_remote_to_global ( nm_sync_clocks_t  p_clocks,
int  rank,
double  t 
)
inlinestatic

get global clock (in usec.) from remote local clock

Definition at line 156 of file nm_sync_clocks_interface.h.

◆ nm_sync_clocks_send()

static void nm_sync_clocks_send ( nm_sync_clocks_t  p_clocks,
int  dest,
int  tag,
void *  p_data,
int  size 
)
inlinestatic

Definition at line 90 of file nm_sync_clocks_interface.h.

References nm_comm_get_gate(), nm_comm_get_session(), nm_sr_send(), nm_sync_clocks_nmad_s::p_comm, p_gate, p_session, size, and tag.

Referenced by nm_sync_clocks_init().

Here is the call graph for this function:

◆ nm_sync_clocks_shutdown()

static void nm_sync_clocks_shutdown ( nm_sync_clocks_t  p_clocks)
inlinestatic

destroy the given clock

Definition at line 144 of file nm_sync_clocks_interface.h.

References nm_comm_destroy(), and nm_sync_clocks_nmad_s::p_comm.

Here is the call graph for this function:

◆ nm_sync_clocks_synchronize()

static void nm_sync_clocks_synchronize ( nm_sync_clocks_t  p_clocks)
inlinestatic

synchronize time offsets between nodes; collective operation on communicator

Definition at line 171 of file nm_sync_clocks_interface.h.