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