NewMadeleine

Documentation

« back to PM2 home.
nm_launcher_interface.h File Reference
#include <nm_public.h>
#include <nm_session_interface.h>
#include <stdatomic.h>
Include dependency graph for nm_launcher_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_lazy_initializer_s
 

Macros

#define NM_LAZY_INITIALIZER_INIT   { .init_done = 0, .initializing = 0 }
 
#define NM_LAZY_INITIALIZER(ENAME, CTOR, DTOR)
 factorize process for lazy initialization.
 

Functions

int nm_launcher_init_nocheck (int *argc, char **argv)
 
static nm_gate_t nm_launcher_self_gate (void)
 shortcut to get the gate to self
 
void nm_launcher_print_drivers_strategy (nm_core_t p_core)
 print on stderr loaded drivers and the selected strategy
 
int nm_launcher_homogeneous_network (void)
 Checks whether the networks are homogeneous across all nodes.
 
typedef void(* nm_launcher_atexit_t) (void)
 
NM_EXTERN_C_BEGIN PUK_VECT_TYPE (nm_launcher_rank, int)
 
 PUK_VECT_TYPE (nm_launcher_subgroup, int)
 
static int nm_launcher_init (int *argc, char **argv)
 Initializes nmad.
 
int nm_launcher_exit (void)
 Cleans session.
 
int nm_launcher_get_rank (int *rank)
 Returns process rank.
 
int nm_launcher_get_size (int *size)
 Returns the number of nodes.
 
int nm_launcher_get_gate (int dest, nm_gate_t *gate)
 Returns the gate for the process dest.
 
int nm_launcher_get_dest (nm_gate_t p_gate, int *dest)
 Returns the dest rank for the given gate.
 
int nm_launcher_get_topology (struct nm_launcher_rank_vect_s *p_ranks, struct nm_launcher_subgroup_vect_s *p_subgroups, int *n_subgroups)
 Returns topology.
 
void nm_launcher_abort (int rc)
 Abort all processes.
 
void nm_launcher_atexit (nm_launcher_atexit_t p_func)
 registers a function to be called at exit
 

Macro Definition Documentation

◆ NM_LAZY_INITIALIZER

#define NM_LAZY_INITIALIZER (   ENAME,
  CTOR,
  DTOR 
)

factorize process for lazy initialization.

  • ENAME base name of variable to define
  • CTOR function called as constructor when init is needede
  • DTOR function called as destructor at application end.

Definition at line 122 of file nm_launcher_interface.h.

◆ NM_LAZY_INITIALIZER_INIT

#define NM_LAZY_INITIALIZER_INIT   { .init_done = 0, .initializing = 0 }

Definition at line 115 of file nm_launcher_interface.h.

Typedef Documentation

◆ nm_launcher_atexit_t

typedef void(* nm_launcher_atexit_t) (void)

Definition at line 71 of file nm_launcher_interface.h.

Function Documentation

◆ nm_launcher_abort()

void nm_launcher_abort ( int  rc)

Abort all processes.

◆ nm_launcher_atexit()

void nm_launcher_atexit ( nm_launcher_atexit_t  p_func)

registers a function to be called at exit

◆ nm_launcher_exit()

int nm_launcher_exit ( void  )

Cleans session.

Returns NM_ESUCCESS or EXIT_FAILURE.

Examples
nm_launcher_mini.c, nm_rpc_hello.c, and nm_sr_custom_data.c.

Referenced by nm_examples_exit().

◆ nm_launcher_get_dest()

int nm_launcher_get_dest ( nm_gate_t  p_gate,
int *  dest 
)

Returns the dest rank for the given gate.

◆ nm_launcher_get_gate()

int nm_launcher_get_gate ( int  dest,
nm_gate_t *  gate 
)

Returns the gate for the process dest.

Examples
nm_rpc_hello.c, and nm_sr_custom_data.c.

Referenced by nm_examples_init_topo(), and nm_launcher_self_gate().

◆ nm_launcher_get_rank()

int nm_launcher_get_rank ( int *  rank)

◆ nm_launcher_get_size()

int nm_launcher_get_size ( int *  size)

Returns the number of nodes.

Examples
nm_launcher_mini.c, nm_mcast_basic.c, nm_rpc_hello.c, and nm_sr_custom_data.c.

Referenced by nm_examples_init_topo().

◆ nm_launcher_get_topology()

int nm_launcher_get_topology ( struct nm_launcher_rank_vect_s *  p_ranks,
struct nm_launcher_subgroup_vect_s *  p_subgroups,
int *  n_subgroups 
)

Returns topology.

Parameters
[in]p_ranksranks to consider for topology
[out]p_subgroupssub-group index for the rank at the same index in p_ranks
Returns
-NM_ENOTIMPL if launcher does not support topology; NM_ESUCCESS otherwise.
Note
p_leaders & p_local are allocated and initialized by the caller.

◆ nm_launcher_homogeneous_network()

int nm_launcher_homogeneous_network ( void  )

Checks whether the networks are homogeneous across all nodes.

◆ nm_launcher_init()

static int nm_launcher_init ( int *  argc,
char **  argv 
)
inlinestatic

Initializes nmad.

Examples
nm_launcher_mini.c, nm_rpc_hello.c, and nm_sr_custom_data.c.

Definition at line 80 of file nm_launcher_interface.h.

References nm_abi_config_check(), and nm_launcher_init_nocheck().

Referenced by nm_examples_init_topo().

Here is the call graph for this function:

◆ nm_launcher_init_nocheck()

int nm_launcher_init_nocheck ( int *  argc,
char **  argv 
)

init launcher with ABI check

Referenced by nm_launcher_init().

◆ nm_launcher_print_drivers_strategy()

void nm_launcher_print_drivers_strategy ( nm_core_t  p_core)

print on stderr loaded drivers and the selected strategy

◆ nm_launcher_self_gate()

static nm_gate_t nm_launcher_self_gate ( void  )
inlinestatic

shortcut to get the gate to self

Definition at line 87 of file nm_launcher_interface.h.

References nm_launcher_get_gate(), nm_launcher_get_rank(), and p_gate.

Here is the call graph for this function:

◆ PUK_VECT_TYPE()

PUK_VECT_TYPE ( nm_launcher_subgroup  ,
int   
)