NewMadeleine

Documentation

nm_launcher_interface.h
Go to the documentation of this file.
1/*
2 * NewMadeleine
3 * Copyright (C) 2006-2024 (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_INTERFACE_H
17#define NM_LAUNCHER_INTERFACE_H
18
23#include <nm_public.h>
25
36static inline int nm_launcher_init(int*argc, char**argv);
37
40
43
46
49
52
54void nm_launcher_abort(int rc);
55
59int nm_launcher_init_checked(int*argc, char**argv, const struct nm_abi_config_s*p_nm_abi_config);
60
61static inline int nm_launcher_init(int*argc, char**argv)
62{
63 /* capture ABI config in application context
64 * and compare with nmad builtin ABI config */
65 struct nm_abi_config_s nm_abi_config = { 0 };
66 nm_abi_config_capture(&nm_abi_config);
67 return nm_launcher_init_checked(argc, argv, &nm_abi_config);
68}
69
72{
73 int rank;
77 return p_gate;
78}
79
82
86
87
88#endif /* NM_LAUNCHER_INTERFACE_H */
int nm_launcher_get_rank(int *rank)
Returns process rank.
int nm_launcher_get_size(int *size)
Returns the number of nodes.
void nm_launcher_abort(int rc)
Abort all processes.
int nm_launcher_exit(void)
Cleans session.
int nm_launcher_get_gate(int dest, nm_gate_t *gate)
Returns the gate for the process dest.
static int nm_launcher_init(int *argc, char **argv)
Initializes nmad.
int nm_launcher_get_dest(nm_gate_t p_gate, int *dest)
Returns the dest rank for the given gate.
static nm_gate_t p_gate
void nm_launcher_print_drivers_strategy(nm_core_t p_core)
print on stderr loaded drivers and the selected strategy
int nm_launcher_init_checked(int *argc, char **argv, const struct nm_abi_config_s *p_nm_abi_config)
int nm_launcher_homogeneous_network(void)
Checks whether the networks are homogeneous across all nodes.
static nm_gate_t nm_launcher_self_gate(void)
shortcut to get the gate to self
nm_gate_t gate
gate of the destination or the source node
nm_len_t size
size of the onsided data (not incuding target-side completion)
This is the common public header for NewMad.
static void nm_abi_config_capture(struct nm_abi_config_s *p_nm_abi_config)
Capture ABI config parameters in current context.
Definition: nm_public.h:118
config options that impact nmad ABI (content of structures exposed in API or used in inline code)
Definition: nm_public.h:107
Core NewMadeleine structure.
Definition: nm_core.h:39
Connection to another process.
Definition: nm_gate.h:100