Encapsulate gmx_wallclock_accounting_t into new timing module
[alexxy/gromacs.git] / src / config.h.cmakein
1 /*! \libinternal \file
2  * \brief
3  * Include file for configuration macros from the build system.
4  *
5  * This header is not installed, so headers must not reference macros defined
6  * here.
7  *
8  * \inlibraryapi
9  */
10 #include "gromacs/utility/gmx_header_config.h"
11
12 /* TODO: For now, disable Doxygen warnings from here */
13 /*! \cond */
14
15 /* Disable warnings about double-to-float conversion accuracy loss on MSVC */
16 #ifdef _MSC_VER
17 #pragma warning (disable : 4305)
18 #pragma warning (disable : 4244)
19 #pragma warning (disable : 4101)
20 #pragma warning (disable : 4996)
21 #pragma warning (disable : 4267)
22 #pragma warning (disable : 4090)
23 #endif
24
25 /* Name of package (translate from cmake to autoconf macro name) */
26 #define PACKAGE  "@PROJECT_NAME@"
27
28 /* Version number of package (translate from cmake to autoconf macro name) */
29 #define VERSION  "@PROJECT_VERSION@"
30
31 /* Use extra version information generated with git */
32 #cmakedefine GMX_GIT_VERSION_INFO
33
34 /* Default location of data files */
35 #define GMXLIB_SEARCH_DIR "@GMXLIB_SEARCH_DIR@"
36
37 /* Default location of data files */
38 #define GMXLIB_FALLBACK "@GMXLIB_FALLBACK@"
39
40 /* Binary suffix for the created binaries */
41 #define GMX_BINARY_SUFFIX "@GMX_BINARY_SUFFIX@"
42
43 /* Source directory for the build */
44 #cmakedefine CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@"
45
46 /* Binary directory for the build */
47 #cmakedefine CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@"
48
49 /* Turn off water-water neighborlist optimization only - not used right now */
50 #cmakedefine DISABLE_WATERWATER_NLIST
51
52 /* Turn off all water neighborlist optimization - not used right now */
53 #cmakedefine DISABLE_WATER_NLIST
54
55 /* IEEE754 floating-point format. Memory layout is defined by macros
56  * GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER and GMX_IEEE754_BIG_ENDIAN_WORD_ORDER. 
57  */
58 #cmakedefine GMX_FLOAT_FORMAT_IEEE754
59
60 /* Work around broken calloc() */
61 #cmakedefine GMX_BROKEN_CALLOC
62
63 /* Enable special hacks for Cray XT3 */
64 #cmakedefine GMX_CRAY_XT3
65
66 /* Do not optimize FFTW setups (not needed with SSE FFT kernels) */
67 #cmakedefine GMX_DISABLE_FFTW_MEASURE
68
69 /* Compile in double precision */
70 #cmakedefine GMX_DOUBLE
71
72 /* Use Built-in FFTPACK FFT library */
73 #cmakedefine GMX_FFT_FFTPACK
74
75 /* Use FFTW3 FFT library */
76 #cmakedefine GMX_FFT_FFTW3
77
78 /* Use Intel MKL FFT library */
79 #cmakedefine GMX_FFT_MKL
80
81 /* Use AMD core math library */
82 #cmakedefine GMX_FFT_ACML
83
84 /* Target platform is x86 or x86_64 */
85 #cmakedefine GMX_IS_X86
86
87 /* Target platform is BlueGene/Q */
88 #cmakedefine GMX_IS_BGQ
89
90 /* SSE2 instructions available */
91 #cmakedefine GMX_X86_SSE2
92
93 /* SSE4.1 instructions available */
94 #cmakedefine GMX_X86_SSE4_1
95
96 /* AVX 128-bit FMA instructions available */
97 #cmakedefine GMX_X86_AVX_128_FMA
98
99 /* AVX 256-bit instructions available */
100 #cmakedefine GMX_X86_AVX_256
101
102 /* GCC bug in AVX maskload/maskstore arguments - worked around internally */
103 #cmakedefine GMX_X86_AVX_GCC_MASKLOAD_BUG
104
105 /* SSE2 was selected as CPU acceleration level */
106 #cmakedefine GMX_CPU_ACCELERATION_X86_SSE2
107
108 /* SSE4.1 was selected as CPU acceleration level */
109 #cmakedefine GMX_CPU_ACCELERATION_X86_SSE4_1
110
111 /* AVX 128-bit FMA was selected as CPU acceleration level */
112 #cmakedefine GMX_CPU_ACCELERATION_X86_AVX_128_FMA
113
114 /* AVX 256-bit was selected as CPU acceleration level */
115 #cmakedefine GMX_CPU_ACCELERATION_X86_AVX_256
116
117 /* IBM QPX was selected as CPU acceleration type (e.g. BlueGene/Q) */
118 #cmakedefine GMX_CPU_ACCELERATION_IBM_QPX
119
120 /* Fujitsu Sparc64 HPC-ACE SIMD acceleration */
121 #cmakedefine GMX_CPU_ACCELERATION_SPARC64_HPC_ACE
122
123 /* String for CPU acceleration choice (for writing to log files and stdout) */
124 #define GMX_CPU_ACCELERATION_STRING "@GMX_CPU_ACCELERATION@"
125
126 /* Integer byte order is big endian. */
127 #cmakedefine GMX_INTEGER_BIG_ENDIAN 
128
129 /* Use our own instead of system XDR libraries */
130 #cmakedefine GMX_INTERNAL_XDR
131
132 /* Use MPI (with mpicc) for parallelization */
133 #cmakedefine GMX_LIB_MPI
134
135 /* MPI_IN_PLACE exists for collective operations */
136 #cmakedefine MPI_IN_PLACE_EXISTS
137
138 /* Make a parallel version of GROMACS using message passing 
139    (MPI or thread_mpi) */
140 #cmakedefine GMX_MPI
141
142 /* Use threads_mpi for parallelization */
143 #cmakedefine GMX_THREAD_MPI
144
145 /* Use OpenMP multithreading */
146 #cmakedefine GMX_OPENMP
147
148 /* Ignore calls to nice(3) */
149 #cmakedefine GMX_NO_NICE
150
151 /* Ignore calls to system(3) */
152 #cmakedefine GMX_NO_SYSTEM
153
154 /* Use (modified) Gamess-UK for QM-MM calculations */
155 #cmakedefine GMX_QMMM_GAMESS
156
157 /* Use (modified) Gaussian0x for QM-MM calculations */
158 #cmakedefine GMX_QMMM_GAUSSIAN
159
160 /* Use (modified) Mopac 7 for QM-MM calculations */
161 #cmakedefine GMX_QMMM_MOPAC
162
163 /* Use ORCA for QM-MM calculations */
164 #cmakedefine GMX_QMMM_ORCA
165
166 /* Use the GROMACS software 1/sqrt(x) */
167 #cmakedefine GMX_SOFTWARE_INVSQRT
168
169 /* Use sub-counters */
170 #cmakedefine GMX_CYCLE_SUBCOUNTERS
171
172 /* Compile with plugin support */
173 #cmakedefine GMX_USE_PLUGINS
174
175 /* Fallback path for VMD plug-ins */
176 #define GMX_VMD_PLUGIN_PATH "@GMX_VMD_PLUGIN_PATH@"
177
178 /* Define when pthreads are used */
179 #cmakedefine THREAD_PTHREADS
180
181 /* Define when Windows threads are used */
182 #cmakedefine THREAD_WINDOWS
183
184 /* Define native atomic operations are found */
185 #cmakedefine TMPI_ATOMICS
186
187 /* Define for busy wait option  */
188 #cmakedefine TMPI_WAIT_FOR_NO_ONE
189
190 /* Define for copy buffer option */
191 #cmakedefine TMPI_COPY_BUFFER
192
193 /* Define for tmpi warnings option */
194 #cmakedefine TMPI_WARNINGS
195
196 /* Define for profiling option */
197 #cmakedefine TMPI_PROFILE
198
199 /* Define for Linux pthread_setaffinity_np */
200 #cmakedefine HAVE_PTHREAD_SETAFFINITY
201
202 /* Define for Windows NUMA-aware allocator functions*/
203 #cmakedefine TMPI_WINDOWS_NUMA_API
204
205 /* Define for GetSystemInfo() */
206 #cmakedefine HAVE_SYSTEM_INFO
207
208 /* Define for X-Windows */
209 #cmakedefine HAVE_X11
210
211 /* Enable x86 gcc inline assembly */
212 #cmakedefine GMX_X86_GCC_INLINE_ASM
213
214 /* Use GPU native acceleration */
215 #cmakedefine GMX_GPU
216
217 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
218 #cmakedefine HAVE_FSEEKO
219
220 /* Define to 1 if _fseeki64 (and presumably _fseeki64) exists and is declared. */
221 #cmakedefine HAVE__FSEEKI64
222
223 /* Define to 1 if you have the gsl library (-lgsl). */
224 #cmakedefine HAVE_LIBGSL
225
226 /* Have io.h (windows)*/
227 #cmakedefine HAVE_IO_H
228
229 /* Define to 1 if you have the posix_memalign() function. */
230 #cmakedefine HAVE_POSIX_MEMALIGN
231
232 /* Define to 1 if you have the memalign() function. */
233 #cmakedefine HAVE_MEMALIGN
234
235 /* Define to 1 if you have the MSVC _aligned_malloc() function. */
236 #cmakedefine HAVE__ALIGNED_MALLOC
237
238 /* Define to 1 if you have the clock_gettime() function. */
239 #cmakedefine HAVE_CLOCK_GETTIME
240
241 /* Define to 1 if you have the gettimeofday() function. */
242 #cmakedefine HAVE_GETTIMEOFDAY
243
244 /* Define to 1 if you have the isfinite() function. */
245 #cmakedefine HAVE_ISFINITE
246
247 /* Define to 1 if you have the _isfinite() function. */
248 #cmakedefine HAVE__ISFINITE
249
250 /* Define to 1 if you have the _finite() function. */
251 #cmakedefine HAVE__FINITE
252
253 /* Define to 1 if you have the fsync() function. */
254 #cmakedefine HAVE_FSYNC
255
256 /* Define to 1 if you have the Windows _commit() function. */
257 #cmakedefine HAVE__COMMIT
258
259 /* Define to 1 if you have the fileno() function. */
260 #cmakedefine HAVE_FILENO
261
262 /* Define to 1 if you have the _fileno() function. */
263 #cmakedefine HAVE__FILENO
264
265 /* Define to 1 if you have the sigaction() function. */
266 #cmakedefine HAVE_SIGACTION
267
268 /* Define to 1 if you have the rsqrt() function. */
269 #cmakedefine HAVE_RSQRT
270
271 /* Define to 1 if you have the rsqrtf() function. */
272 #cmakedefine HAVE_RSQRTF
273
274 /* Define to 1 if you have the sqrtf() function. */
275 #cmakedefine HAVE_SQRTF
276
277 /* Define to 1 if yo have the <unistd.h> header file. */
278 #cmakedefine HAVE_UNISTD_H
279
280 /* Define to 1 if yo have the <pwd.h> header file. */
281 #cmakedefine HAVE_PWD_H
282
283 /* Define to 1 if yo have the <dirent.h> header file. */
284 #cmakedefine HAVE_DIRENT_H
285
286 /* Define to 1 if you have the <sys/time.h> header file. */
287 #cmakedefine HAVE_SYS_TIME_H
288
289 /* Define to 1 if you have the <x86intrin.h> header file */
290 #cmakedefine HAVE_X86INTRIN_H
291
292 /* Define to 1 if you have the <intrin.h> header file */
293 #cmakedefine HAVE_INTRIN_H
294
295 /* Define to 1 if you have the <sched.h> header */
296 #cmakedefine HAVE_SCHED_H
297
298 /* Define to 1 if you have the POSIX <regex.h> header file. */
299 #cmakedefine HAVE_POSIX_REGEX
300
301 /* Define to 1 if you have the C++11 <regex> header file. */
302 #cmakedefine HAVE_CXX11_REGEX
303
304 /* Define to 1 if you have the sysconf() function */
305 #cmakedefine HAVE_SYSCONF
306
307 /* Define to 1 if you have the sched_getaffinity() function */
308 #cmakedefine HAVE_SCHED_GETAFFINITY
309
310 /* Define to 1 if you have the sched_setaffinity() function */
311 #cmakedefine HAVE_SCHED_SETAFFINITY
312
313 /* Bytes in IEEE fp word are in big-endian order if set, little-endian if not.
314    Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
315 #cmakedefine GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER
316
317 /* The two words in a double precision variable are in b ig-endian order if
318    set, little-endian if not. Do NOT assume this is the same as the byte
319    order! Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
320 #cmakedefine GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
321
322 /* Define if SIGUSR1 is present */
323 #cmakedefine HAVE_SIGUSR1
324
325 /* The size of int, as computed by sizeof. */
326 #cmakedefine SIZEOF_INT @SIZEOF_INT@
327
328 /* The size of long int, as computed by sizeof. */
329 #cmakedefine SIZEOF_LONG_INT @SIZEOF_LONG_INT@
330
331 /* The size of long long int, as computed by sizeof. */
332 #cmakedefine SIZEOF_LONG_LONG_INT @SIZEOF_LONG_LONG_INT@
333
334 /* The size of off_t, as computed by sizeof. */
335 #cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
336
337 /* The size of void*, as computed by sizeof. */
338 #cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
339
340 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
341 #cmakedefine _LARGEFILE_SOURCE
342
343 /* Define for large files, on AIX-style hosts. */
344 #cmakedefine _LARGE_FILES
345
346 /* Some systems requires this to be set to 64 for large file support */
347 #cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
348
349 /* Define to __inline__ or __inline if that is what the C compiler
350    calls it, or to nothing if inline is not supported under any name.
351    Please do NOT remove the gmx_inline keyword from here. The classical
352    C++ inline keyword is merely a recommendation to the compiler, and
353    many compilers support stronger alternatives (e.g. __forceinline)
354    that we might want to use. */
355 #define gmx_inline ${INLINE_KEYWORD}
356 #ifndef __cplusplus
357 #define inline ${INLINE_KEYWORD}
358 #endif
359
360 /* Define to __restrict__ or __restrict if that is what the C compiler
361    calls it, unless we are on C99 when it is simply called restrict.
362    Since restrict is a reserved key word in C99 we are not allowed to
363    redefine the word itself, so call this gmx_restrict to avoid having
364    to identify the language standard level. If it is not supported, it
365    is still defined to an empty string here. */
366 #define gmx_restrict ${RESTRICT_KEYWORD}
367 /* Build special-purpose mdrun library */
368 #cmakedefine GMX_FAHCORE   
369
370 /* Enable gromacs quotes */
371 #cmakedefine GMX_COOL_QUOTES
372
373 #ifdef GMX_FAHCORE
374 #define FULLINDIRECT 1
375 #define USE_FAH_XDR  1
376 #include "swindirect.h"
377 #endif
378
379 /* default name mangling maybe wrong on exotic plattforms */
380 #define F77_FUNC(name,NAME) name ## _
381
382 /* Define if we have pipes */
383 #cmakedefine HAVE_PIPES
384
385 /* Catch stupid CMake problems on OS X */
386 #ifdef __APPLE__
387 #  if ((defined(__LP64__) && __LP64__ && defined(SIZEOF_VOIDP) && SIZEOF_VOIDP<8) || ( (!defined(__LP64__) || __LP64__==0) && (defined(SIZEOF_VOIDP) && SIZEOF_VOIDP>4)))
388 #    error "Inconsistency between current OS X architecture and the one used to generate original" 
389 #    error "CMake configuration. This is probably caused by starting CMake with the default value"
390 #    error "for CMAKE_OSX_ARCHITECTURES (blank), and then changing it. In this case all the tests"
391 #    error "will have been performed with the original (now incorrect) architecture."
392 #    error "To fix this, set CMAKE_OSX_ARCHITECTURES on the _command_line_ before starting CMake,"
393 #    error "or create a new such entry with your choice in the GUI _before_ hitting 'configure'."
394 #  endif
395 #endif
396
397 /*! \endcond */