Fix hipSYCL build with CUDA target
[alexxy/gromacs.git] / src / config.h.cmakein
index 347e31aceed73fac6ad02b105dbeb15d89cd1190..61755b09cfd57c74b1decc0e3b9cee472b8aad4d 100644 (file)
@@ -1,7 +1,9 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013 by the GROMACS development team.
+ * Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team.
+ * Copyright (c) 2019,2020,2021, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -56,6 +58,9 @@
 /* Use FFTW3 FFT library */
 #cmakedefine01 GMX_FFT_FFTW3
 
+/* Use the ARM Performance library with FFTW3 compatibility */
+#cmakedefine01 GMX_FFT_ARMPL_FFTW3
+
 /* Use MKL FFT library */
 #cmakedefine01 GMX_FFT_MKL
 
 /* AVX2 128-bit SIMD instruction set level was selected */
 #cmakedefine01 GMX_SIMD_X86_AVX2_128
 
-/* MIC (Xeon Phi) SIMD instruction set level was selected */
-#cmakedefine01 GMX_SIMD_X86_MIC
-
 /* AVX-512F foundation level instruction SIMD */
 #cmakedefine01 GMX_SIMD_X86_AVX_512
 
 /* AVX-512ER foundation level instruction SIMD */
 #cmakedefine01 GMX_SIMD_X86_AVX_512_KNL
 
-/* 32-bit ARM NEON SIMD instruction set level was selected */
-#cmakedefine01 GMX_SIMD_ARM_NEON
-
 /* ARM (AArch64) NEON Advanced SIMD instruction set level was selected */
 #cmakedefine01 GMX_SIMD_ARM_NEON_ASIMD
 
-/* IBM VMX was selected as SIMD instructions (Power 6 and later) */
-#cmakedefine01 GMX_SIMD_IBM_VMX
+/* ARM (SVE) Scalable Vector extensions */
+#cmakedefine01 GMX_SIMD_ARM_SVE
+
+/* SVE vector length */
+#define GMX_SIMD_ARM_SVE_LENGTH_VALUE @GMX_SIMD_ARM_SVE_LENGTH_VALUE@
 
 /* IBM VSX was selected as SIMD instructions (Power 7 and later) */
 #cmakedefine01 GMX_SIMD_IBM_VSX
 
-/* Fujitsu Sparc64 HPC-ACE SIMD acceleration */
-#cmakedefine01 GMX_SIMD_SPARC64_HPC_ACE
-
 /* Reference SIMD implementation for testing */
 #cmakedefine01 GMX_SIMD_REFERENCE
 
 /* Enable code that requires AVX-512 instruction support, without GMX_SIMD=AVX_512 */
 #cmakedefine01 SIMD_AVX_512_CXX_SUPPORTED
 
-/* Whether a double-precision configuration may target accuracy equivalent to single precision */
-#cmakedefine01 GMX_RELAXED_DOUBLE_PRECISION
+/* Whether NBNXM and other SIMD kernels should be compiled */
+#cmakedefine01 GMX_USE_SIMD_KERNELS
 
 /* Integer byte order is big endian. */
 #cmakedefine01 GMX_INTEGER_BIG_ENDIAN
    (MPI or thread_mpi) */
 #define GMX_MPI (GMX_LIB_MPI || GMX_THREAD_MPI)
 
-/* MPI_IN_PLACE exists for collective operations */
-#cmakedefine01 MPI_IN_PLACE_EXISTS
-
 /* Use OpenMP multithreading */
 #cmakedefine01 GMX_OPENMP
 
 /* Use the Portable Hardware Locality package (hwloc) */
 #cmakedefine01 GMX_USE_HWLOC
 
+/* Library version found for hwloc during configuration time */
+#define GMX_HWLOC_API_VERSION @GMX_HWLOC_API_VERSION@
+
 /* Can and should use nice(3) to set priority */
 #cmakedefine01 GMX_USE_NICE
 
 /* Use if we cannot rename checkpoints */
 #cmakedefine01 GMX_NO_RENAME
 
-/* Use (modified) Gamess-UK for QM-MM calculations */
-#cmakedefine01 GMX_QMMM_GAMESS
-
-/* Use (modified) Gaussian0x for QM-MM calculations */
-#cmakedefine01 GMX_QMMM_GAUSSIAN
-
-/* Use (modified) Mopac 7 for QM-MM calculations */
-#cmakedefine01 GMX_QMMM_MOPAC
-
-/* Use ORCA for QM-MM calculations */
-#cmakedefine01 GMX_QMMM_ORCA
-
-/* Use cycle counters */
-#cmakedefine01 GMX_CYCLECOUNTERS
-
 /* Use sub-counters */
 #cmakedefine01 GMX_CYCLE_SUBCOUNTERS
 
 /* Fallback path for VMD plug-ins */
 #define GMX_VMD_PLUGIN_PATH "@GMX_VMD_PLUGIN_PATH@"
 
+/* Default path for DSSP program */
+#define GMX_DSSP_PROGRAM_PATH "@GMX_DSSP_PROGRAM_PATH@"
+
 /* Define when pthreads are used */
 #cmakedefine THREAD_PTHREADS
 
 #cmakedefine THREAD_WINDOWS
 
 /* Define for busy wait option  */
-/* See gmxpre-config.h.cmakein for explanation for the #ifdef */
+/* See gmxpre-config.h.cmakein for explanation for the #ifndef */
 #ifndef TMPI_WAIT_FOR_NO_ONE
-#cmakedefine TMPI_WAIT_FOR_NO_ONE
+#cmakedefine01 TMPI_WAIT_FOR_NO_ONE
 #endif
 
 /* Define for copy buffer option */
 /* Enable x86 gcc inline assembly */
 #cmakedefine01 GMX_X86_GCC_INLINE_ASM
 
-/* Define constants useful for handling GPU support */
-#define GMX_GPU_NONE   0
-#define GMX_GPU_CUDA   1
-#define GMX_GPU_OPENCL 2
-/* Which kind of GPU support is configured */
-#define GMX_GPU @GMX_GPU_ACCELERATION_FRAMEWORK@
+/* Define if any type of GPU acceleration is compiled */
+#cmakedefine01 GMX_GPU
+
+/* Define if CUDA GPU acceleration is compiled */
+#cmakedefine01 GMX_GPU_CUDA
 
-/* CUDA runtime API version (identical to CUDART_VERSION from cuda_runtime_api.h) */
-#cmakedefine GMX_CUDA_VERSION @GMX_CUDA_VERSION@
+/* Define if OpenCL GPU acceleration is compiled */
+#cmakedefine01 GMX_GPU_OPENCL
+
+/* Define if SYCL GPU acceleration is compiled */
+#cmakedefine01 GMX_GPU_SYCL
+
+/* Define if hipSYCL is used for SYCL support (otherwise DPCPP is assumed) */
+#cmakedefine01 GMX_SYCL_HIPSYCL
+
+// Define if hipSYCL has HIP target(s)
+#cmakedefine01 GMX_HIPSYCL_HAVE_HIP_TARGET
+
+// Define if hipSYCL has CUDA target(s)
+#cmakedefine01 GMX_HIPSYCL_HAVE_CUDA_TARGET
+
+/* Define if Intel's DPCPP is used (default unless hipSYCL is chosen) */
+#define GMX_SYCL_DPCPP (!GMX_SYCL_HIPSYCL && GMX_GPU_SYCL)
 
 /* Use a single compilation unit when compiling the CUDA (non-bonded) kernels.  */
 #cmakedefine01 GMX_CUDA_NB_SINGLE_COMPILATION_UNIT
 
-/* Cluster size used by OpenCL kernel. Should be 8 for NVIDIA/AMD and 4 for Intel */
-#define GMX_OCL_CLUSTER_SIZE @GMX_OCL_CLUSTER_SIZE@
-
-/* Use NVML */
-#cmakedefine01 HAVE_NVML
+/* Use CUDA-aware MPI.  */
+#cmakedefine01 HAVE_CUDA_AWARE_MPI
+
+/* Define if HeFFTe library found */
+#cmakedefine01 Heffte_FOUND
+
+/* Cluster size used by nonbonded kernel. Should be 8 for NVIDIA/AMD and 4 for Intel */
+#define GMX_GPU_NB_CLUSTER_SIZE @GMX_GPU_NB_CLUSTER_SIZE@
+
+/* Define constants for build types (starting at 1 to make sure undefined values don't match) */
+#define CMAKE_BUILD_TYPE_DEBUG 1
+#define CMAKE_BUILD_TYPE_RELEASE 2
+#define CMAKE_BUILD_TYPE_RELWITHDEBINFO 3
+#define CMAKE_BUILD_TYPE_MINSIZEREL 4
+#define CMAKE_BUILD_TYPE_REFERENCE 5
+#define CMAKE_BUILD_TYPE_RELWITHASSERT 6
+#define CMAKE_BUILD_TYPE_PROFILE 7
+#define CMAKE_BUILD_TYPE_TSAN 8
+#define CMAKE_BUILD_TYPE_ASAN 9
+#define CMAKE_BUILD_TYPE_MSAN 10
+#define CMAKE_BUILD_TYPE_UBSAN 11
+#cmakedefine CMAKE_BUILD_TYPE CMAKE_BUILD_TYPE_@CMAKE_BUILD_TYPE_UPPER@
 
 /* Define relative path to OpenCL kernels */
-#define OCL_INSTALL_DIR "@OCL_INSTALL_DIR@"
+#define GMX_INSTALL_OCLDIR "@GMX_INSTALL_OCLDIR@"
+
+/* Minimum required OpenCL version support (both API and device) - split into integer components for convenience */
+#define REQUIRED_OPENCL_MIN_VERSION_MAJOR @REQUIRED_OPENCL_MIN_VERSION_MAJOR@
+#define REQUIRED_OPENCL_MIN_VERSION_MINOR @REQUIRED_OPENCL_MIN_VERSION_MINOR@
 
 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
 #cmakedefine01 HAVE_FSEEKO
 
 /* Define to 1 if _fseeki64 (and presumably _fseeki64) exists and is declared. */
+//NOLINTNEXTLINE(bugprone-reserved-identifier)
 #cmakedefine01 HAVE__FSEEKI64
 
 /* Have io.h (windows)*/
 #cmakedefine01 HAVE_MEMALIGN
 
 /* Define to 1 if you have the MSVC _aligned_malloc() function. */
+//NOLINTNEXTLINE(bugprone-reserved-identifier)
 #cmakedefine01 HAVE__ALIGNED_MALLOC
 
 /* Define to 1 if you have the clock_gettime() function. */
 /* Define to 1 if you have the gettimeofday() function. */
 #cmakedefine01 HAVE_GETTIMEOFDAY
 
-/* Define to 1 if you have the rdtscp instruction. */
-#cmakedefine01 HAVE_RDTSCP
+/* Define to 1 if you have the rdtscp instruction (ie essentially all x86 still in use. */
+#cmakedefine01 GMX_USE_RDTSCP
 
 /* Define to 1 if you have the fsync() function. */
 #cmakedefine01 HAVE_FSYNC
 
 /* Define to 1 if you have the Windows _commit() function. */
+//NOLINTNEXTLINE(bugprone-reserved-identifier)
 #cmakedefine01 HAVE__COMMIT
 
 /* Define to 1 if you have the fileno() function. */
 #cmakedefine01 HAVE_FILENO
 
 /* Define to 1 if you have the _fileno() function. */
+//NOLINTNEXTLINE(bugprone-reserved-identifier)
 #cmakedefine01 HAVE__FILENO
 
 /* Define to 1 if you have the sigaction() function. */
 /* Define to 1 if xmmintrin.h is present, otherwise 0 */
 #cmakedefine01 HAVE_XMMINTRIN_H
 
-/* Define to 1 if you have the POSIX <regex.h> header file. */
-#cmakedefine01 HAVE_POSIX_REGEX
-
-/* Define to 1 if you have the C++11 <regex> header file. */
-#cmakedefine01 HAVE_CXX11_REGEX
-
 /* Define to 1 if you have the sysconf() function */
 #cmakedefine HAVE_SYSCONF
 
  * malloc.h or xmmintrin.h, and 0 otherwise. Note that you need to
  * conditionally include the three headers too before using _mm_malloc().
  */
+//NOLINTNEXTLINE(bugprone-reserved-identifier)
 #cmakedefine01 HAVE__MM_MALLOC
 
 /* Define if SIGUSR1 is present */
 /* Define if we have fedisableexcept */
 #cmakedefine01 HAVE_FEDISABLEEXCEPT
 
+/* Define if we have MKL available */
+#cmakedefine01 HAVE_LIBMKL
+
+/* Define if we have lmfit support */
+#cmakedefine01 HAVE_LMFIT
+
+/* Define if we have muparser support */
+#cmakedefine01 HAVE_MUPARSER
+
+/* Build using clang analyzer */
+#cmakedefine01 GMX_CLANG_ANALYZER
+
+/* Use Interactive Molecular Dynamics */
+#cmakedefine01 GMX_IMD
+
 /*! \endcond */
 
 #endif