Merge branch release-2019
[alexxy/gromacs.git] / src / config.h.cmakein
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
5  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6  * and including many others, as listed in the AUTHORS file in the
7  * top-level source directory and at http://www.gromacs.org.
8  *
9  * GROMACS is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public License
11  * as published by the Free Software Foundation; either version 2.1
12  * of the License, or (at your option) any later version.
13  *
14  * GROMACS is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with GROMACS; if not, see
21  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
23  *
24  * If you want to redistribute modifications to GROMACS, please
25  * consider that scientific software is very special. Version
26  * control is crucial - bugs must be traceable. We will be happy to
27  * consider code for inclusion in the official distribution, but
28  * derived work must not be called official GROMACS. Details are found
29  * in the README & COPYING files - if they are missing, get the
30  * official version at http://www.gromacs.org.
31  *
32  * To help us fund GROMACS development, we humbly ask that you cite
33  * the research papers on the package. Check out http://www.gromacs.org.
34  */
35 /*! \libinternal \file
36  * \brief
37  * Include file for configuration macros from the build system.
38  *
39  * This header is not installed, so headers must not reference macros defined
40  * here.
41  *
42  * \inlibraryapi
43  */
44 #ifndef GMX_CONFIG_H
45 #define GMX_CONFIG_H
46
47 /* TODO: For now, disable Doxygen warnings from here */
48 /*! \cond */
49
50 /* Work around broken calloc() */
51 #cmakedefine01 GMX_BROKEN_CALLOC
52
53 /* Do not optimize FFTW setups (not needed with SSE FFT kernels) */
54 #cmakedefine01 GMX_DISABLE_FFTW_MEASURE
55
56 /* Use FFTW3 FFT library */
57 #cmakedefine01 GMX_FFT_FFTW3
58
59 /* Use the ARM Performance library with FFTW3 compatibility */
60 #cmakedefine01 GMX_FFT_ARMPL_FFTW3
61
62 /* Use MKL FFT library */
63 #cmakedefine01 GMX_FFT_MKL
64
65 /* Use built in fftpack FFT library */
66 #cmakedefine01 GMX_FFT_FFTPACK
67
68 /* Target platform is x86 or x86_64 */
69 #cmakedefine01 GMX_TARGET_X86
70
71 /** Define if we are building natively on Windows */
72 #cmakedefine01 GMX_NATIVE_WINDOWS
73
74 /** Define if we are building for Cygwin */
75 #cmakedefine01 GMX_CYGWIN
76
77 /* SSE2 was selected for SIMD instruction set level */
78 #cmakedefine01 GMX_SIMD_X86_SSE2
79
80 /* SSE4.1 was selected as SIMD instructions */
81 #cmakedefine01 GMX_SIMD_X86_SSE4_1
82
83 /* AVX 128-bit FMA was selected as SIMD instructions */
84 #cmakedefine01 GMX_SIMD_X86_AVX_128_FMA
85
86 /* AVX 256-bit was selected as SIMD instructions */
87 #cmakedefine01 GMX_SIMD_X86_AVX_256
88
89 /* AVX2 256-bit SIMD instruction set level was selected */
90 #cmakedefine01 GMX_SIMD_X86_AVX2_256
91
92 /* AVX2 128-bit SIMD instruction set level was selected */
93 #cmakedefine01 GMX_SIMD_X86_AVX2_128
94
95 /* MIC (Xeon Phi) SIMD instruction set level was selected */
96 #cmakedefine01 GMX_SIMD_X86_MIC
97
98 /* AVX-512F foundation level instruction SIMD */
99 #cmakedefine01 GMX_SIMD_X86_AVX_512
100
101 /* AVX-512ER foundation level instruction SIMD */
102 #cmakedefine01 GMX_SIMD_X86_AVX_512_KNL
103
104 /* 32-bit ARM NEON SIMD instruction set level was selected */
105 #cmakedefine01 GMX_SIMD_ARM_NEON
106
107 /* ARM (AArch64) NEON Advanced SIMD instruction set level was selected */
108 #cmakedefine01 GMX_SIMD_ARM_NEON_ASIMD
109
110 /* IBM VMX was selected as SIMD instructions (Power 6 and later) */
111 #cmakedefine01 GMX_SIMD_IBM_VMX
112
113 /* IBM VSX was selected as SIMD instructions (Power 7 and later) */
114 #cmakedefine01 GMX_SIMD_IBM_VSX
115
116 /* Fujitsu Sparc64 HPC-ACE SIMD acceleration */
117 #cmakedefine01 GMX_SIMD_SPARC64_HPC_ACE
118
119 /* Reference SIMD implementation for testing */
120 #cmakedefine01 GMX_SIMD_REFERENCE
121
122 /* String for SIMD instruction choice (for writing to log files and stdout) */
123 #define GMX_SIMD_STRING "@GMX_SIMD_ACTIVE@"
124
125 /* Calling convention string (if any) for routines with SIMD variable args */
126 #define gmx_simdcall @GMX_SIMD_CALLING_CONVENTION@
127
128 /* Target mantissa accuracy for SIMD single precision math */
129 #define GMX_SIMD_ACCURACY_BITS_SINGLE @GMX_SIMD_ACCURACY_BITS_SINGLE@
130
131 /* Target mantissa accuracy for SIMD double precision math */
132 #define GMX_SIMD_ACCURACY_BITS_DOUBLE @GMX_SIMD_ACCURACY_BITS_DOUBLE@
133
134 /* Enable code that requires AVX-512 instruction support, without GMX_SIMD=AVX_512 */
135 #cmakedefine01 SIMD_AVX_512_CXX_SUPPORTED
136
137 /* Whether a double-precision configuration may target accuracy equivalent to single precision */
138 #cmakedefine01 GMX_RELAXED_DOUBLE_PRECISION
139
140 /* Integer byte order is big endian. */
141 #cmakedefine01 GMX_INTEGER_BIG_ENDIAN
142
143 /* Use our own instead of system XDR libraries */
144 #cmakedefine01 GMX_INTERNAL_XDR
145
146 /* Compile to use TNG library */
147 #cmakedefine01 GMX_USE_TNG
148
149 /* Add support for tracing using Extrae */
150 #cmakedefine01 HAVE_EXTRAE
151
152 /* Use MPI (with mpicc) for parallelization */
153 #cmakedefine01 GMX_LIB_MPI
154
155 /* Use threads_mpi for parallelization */
156 #cmakedefine01 GMX_THREAD_MPI
157
158 /* Make a parallel version of GROMACS using message passing
159    (MPI or thread_mpi) */
160 #define GMX_MPI (GMX_LIB_MPI || GMX_THREAD_MPI)
161
162 /* MPI_IN_PLACE exists for collective operations */
163 #cmakedefine01 MPI_IN_PLACE_EXISTS
164
165 /* Use OpenMP multithreading */
166 #cmakedefine01 GMX_OPENMP
167
168 /* Use the Portable Hardware Locality package (hwloc) */
169 #cmakedefine01 GMX_USE_HWLOC
170
171 /* Can and should use nice(3) to set priority */
172 #cmakedefine01 GMX_USE_NICE
173
174 /* Maximum number of OpenMP threads supported */
175 #define GMX_OPENMP_MAX_THREADS @GMX_OPENMP_MAX_THREADS@
176
177 /* Use if we cannot rename checkpoints */
178 #cmakedefine01 GMX_NO_RENAME
179
180 /* Use (modified) Gamess-UK for QM-MM calculations */
181 #cmakedefine01 GMX_QMMM_GAMESS
182
183 /* Use (modified) Gaussian0x for QM-MM calculations */
184 #cmakedefine01 GMX_QMMM_GAUSSIAN
185
186 /* Use (modified) Mopac 7 for QM-MM calculations */
187 #cmakedefine01 GMX_QMMM_MOPAC
188
189 /* Use ORCA for QM-MM calculations */
190 #cmakedefine01 GMX_QMMM_ORCA
191
192 /* Use cycle counters */
193 #cmakedefine01 GMX_CYCLECOUNTERS
194
195 /* Use sub-counters */
196 #cmakedefine01 GMX_CYCLE_SUBCOUNTERS
197
198 /* Compile with plugin support */
199 #cmakedefine01 GMX_USE_PLUGINS
200
201 /* Fallback path for VMD plug-ins */
202 #define GMX_VMD_PLUGIN_PATH "@GMX_VMD_PLUGIN_PATH@"
203
204 /* Define when pthreads are used */
205 #cmakedefine THREAD_PTHREADS
206
207 /* Define when Windows threads are used */
208 #cmakedefine THREAD_WINDOWS
209
210 /* Define for busy wait option  */
211 /* See gmxpre-config.h.cmakein for explanation for the #ifndef */
212 #ifndef TMPI_WAIT_FOR_NO_ONE
213 #cmakedefine01 TMPI_WAIT_FOR_NO_ONE
214 #endif
215
216 /* Define for copy buffer option */
217 #cmakedefine TMPI_COPY_BUFFER
218
219 /* Define for tmpi warnings option */
220 #cmakedefine TMPI_WARNINGS
221
222 /* Define for profiling option */
223 #cmakedefine TMPI_PROFILE
224
225 /* Define for Linux pthread_setaffinity_np */
226 #cmakedefine HAVE_PTHREAD_SETAFFINITY
227
228 /* Define for X-Windows */
229 #cmakedefine01 GMX_X11
230
231 /* Enable x86 gcc inline assembly */
232 #cmakedefine01 GMX_X86_GCC_INLINE_ASM
233
234 /* Define constants useful for handling GPU support */
235 #define GMX_GPU_NONE   0
236 #define GMX_GPU_CUDA   1
237 #define GMX_GPU_OPENCL 2
238 /* Which kind of GPU support is configured */
239 #define GMX_GPU @GMX_GPU_ACCELERATION_FRAMEWORK@
240
241 /* CUDA runtime API version (identical to CUDART_VERSION from cuda_runtime_api.h) */
242 #cmakedefine GMX_CUDA_VERSION @GMX_CUDA_VERSION@
243
244 /* Use a single compilation unit when compiling the CUDA (non-bonded) kernels.  */
245 #cmakedefine01 GMX_CUDA_NB_SINGLE_COMPILATION_UNIT
246
247 /* Cluster size used by nonbonded OpenCL kernel. Should be 8 for NVIDIA/AMD and 4 for Intel */
248 #define GMX_OPENCL_NB_CLUSTER_SIZE @GMX_OPENCL_NB_CLUSTER_SIZE@
249
250 /* Define constants for build types (starting at 1 to make sure undefined values don't match) */
251 #define CMAKE_BUILD_TYPE_DEBUG 1
252 #define CMAKE_BUILD_TYPE_RELEASE 2
253 #define CMAKE_BUILD_TYPE_RELWITHDEBINFO 3
254 #define CMAKE_BUILD_TYPE_MINSIZEREL 4
255 #define CMAKE_BUILD_TYPE_REFERENCE 5
256 #define CMAKE_BUILD_TYPE_RELWITHASSERT 6
257 #define CMAKE_BUILD_TYPE_PROFILE 7
258 #define CMAKE_BUILD_TYPE_TSAN 8
259 #define CMAKE_BUILD_TYPE_ASAN 9
260 #define CMAKE_BUILD_TYPE_MSAN 10
261 #cmakedefine CMAKE_BUILD_TYPE CMAKE_BUILD_TYPE_@CMAKE_BUILD_TYPE_UPPER@
262
263 /* Define relative path to OpenCL kernels */
264 #define GMX_INSTALL_OCLDIR "@GMX_INSTALL_OCLDIR@"
265
266 /* Minimum required OpenCL version support (both API and device) - split into integer components for convenience */
267 #define REQUIRED_OPENCL_MIN_VERSION_MAJOR @REQUIRED_OPENCL_MIN_VERSION_MAJOR@
268 #define REQUIRED_OPENCL_MIN_VERSION_MINOR @REQUIRED_OPENCL_MIN_VERSION_MINOR@
269
270 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
271 #cmakedefine01 HAVE_FSEEKO
272
273 /* Define to 1 if _fseeki64 (and presumably _fseeki64) exists and is declared. */
274 #cmakedefine01 HAVE__FSEEKI64
275
276 /* Have io.h (windows)*/
277 #cmakedefine01 HAVE_IO_H
278
279 /* Define to 1 if you have the posix_memalign() function. */
280 #cmakedefine01 HAVE_POSIX_MEMALIGN
281
282 /* Define to 1 if you have the memalign() function. */
283 #cmakedefine01 HAVE_MEMALIGN
284
285 /* Define to 1 if you have the MSVC _aligned_malloc() function. */
286 #cmakedefine01 HAVE__ALIGNED_MALLOC
287
288 /* Define to 1 if you have the clock_gettime() function. */
289 #cmakedefine01 HAVE_CLOCK_GETTIME
290
291 /* Define to 1 if you have the gettimeofday() function. */
292 #cmakedefine01 HAVE_GETTIMEOFDAY
293
294 /* Define to 1 if you have the rdtscp instruction. */
295 #cmakedefine01 HAVE_RDTSCP
296
297 /* Define to 1 if you have the fsync() function. */
298 #cmakedefine01 HAVE_FSYNC
299
300 /* Define to 1 if you have the Windows _commit() function. */
301 #cmakedefine01 HAVE__COMMIT
302
303 /* Define to 1 if you have the fileno() function. */
304 #cmakedefine01 HAVE_FILENO
305
306 /* Define to 1 if you have the _fileno() function. */
307 #cmakedefine01 HAVE__FILENO
308
309 /* Define to 1 if you have the sigaction() function. */
310 #cmakedefine01 HAVE_SIGACTION
311
312 /* Define for the GNU __builtin_clz() function. */
313 #cmakedefine01 HAVE_BUILTIN_CLZ
314
315 /* Define for the GNU __builtin_clzll() function. */
316 #cmakedefine01 HAVE_BUILTIN_CLZLL
317
318 /* Define for the MSVC _BitScanReverse() function. */
319 #cmakedefine01 HAVE_BITSCANREVERSE
320
321 /* Define for the MSVC _BitScanReverse64() function. */
322 #cmakedefine01 HAVE_BITSCANREVERSE64
323
324 /* Define for the IBM xlc++ __cntlz4() function. */
325 #cmakedefine01 HAVE_CNTLZ4
326
327 /* Define for the IBM xlc++ __cntlz8() function. */
328 #cmakedefine01 HAVE_CNTLZ8
329
330 /* Define to 1 if yo have the <unistd.h> header file. */
331 #cmakedefine HAVE_UNISTD_H
332 #  ifdef __APPLE__
333 // Mac OS 13.x has a bug where dispatch.h generates an error for OpenCL builds if
334 // HAVE_UNISTD_H is merely defined, but not set to 1. Since unistd.h should always
335 // be available on this platform we simply undefine and redefine it to 1 for now
336 #    undef  HAVE_UNISTD_H
337 #    define HAVE_UNISTD_H 1
338 #endif
339
340 /* Define to 1 if yo have the <pwd.h> header file. */
341 #cmakedefine01 HAVE_PWD_H
342
343 /* Define to 1 if yo have the <dirent.h> header file. */
344 #cmakedefine01 HAVE_DIRENT_H
345
346 /* Define to 1 if you have the <sys/time.h> header file. */
347 #cmakedefine HAVE_SYS_TIME_H
348
349 /* Define to 1 if you have the <sched.h> header */
350 #cmakedefine HAVE_SCHED_H
351
352 /* Define to 1 if mm_malloc.h is present, otherwise 0 */
353 #cmakedefine01 HAVE_MM_MALLOC_H
354
355 /* Define to 1 if malloc.h is present, otherwise 0 */
356 #cmakedefine01 HAVE_MALLOC_H
357
358 /* Define to 1 if xmmintrin.h is present, otherwise 0 */
359 #cmakedefine01 HAVE_XMMINTRIN_H
360
361 /* Define to 1 if you have the POSIX <regex.h> header file. */
362 #cmakedefine01 HAVE_POSIX_REGEX
363
364 /* Define to 1 if you have the C++11 <regex> header file. */
365 #cmakedefine01 HAVE_CXX11_REGEX
366
367 /* Define to 1 if you have the sysconf() function */
368 #cmakedefine HAVE_SYSCONF
369
370 /* Define to 1 if you have the all the affinity functions in sched.h */
371 #cmakedefine01 HAVE_SCHED_AFFINITY
372
373 /* Define to 1 if _mm_malloc() is present in either mm_malloc.h,
374  * malloc.h or xmmintrin.h, and 0 otherwise. Note that you need to
375  * conditionally include the three headers too before using _mm_malloc().
376  */
377 #cmakedefine01 HAVE__MM_MALLOC
378
379 /* Define if SIGUSR1 is present */
380 #cmakedefine01 HAVE_SIGUSR1
381
382 /* Enable gromacs quotes */
383 #cmakedefine01 GMX_COOL_QUOTES
384
385 /* default name mangling maybe wrong on exotic plattforms */
386 #define F77_FUNC(name,NAME) name ## _
387
388 /* Define if we have pipes */
389 #cmakedefine01 HAVE_PIPES
390
391 /* Define if we have feenableexcept */
392 #cmakedefine01 HAVE_FEENABLEEXCEPT
393
394 /* Define if we have fedisableexcept */
395 #cmakedefine01 HAVE_FEDISABLEEXCEPT
396
397 /* Define if we have lmfit support */
398 #cmakedefine01 HAVE_LMFIT
399
400 /* Build using clang analyzer */
401 #cmakedefine01 GMX_CLANG_ANALYZER
402
403 /* Use MiMiC QM/MM interface */
404 #cmakedefine01 GMX_MIMIC
405
406 /*! \endcond */
407
408 #endif