Fix bug in GPU list balancing
[alexxy/gromacs.git] / src / config.h.cmakein
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2012, by the GROMACS development team, led by
5  * David van der Spoel, Berk Hess, Erik Lindahl, and including many
6  * others, as listed in the AUTHORS file in the top-level source
7  * 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 /* Manually created from config.h.in to work with cmake */
36
37 /* Disable warnings about double-to-float conversion accuracy loss on MSVC */
38 #ifdef _MSC_VER
39 #pragma warning (disable : 4305)
40 #pragma warning (disable : 4244)
41 #pragma warning (disable : 4101)
42 #pragma warning (disable : 4996)
43 #pragma warning (disable : 4267)
44 #pragma warning (disable : 4090)
45 #endif
46
47 #include "gmx_header_config.h"
48
49 /* Name of package (translate from cmake to autoconf macro name) */
50 #define PACKAGE  "@PROJECT_NAME@"
51
52 /* Version number of package (translate from cmake to autoconf macro name) */
53 #define VERSION  "@PROJECT_VERSION@"
54
55 /* Use the version string from generated version.h */
56 #cmakedefine USE_VERSION_H
57
58 /* Default location of data files */
59 #define GMXLIBDIR "@GMXLIBDIR@"
60
61 /* Turn off water-water neighborlist optimization only - not used right now */
62 #cmakedefine DISABLE_WATERWATER_NLIST
63
64 /* Turn off all water neighborlist optimization - not used right now */
65 #cmakedefine DISABLE_WATER_NLIST
66
67 /* IEEE754 floating-point format. Memory layout is defined by macros
68  * GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER and GMX_IEEE754_BIG_ENDIAN_WORD_ORDER. 
69  */
70 #cmakedefine GMX_FLOAT_FORMAT_IEEE754
71
72 /* Work around broken calloc() */
73 #cmakedefine GMX_BROKEN_CALLOC
74
75 /* Enable special hacks for Cray XT3 */
76 #cmakedefine GMX_CRAY_XT3
77
78 /* Do not optimize FFTW setups (not needed with SSE FFT kernels) */
79 #cmakedefine GMX_DISABLE_FFTW_MEASURE
80
81 /* Compile in double precision */
82 #cmakedefine GMX_DOUBLE
83
84 /* Use Built-in FFTPACK FFT library */
85 #cmakedefine GMX_FFT_FFTPACK
86
87 /* Use FFTW3 FFT library */
88 #cmakedefine GMX_FFT_FFTW3
89
90 /* Use Intel MKL FFT library */
91 #cmakedefine GMX_FFT_MKL
92
93 /* Use AMD core math library */
94 #cmakedefine GMX_FFT_ACML
95
96 /* Target platform is x86 or x86_64 */
97 #cmakedefine GMX_TARGET_X86
98
99 /* Target platform is BlueGene/Q */
100 #cmakedefine GMX_TARGET_BGQ
101
102 /* SSE2 instructions available */
103 #cmakedefine GMX_X86_SSE2
104
105 /* SSE4.1 instructions available */
106 #cmakedefine GMX_X86_SSE4_1
107
108 /* AVX 128-bit FMA instructions available */
109 #cmakedefine GMX_X86_AVX_128_FMA
110
111 /* AVX 256-bit instructions available */
112 #cmakedefine GMX_X86_AVX_256
113
114 /* GCC bug in AVX maskload/maskstore arguments - worked around internally */
115 #cmakedefine GMX_X86_AVX_GCC_MASKLOAD_BUG
116
117 /* SSE2 was selected as CPU acceleration level */
118 #cmakedefine GMX_CPU_ACCELERATION_X86_SSE2
119
120 /* SSE4.1 was selected as CPU acceleration level */
121 #cmakedefine GMX_CPU_ACCELERATION_X86_SSE4_1
122
123 /* AVX 128-bit FMA was selected as CPU acceleration level */
124 #cmakedefine GMX_CPU_ACCELERATION_X86_AVX_128_FMA
125
126 /* AVX 256-bit was selected as CPU acceleration level */
127 #cmakedefine GMX_CPU_ACCELERATION_X86_AVX_256
128
129 /* IBM QPX was selected as CPU acceleration type (e.g. BlueGene/Q) */
130 #cmakedefine GMX_CPU_ACCELERATION_IBM_QPX
131
132 /* Fujitsu Sparc64 HPC-ACE SIMD acceleration */
133 #cmakedefine GMX_CPU_ACCELERATION_SPARC64_HPC_ACE
134
135 /* String for CPU acceleration choice (for writing to log files and stdout) */
136 #define GMX_CPU_ACCELERATION_STRING "@GMX_CPU_ACCELERATION@"
137
138 /* Integer byte order is big endian. */
139 #cmakedefine GMX_INTEGER_BIG_ENDIAN 
140
141 /* Use our own instead of system XDR libraries */
142 #cmakedefine GMX_INTERNAL_XDR
143
144 /* Use MPI (with mpicc) for parallelization */
145 #cmakedefine GMX_LIB_MPI
146
147 /* MPI_IN_PLACE exists for collective operations */
148 #cmakedefine MPI_IN_PLACE_EXISTS
149
150 /* Make a parallel version of GROMACS using message passing 
151    (MPI or thread_mpi) */
152 #cmakedefine GMX_MPI
153
154 /* Use threads_mpi for parallelization */
155 #cmakedefine GMX_THREAD_MPI
156
157 /* Use OpenMP multithreading */
158 #cmakedefine GMX_OPENMP
159
160 /* Ignore calls to nice(3) */
161 #cmakedefine GMX_NO_NICE
162
163 /* Use if can't rename checkpoints */
164 #cmakedefine GMX_NO_RENAME
165
166 /* Ignore calls to system(3) */
167 #cmakedefine GMX_NO_SYSTEM
168
169 /* Use (modified) Gamess-UK for QM-MM calculations */
170 #cmakedefine GMX_QMMM_GAMESS
171
172 /* Use (modified) Gaussian0x for QM-MM calculations */
173 #cmakedefine GMX_QMMM_GAUSSIAN
174
175 /* Use (modified) Mopac 7 for QM-MM calculations */
176 #cmakedefine GMX_QMMM_MOPAC
177
178 /* Use ORCA for QM-MM calculations */
179 #cmakedefine GMX_QMMM_ORCA
180
181 /* Use the GROMACS software 1/sqrt(x) */
182 #cmakedefine GMX_SOFTWARE_INVSQRT
183
184 /* Use sub-counters */
185 #cmakedefine GMX_CYCLE_SUBCOUNTERS
186
187 /* Compile with plugin support */
188 #cmakedefine GMX_USE_PLUGINS
189
190 /* Fallback path for VMD plug-ins */
191 #define GMX_VMD_PLUGIN_PATH "@GMX_VMD_PLUGIN_PATH@"
192
193 /* Define when pthreads are used */
194 #cmakedefine THREAD_PTHREADS
195
196 /* Define when Windows threads are used */
197 #cmakedefine THREAD_WINDOWS
198
199 /* Define when there is a pthread.h */
200 #cmakedefine HAVE_PTHREAD_H
201
202 /* Define native atomic operations are found */
203 #cmakedefine TMPI_ATOMICS
204
205 /* Define for busy wait option  */
206 #cmakedefine TMPI_WAIT_FOR_NO_ONE
207
208 /* Define for copy buffer option */
209 #cmakedefine TMPI_COPY_BUFFER
210
211 /* Define for tmpi warnings option */
212 #cmakedefine TMPI_WARNINGS
213
214 /* Define for profiling option */
215 #cmakedefine TMPI_PROFILE
216
217 /* Define for Linux pthread_setaffinity_np */
218 #cmakedefine HAVE_PTHREAD_SETAFFINITY
219
220 /* Define for Windows NUMA-aware allocator functions*/
221 #cmakedefine TMPI_WINDOWS_NUMA_API
222
223 /* Define for GetSystemInfo() */
224 #cmakedefine HAVE_SYSTEM_INFO
225
226 /* Enable x86 gcc inline assembly */
227 #cmakedefine GMX_X86_GCC_INLINE_ASM
228
229 /* Use GPU native acceleration */
230 #cmakedefine GMX_GPU
231
232 /* Define to 1 if the system has the type gmx_bool. */
233 #cmakedefine HAVE_BOOL
234
235 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
236 #cmakedefine HAVE_FSEEKO
237
238 /* Define to 1 if _fseeki64 (and presumably _fseeki64) exists and is declared. */
239 #cmakedefine HAVE__FSEEKI64
240
241 /* Define to 1 if you have the m library (-lm). */
242 #cmakedefine HAVE_LIBM
243
244 /* Define to 1 if you have the mkl library (-lmkl). */
245 #cmakedefine HAVE_LIBMKL
246
247 /* Define to 1 if you have the gsl library (-lgsl). */
248 #cmakedefine HAVE_LIBGSL
249
250 /* Define to 1 if you have the dl library (-ldl). */
251 #cmakedefine HAVE_LIBDL
252
253 /* Have io.h (windows)*/
254 #cmakedefine HAVE_IO_H
255
256 /* Define to 1 if you have the strcasecmp() function. */
257 #cmakedefine HAVE_STRCASECMP
258
259 /* Define to 1 if you have the strdup() function. */
260 #cmakedefine HAVE_STRDUP
261
262 /* Define to 1 if you have the vfprintf() function. */
263 #cmakedefine HAVE_VFPRINTF
264
265 /* Define to 1 if you have the memcmp() function. */
266 #cmakedefine HAVE_MEMCMP
267
268 /* Define to 1 if you have the posix_memalign() function. */
269 #cmakedefine HAVE_POSIX_MEMALIGN
270
271 /* Define to 1 if you have the memalign() function. */
272 #cmakedefine HAVE_MEMALIGN
273
274 /* Define to 1 if you have the MSVC _aligned_malloc() function. */
275 #cmakedefine HAVE__ALIGNED_MALLOC
276
277 /* Define to 1 if you have the gettimeofday() function. */
278 #cmakedefine HAVE_GETTIMEOFDAY
279
280 /* Define to 1 if you have the cbrt() function. */
281 #cmakedefine HAVE_CBRT
282
283 /* Define to 1 if you have the isnan() function. */
284 #cmakedefine HAVE_ISNAN
285
286 /* Define to 1 if you have the _isnan() function. */
287 #cmakedefine HAVE__ISNAN
288
289 /* Define to 1 if you have the isfinite() function. */
290 #cmakedefine HAVE_ISFINITE
291
292 /* Define to 1 if you have the _isfinite() function. */
293 #cmakedefine HAVE__ISFINITE
294
295 /* Define to 1 if you have the _finite() function. */
296 #cmakedefine HAVE__FINITE
297
298 /* Define to 1 if you have the fsync() function. */
299 #cmakedefine HAVE_FSYNC
300
301 /* Define to 1 if you have the Windows _commit() function. */
302 #cmakedefine HAVE__COMMIT
303
304 /* Define to 1 if you have the fileno() function. */
305 #cmakedefine HAVE_FILENO
306
307 /* Define to 1 if you have the _fileno() function. */
308 #cmakedefine HAVE__FILENO
309
310 /* Define to 1 if you have the sigaction() function. */
311 #cmakedefine HAVE_SIGACTION
312
313 /* Define to 1 if you have the rsqrt() function. */
314 #cmakedefine HAVE_RSQRT
315
316 /* Define to 1 if you have the rsqrtf() function. */
317 #cmakedefine HAVE_RSQRTF
318
319 /* Define to 1 if you have the sqrtf() function. */
320 #cmakedefine HAVE_SQRTF
321
322 /* Define to 1 if you have the <string.h> header file. */
323 #cmakedefine HAVE_STRING_H
324
325 /* Define to 1 if yo have the <math.h> header file. */
326 #cmakedefine HAVE_MATH_H
327
328 /* Define to 1 if yo have the <limits.h> header file. */
329 #cmakedefine HAVE_LIMITS_H
330
331 /* Define to 1 if yo have the <memory.h> header file. */
332 #cmakedefine HAVE_MEMORY_H
333
334 /* Define to 1 if yo have the <unistd.h> header file. */
335 #cmakedefine HAVE_UNISTD_H
336
337 /* Define to 1 if yo have the <direct.h> header file. */
338 #cmakedefine HAVE_DIRECT_H
339
340 /* Define to 1 if yo have the <pwd.h> header file. */
341 #cmakedefine HAVE_PWD_H
342
343 /* Define to 1 if yo have the <stdint.h> header file. */
344 #cmakedefine HAVE_STDINT_H
345
346 /* Define to 1 if yo have the <stdlib.h> header file. */
347 #cmakedefine HAVE_STDLIB_H
348
349 /* Define to 1 if yo have the <dirent.h> header file. */
350 #cmakedefine HAVE_DIRENT_H
351
352 /* Define to 1 if yo have the <inttypes.h> header file. */
353 #cmakedefine HAVE_INTTYPES_H
354
355 /* Define to 1 if yo have the <regex.h> header file. */
356 #cmakedefine HAVE_REGEX_H
357
358 /* Define to 1 if you have the <sys/types.h> header file. */
359 #cmakedefine HAVE_SYS_TYPES_H
360
361 /* Define to 1 if you have the <sys/stat.h> header file. */
362 #cmakedefine HAVE_SYS_STAT_H
363
364 /* Define to 1 if you have the <sys/time.h> header file. */
365 #cmakedefine HAVE_SYS_TIME_H
366
367 /* Define to 1 if you have the <rpc/rpc.h> header file. */
368 #cmakedefine HAVE_RPC_RPC_H
369
370 /* Define to 1 if you have the <rpc/xdr.h> header file. */
371 #cmakedefine HAVE_RPC_XDR_H
372
373 /* Define to 1 if you have the <x86intrin.h> header file */
374 #cmakedefine HAVE_X86INTRIN_H
375
376 /* Define to 1 if you have the <intrin.h> header file */
377 #cmakedefine HAVE_INTRIN_H
378
379 /* Define to 1 if you have the <sched.h> header */
380 #cmakedefine HAVE_SCHED_H
381
382 /* Define to 1 if you have the vprintf() function. */
383 #cmakedefine HAVE_VPRINTF
384
385 /* Define to 1 if you have the sysconf() function */
386 #cmakedefine HAVE_SYSCONF
387
388 /* Define to 1 if you have the sched_getaffinity() function */
389 #cmakedefine HAVE_SCHED_GETAFFINITY
390
391 /* Define to 1 if you have the sched_setaffinity() function */
392 #cmakedefine HAVE_SCHED_SETAFFINITY
393
394 /* Bytes in IEEE fp word are in big-endian order if set, little-endian if not.
395    Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
396 #cmakedefine GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER
397
398 /* The two words in a double precision variable are in b ig-endian order if
399    set, little-endian if not. Do NOT assume this is the same as the byte
400    order! Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
401 #cmakedefine GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
402
403 /* Define if SIGUSR1 is present */
404 #cmakedefine HAVE_SIGUSR1
405
406 /* The size of int, as computed by sizeof. */
407 #cmakedefine SIZEOF_INT @SIZEOF_INT@
408
409 /* The size of long int, as computed by sizeof. */
410 #cmakedefine SIZEOF_LONG_INT @SIZEOF_LONG_INT@
411
412 /* The size of long long int, as computed by sizeof. */
413 #cmakedefine SIZEOF_LONG_LONG_INT @SIZEOF_LONG_LONG_INT@
414
415 /* The size of off_t, as computed by sizeof. */
416 #cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
417
418 /* The size of void*, as computed by sizeof. */
419 #cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
420
421 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
422 #cmakedefine _LARGEFILE_SOURCE
423
424 /* Define for large files, on AIX-style hosts. */
425 #cmakedefine _LARGE_FILES
426
427 /* Some systems requires this to be set to 64 for large file support */
428 #cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
429
430 /* Gromacs shortcut define for fseeko & ftello being present with 64-bit support */
431 #cmakedefine GMX_LARGEFILES
432
433 /* Define to int if <sys/types.h> does not define. */
434 #cmakedefine gid_t int
435
436 /* Define to __inline__ or __inline if that is what the C compiler
437    calls it, or to nothing if inline is not supported under any name.
438    Please do NOT remove the gmx_inline keyword from here. The classical
439    C++ inline keyword is merely a recommendation to the compiler, and
440    many compilers support stronger alternatives (e.g. __forceinline)
441    that we might want to use. */
442 #define gmx_inline ${INLINE_KEYWORD}
443 #ifndef __cplusplus
444 #define inline ${INLINE_KEYWORD}
445 #endif
446
447 /* Define to __restrict__ or __restrict if that is what the C compiler
448    calls it, unless we are on C99 when it is simply called restrict.
449    Since restrict is a reserved key word in C99 we are not allowed to
450    redefine the word itself, so call this gmx_restrict to avoid having
451    to identify the language standard level. If it is not supported, it
452    is still defined to an empty string here. */
453 #define gmx_restrict ${RESTRICT_KEYWORD}
454
455 #ifndef CPLUSPLUS
456 #ifdef __cplusplus
457 #define CPLUSPLUS
458 #endif
459 #endif  
460
461 /* Define to long int if <sys/types.h> does not define. */                    
462 #cmakedefine off_t int
463
464 /* Define to unsigned int if <sys/types.h> does not define. */
465 #cmakedefine size_t int
466
467 /* Define to int if <sys/types.h> does not define. */
468 #cmakedefine uid_t int
469
470 /* Build special-purpose mdrun library */
471 #cmakedefine GMX_FAHCORE   
472
473 /* Enable gromacs quotes */
474 #cmakedefine GMX_COOL_QUOTES
475
476 #ifdef GMX_FAHCORE
477 #define FULLINDIRECT 1
478 #define USE_FAH_XDR  1
479 #include "swindirect.h"
480 #endif
481
482 /* default name mangling maybe wrong on exotic plattforms */
483 #define F77_FUNC(name,NAME) name ## _
484
485 /* Define if we have pipes */
486 #cmakedefine HAVE_PIPES
487
488
489 /* Catch stupid CMake problems on OS X */
490 #ifdef __APPLE__
491 #  if ((defined(__LP64__) && __LP64__ && defined(SIZEOF_VOIDP) && SIZEOF_VOIDP<8) || ( (!defined(__LP64__) || __LP64__==0) && (defined(SIZEOF_VOIDP) && SIZEOF_VOIDP>4)))
492 #    error "Inconsistency between current OS X architecture and the one used to generate original" 
493 #    error "CMake configuration. This is probably caused by starting CMake with the default value"
494 #    error "for CMAKE_OSX_ARCHITECTURES (blank), and then changing it. In this case all the tests"
495 #    error "will have been performed with the original (now incorrect) architecture."
496 #    error "To fix this, set CMAKE_OSX_ARCHITECTURES on the _command_line_ before starting CMake,"
497 #    error "or create a new such entry with your choice in the GUI _before_ hitting 'configure'."
498 #  endif
499 #endif