NewMadeleine

Documentation

nm_public.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_PUBLIC_H
17#define NM_PUBLIC_H
18
53#include <stdlib.h>
54#include <stdio.h>
55#include <stdint.h>
56#include <nm_config.h>
57#include <nm_errno.h>
58#include <nm_types.h>
59#include <nm_data.h>
60#include <Padico/Puk.h>
61#if defined(NMAD_PIOMAN)
62# include <pioman.h>
63#endif
64
65/* ** Config sanity checks ********************************* */
66
67#if !defined(NMAD)
68# error "nmad CFLAGS not defined; please compile with CFLAGS returned by 'pkg-config --cflags nmad'"
69#endif /* NMAD */
70
71#if defined(NMAD_PIOMAN) && !defined(PIOMAN)
72# error "nmad was configured with pioman support; cannot build without pioman flags."
73#endif
74
75#if defined(PIOMAN) && !defined(NMAD_PIOMAN)
76# error "nmad was configured without pioman support; cannot build with pioman flags."
77#endif
78
79#if defined(NMAD_PUKABI) && !defined(PUKABI)
80# error "nmad was configured with PukABI support; cannot build without PukABI flags."
81#endif
82
83#if defined(PUKABI) && !defined(NMAD_PUKABI)
84# error "nmad was configured without PukABI support; cannot build with PukABI flags."
85#endif
86
87#if defined(PIOMAN_TOPOLOGY_HWLOC) && !defined(NMAD_HWLOC)
88# error "pioman was configured with hwloc, but nmad was configured without hwloc."
89#endif
90
91#if defined(NMAD_SIMGRID) && !defined(PUK_SIMGRID)
92# error "nmad was configured with simgrid, but Puk was configured without simgrid."
93#endif
94
95#if defined(PUK_SIMGRID) && !defined(NMAD_SIMGRID)
96# error "Puk was configured with simgrid, but nmad was configured without simgrid."
97#endif
98
99#if defined(NMAD_SIMGRID) && (defined(PIOMAN) && !defined(PIOMAN_SIMGRID))
100# error "nmad was configured with simgrid, but pioman was configured without simgrid."
101#endif
102
107{
114};
115
118static inline void nm_abi_config_capture(struct nm_abi_config_s*p_nm_abi_config)
119{
120#if defined(NMAD_DEBUG)
121 p_nm_abi_config->enable_debug = 1;
122#else
123 p_nm_abi_config->enable_debug = 0;
124#endif /* NMAD_DEBUG */
125#if defined(PIOMAN)
126 p_nm_abi_config->enable_pioman = 1;
127#else
128 p_nm_abi_config->enable_pioman = 0;
129#endif /* PIOMAN */
130#if defined(PIOMAN_PTHREAD)
131 p_nm_abi_config->enable_pthread = 1;
132#else
133 p_nm_abi_config->enable_pthread = 0;
134#endif /* PTHREAD */
135#if defined(MARCEL)
136 p_nm_abi_config->enable_marcel = 1;
137#else
138 p_nm_abi_config->enable_marcel = 0;
139#endif /* MARCEL */
140#if defined(PUKABI)
141 p_nm_abi_config->enable_pukabi = 1;
142#else
143 p_nm_abi_config->enable_pukabi = 0;
144#endif /* PUKABI */
145#if defined(NMAD_SIMGRID)
146 p_nm_abi_config->enable_simgrid = 1;
147#else
148 p_nm_abi_config->enable_simgrid = 0;
149#endif /* PUKABI */
150}
151
152
156#endif /* NM_PUBLIC_H */
High-level data manipulation through iterators.
This file contains error codes definitions.
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
This file contains some types and constants used throughout NewMad core and interfaces.
config options that impact nmad ABI (content of structures exposed in API or used in inline code)
Definition: nm_public.h:107