This repository has been archived by the owner on Sep 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h.in
290 lines (235 loc) · 6.75 KB
/
config.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
// Copyright (C) 2010, 2011, Steffen Knollmann
// Released under the terms of the GNU General Public License version 3.
// This file is part of `ginnungagap'.
#ifndef CONFIG_H
#define CONFIG_H
/*--- Doxygen file description ------------------------------------------*/
/**
* @file config.h
* @brief Provides the code configuration.
*
* This file is generated automatically by the configure script from the
* template file config.h.in. Every file in the package should include this
* header either directly, or, preferably, indirectly via the configuarion
* file of the library/modul it belongs to.
*/
/*--- Exported define values --------------------------------------------*/
/**
* @def CONFIG_SUMMARY_STRING
* @brief This holds the summary of the code documentation as shown
* when running configure.
*
* This string can be used within the code to report the capabilities
* with which it was compiled at runtime. That is tremendously useful
* to identify a binary.
*/
#define CONFIG_SUMMARY_STRING "__SUMMARYSTRING__"
/*--- Code Feature: OpenMP ----------------------------------------------*/
#undef WITH_OPENMP
#ifdef WITH_OPENMP
/**
* @def WITH_OPENMP
* @brief This will be defined when OpenMP should be used
*
* Note that this is not automatically defined just because an OpenMP
* aware compiler is used. For this macro to be defined two requisites
* must be met: The compiler must support OpenMP (as advertised through
* the _OPENMP macro) and the user must have asked for OpenMP support
* (through the configure script).
*
* Within the code, all checks for OpenMP must be done against this
* macro and not against _OPENMP. This restriction is in place to force
* a conscious decision about the usage of Threads.
*/
#endif
/*
* The check for _OPENMP needs to be after the doxygen documentation has
* been genearted, as doxygen never has _OPENMP defined.
*/
#ifdef WITH_OPENMP
# ifndef _OPENMP
# undef WITH_OPENMP
# endif
#endif
/*--- Code Feature: MPI -------------------------------------------------*/
#undef WITH_MPI
#ifdef WITH_MPI
/**
* @def WITH_MPI
* @brief This will be defined when MPI is used.
*/
#endif
/*--- Code Feature: MPItrace --------------------------------------------*/
#undef WITH_MPITRACE
#if (defined WITH_MPITRACE && !defined MPI)
# error WITH_MPITRACE requires WITH_MPI to be set as well.
#endif
#ifdef WITH_MPITRACE
/**
* @def WITH_MPITRACE
* @brief This will be defined when MPITrace is used to profile the
* code.
*/
#endif
/*--- Code Feature: SPRNG -----------------------------------------------*/
#undef WITH_SPRNG
#ifdef WITH_SPRNG
/**
* @def WITH_SPRNG
* @brief This will be defined when SPRNG is used.
*/
#endif
/*--- Code Feature: SILO ------------------------------------------------*/
#undef WITH_SILO
#ifdef WITH_SILO
/**
* @def WITH_SILO
* @brief This will be defined when Silo is used.
*/
#endif
/*--- Code Feature: HDF5 ------------------------------------------------*/
#undef WITH_HDF5
#ifdef WITH_HDF5
/**
* @def WITH_HDF5
* @brief This will be defined when HDF5 is used.
*/
#endif
/*--- Code Feature: FFT -------------------------------------------------*/
/// @cond IGNORE
#undef WITH_FFT_FFTW2
#undef WITH_FFT_FFTW3
#if (!defined ENABLE_FFT_BACKEND_FFTW2 && !defined ENABLE_FFT_BACKEND_FFTW3)
# define ENABLE_FFT_BACKEND_FFTW3
#endif
/// @endcond
/*--- Code Feature: Double or Single Precision --------------------------*/
#undef ENABLE_DOUBLE
/**
* @brief A floating point type that can be defined (at compile time)
* to be either single or double precision.
*/
#ifdef ENABLE_DOUBLE
typedef double fpv_t;
# if (defined ENABLE_FFT_BACKEND_FFTW3)
# include <complex.h>
typedef double complex fpvComplex_t;
# endif
# define FPV_C(a) a
# define SCNfpv "lf"
# define PRIfpv "g"
# ifdef WITH_MPI
# define MYMPI_FPV MPI_DOUBLE
# endif
#else
typedef float fpv_t;
# if (defined ENABLE_FFT_BACKEND_FFTW3)
# include <complex.h>
typedef float complex fpvComplex_t;
# endif
# define FPV_C(a) a ## f
# define SCNfpv "f"
# define PRIfpv "g"
# ifdef WITH_MPI
# define MYMPI_FPV MPI_FLOAT
# endif
#endif
/**
* @def FPV_C(a)
* @brief Used to write a literal value of type #fpv_t in the code.
*
* This should be used analogous to the macros provided by inttypes.h
* for fixed width integer types.
*/
/**
* @def SCNfpv
* @brief Gives the suitable qualifier for scanf() to read an #fpv_t.
*
* This should be used analogous to the macros provided by inttypes.h
* for fixed width integer types.
*/
/**
* @def PRIfpv
* @brief Gives the suitable qualifier for printf() to print an #fpv_t.
*
* This should be used analogous to the macros provided by inttypes.h
* for fixed width integer types.
*/
#ifdef WITH_MPI
/**
* @def MYMPI_FPV
* @brief Sets the proper MPI Datatype that corresponds to #fpv_t.
*/
#endif
#ifdef ENABLE_FFT_BACKEND_FFTW3
/**
* @typedef fpvComplex_t
* @brief The complex version of #fpv_t.
*/
#endif
#ifdef ENABLE_DOUBLE
/**
* @def ENABLE_DOUBLE
* @brief This will be defined if the code should used double
* precision.
*
* All calculations will be done in double precision in any case and the
* result will also always be in double precision. This switch refers
* to the storage class of the particle data and the grid.
*/
#endif
/*--- Code Feature: Dimensionality of the code --------------------------*/
/**
* @def NDIM
* @brief This gives the employed dimensionality of the code.
*
* This is not actually used but exists for forward compatibility. At
* the moment this should always be 3.
*/
#define NDIM __NDIM_VALUE__
/**
* @def POW_NDIM(a)
* @brief This will take a value \a a to the power of NDIM.
*/
#if (NDIM == 2)
# define POW_NDIM(a) ((a) * (a))
#elif (NDIM == 3)
# define POW_NDIM(a) ((a) * (a) * (a))
#else
# error NDIM must be 2 or 3
#endif
/*--- Code Feature: Debugging mode --------------------------------------*/
#undef ENABLE_DEBUG
/// @cond IGNORE
#ifdef ENABLE_DEBUG
# undef NDEBUG
# define DEBUG
#else
# define NDEBUG
# undef DEBUG
#endif
/// @endcond
#ifdef ENABLE_DEBUG
/**
* @def ENABLE_DEBUG
* @brief This will be defined if the code is compiled in debugging
* mode.
*/
#endif
/*--- Code Feature: Writing of large data -------------------------------*/
#undef ENABLE_WRITING
#ifdef ENABLE_WRITING
/**
* @def ENABLE_WRITING
* @brief If defined, will enable the actual writing of large data set.
*
* This is merely a switch for benchmarking: If it is not set, then
* ginnungagap will not write the calculated density/velocity fields. For
* proper functioning of the code, it should always be set.
*/
#endif
/*--- Deprecated Features (will be removed eventually) ------------------*/
///@cond IGNORE
#undef WITH_PROC_DIR
///@endcond
#endif