NewMadeleine

Documentation

« back to PM2 home.
nm_launcher_private.h
Go to the documentation of this file.
1/*
2 * NewMadeleine
3 * Copyright (C) 2006-2026 (see AUTHORS file)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 */
15
16#ifndef NM_LAUNCHER_PRIVATE_H
17#define NM_LAUNCHER_PRIVATE_H
18
26#include <nm_core_interface.h>
27#include <Padico/Puk.h>
28
36
39{
41 void (*init)(void*_status, int*argc, char**argv, const char*label);
43 void (*barrier)(void*_status);
45 void (*get_gates)(void*_status, nm_gate_t*gates);
47 void (*get_topology)(void*_status, struct nm_launcher_rank_vect_s*p_ranks,
48 struct nm_launcher_subgroup_vect_s*p_subgroups, int*n_subgroups);
50 void (*abort)(void*_status, int rc);
51};
52
54PUK_IFACE_TYPE(NewMad_Launcher, struct nm_launcher_driver_s);
55
58{
60 char*p_url;
61 struct nm_drv_vect_s drvs;
62};
63
71
73PUK_HASHTABLE_TYPE(nm_component, puk_component_t, nm_drv_t,
74 &puk_hash_pointer_default_hash, &puk_hash_pointer_default_eq, NULL);
75
76void nm_launcher_gates_init(struct nm_launcher_gates_s*p_gates, int size, int rank);
77
79
82
83
84/* ********************************************************* */
85/* ** interface for launchers to interact with nmad */
86
89void nm_launcher_set_info(const struct nm_launcher_info_s*p_info);
90
95nm_drv_t nm_launcher_add_driver(puk_component_t component, nm_trk_kind_t kind);
96
99typedef nm_drv_vect_t (*nm_launcher_selector_t)(const char*url, void*_arg);
103
107int nm_launcher_get_url(const char**p_local_url);
108
113int nm_launcher_connect_async(nm_gate_t*pp_gate, const char*remote_url);
114
118
119
120/* ** direct send/recv functions, without session */
121
122void nm_launcher_isend(struct nm_req_s*p_req, struct nm_data_s*p_data, struct nm_gate_s*p_gate);
123
125
126void nm_launcher_irecv(struct nm_req_s*p_req, struct nm_data_s*p_data, struct nm_gate_s*p_gate);
127
129
130#endif /* NM_LAUNCHER_PRIVATE_H */
nm_data_propertie_gpu_preinit & p_data
Definition nm_data.h:538
static nm_gate_t p_gate
void nm_launcher_send(struct nm_data_s *p_data, struct nm_gate_s *p_gate)
void nm_launcher_gates_connect(struct nm_launcher_gates_s *p_gates)
connects the given set of gates
PUK_IFACE_TYPE(NewMad_Launcher, struct nm_launcher_driver_s)
int nm_launcher_get_url(const char **p_local_url)
Finalizes process of driver loading & return local url.
nm_drv_t nm_launcher_add_driver(puk_component_t component, nm_trk_kind_t kind)
Add a driver to the session.
int nm_launcher_connect_wait(nm_gate_t p_gate)
Wait for a given async connection to get ready.
void nm_launcher_gates_init(struct nm_launcher_gates_s *p_gates, int size, int rank)
void nm_launcher_recv(struct nm_data_s *p_data, struct nm_gate_s *p_gate)
void nm_launcher_set_info(const struct nm_launcher_info_s *p_info)
Declare the rank, size & properties of job/launcher.
PUK_HASHTABLE_TYPE(nm_component, puk_component_t, nm_drv_t, &puk_hash_pointer_default_hash, &puk_hash_pointer_default_eq, NULL)
hash nm drivers by component
nm_drv_vect_t(* nm_launcher_selector_t)(const char *url, void *_arg)
Type for 'selector'.
void nm_launcher_isend(struct nm_req_s *p_req, struct nm_data_s *p_data, struct nm_gate_s *p_gate)
void nm_launcher_gates_destroy(struct nm_launcher_gates_s *p_gates)
int nm_launcher_connect_async(nm_gate_t *pp_gate, const char *remote_url)
Asynchronously start connection establishment for the given gate.
void nm_launcher_irecv(struct nm_req_s *p_req, struct nm_data_s *p_data, struct nm_gate_s *p_gate)
void nm_launcher_set_selector(nm_launcher_selector_t selector, void *_arg)
Declare the selector to use to establish connections.
nm_len_t size
size of the onsided data (not incuding target-side completion)
enum nm_trk_kind_e nm_trk_kind_t
a data descriptor, used to pack/unpack data from app layout to/from contiguous buffers
Definition nm_data.h:199
a driver.
Definition nm_drv.h:35
Connection to another process.
Definition nm_gate.h:104
void(* get_topology)(void *_status, struct nm_launcher_rank_vect_s *p_ranks, struct nm_launcher_subgroup_vect_s *p_subgroups, int *n_subgroups)
get the topology of processes
void(* init)(void *_status, int *argc, char **argv, const char *label)
initialize nmad, establishe connections
void(* get_gates)(void *_status, nm_gate_t *gates)
get the list of gates
void(* abort)(void *_status, int rc)
abort the full session
void(* barrier)(void *_status)
barrier accross all processes, implemented out-of-band of nmad
an entry for a remote node
struct nm_drv_vect_s drvs
a set of gates to manage connection establishment by launcher
struct nm_launcher_gate_s * p_gates
block of info given by the launcher
int size
the number of nodes in the job
int rank
rank of the local process
int wide_url_support
whether the launcher supports wide urls
a generic pack/unpack request