#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2012,2013,2014,2019, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2019,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.
# some compiler-provided information
#
macro(get_compiler_info LANGUAGE BUILD_COMPILER)
- set(${BUILD_COMPILER} "${CMAKE_${LANGUAGE}_COMPILER} ${CMAKE_${LANGUAGE}_COMPILER_ID} ${CMAKE_${LANGUAGE}_COMPILER_VERSION}")
+ if(GMX_INTEL_LLVM AND NOT CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
+ # Manually set compiler info for Intel LLVM. Can be removed after we require CMake 3.20+.
+ set(${BUILD_COMPILER} "${CMAKE_${LANGUAGE}_COMPILER} IntelLLVM ${GMX_INTEL_LLVM_VERSION}")
+ else()
+ set(${BUILD_COMPILER} "${CMAKE_${LANGUAGE}_COMPILER} ${CMAKE_${LANGUAGE}_COMPILER_ID} ${CMAKE_${LANGUAGE}_COMPILER_VERSION}")
+ endif()
endmacro()
/** SYCL hipSYCL backend list */
#define SYCL_HIPSYCL_COMPILER_LAUNCHER "@HIPSYCL_SYCLCC_LAUNCHER@"
#define SYCL_HIPSYCL_COMPILER_FLAGS "@HIPSYCL_SYCLCC_EXTRA_ARGS@"
-#define SYCL_HIPSYCL_PLATFORMS "@HIPSYCL_PLATFORMS_STRING@"
+#define SYCL_HIPSYCL_TARGETS "@HIPSYCL_TARGETS@"
/* 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
# This file is part of the GROMACS molecular simulation package.
#
# Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team.
-# Copyright (c) 2015,2017,2018,2019,2020, by the GROMACS development team, led by
+# Copyright (c) 2015,2017,2018,2019,2020 by the GROMACS development team.
+# Copyright (c) 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.
if (GMX_GPU_CUDA)
gmx_add_libgromacs_sources(cuda_version_information.cu)
endif()
+if (GMX_GPU_SYCL)
+ _gmx_add_files_to_property(SYCL_SOURCES
+ sycl_version_information.cpp
+ )
+endif()
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${UTILITY_SOURCES} PARENT_SCOPE)
if(GMX_INSTALL_LEGACY_API)
# include <fftw3.h>
#endif
-#ifdef HAVE_LIBMKL
+#if HAVE_LIBMKL
# include <mkl.h>
#endif
#include "gromacs/utility/textwriter.h"
#include "cuda_version_information.h"
+#include "sycl_version_information.h"
namespace
{
writer->writeLine(formatString("C++ compiler: %s", BUILD_CXX_COMPILER));
writer->writeLine(formatString(
"C++ compiler flags: %s %s", BUILD_CXXFLAGS, CMAKE_BUILD_CONFIGURATION_CXX_FLAGS));
-#ifdef HAVE_LIBMKL
+#if HAVE_LIBMKL
/* MKL might be used for LAPACK/BLAS even if FFTs use FFTW, so keep it separate */
writer->writeLine(formatString(
- "Linked with Intel MKL version %d.%d.%d.", __INTEL_MKL__, __INTEL_MKL_MINOR__, __INTEL_MKL_UPDATE__));
+ "Intel MKL version: %d.%d.%d", __INTEL_MKL__, __INTEL_MKL_MINOR__, __INTEL_MKL_UPDATE__));
#endif
#if GMX_GPU_OPENCL
writer->writeLine(formatString("OpenCL include dir: %s", OPENCL_INCLUDE_DIR));
writer->writeLine("CUDA runtime: " + gmx::getCudaRuntimeVersionString());
#endif
#if GMX_SYCL_DPCPP
- writer->writeLine(formatString("SYCL DPCPP flags: %s", SYCL_DPCPP_COMPILER_FLAGS));
+ writer->writeLine(formatString("SYCL DPC++ flags: %s", SYCL_DPCPP_COMPILER_FLAGS));
+ writer->writeLine("SYCL DPC++ version: " + gmx::getSyclCompilerVersion());
#endif
#if GMX_SYCL_HIPSYCL
writer->writeLine(formatString("hipSYCL launcher: %s", SYCL_HIPSYCL_COMPILER_LAUNCHER));
writer->writeLine(formatString("hipSYCL flags: %s", SYCL_HIPSYCL_COMPILER_FLAGS));
- writer->writeLine(formatString("hipSYCL platforms: %s", SYCL_HIPSYCL_PLATFORMS));
+ writer->writeLine(formatString("hipSYCL targets: %s", SYCL_HIPSYCL_TARGETS));
+ writer->writeLine("hipSYCL version: " + gmx::getSyclCompilerVersion());
#endif
}
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 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.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+
+#include "gmxpre.h"
+
+#include "config.h"
+
+#include "sycl_version_information.h"
+
+#if GMX_GPU_SYCL
+# include "gromacs/gpu_utils/gmxsycl.h"
+#endif
+#include "gromacs/utility/exceptions.h"
+#include "gromacs/utility/stringutil.h"
+
+namespace gmx
+{
+
+std::string getSyclCompilerVersion()
+{
+#if GMX_SYCL_DPCPP
+ return formatString("%d (libsycl %d.%d.%d)",
+ __SYCL_COMPILER_VERSION,
+ __LIBSYCL_MAJOR_VERSION,
+ __LIBSYCL_MINOR_VERSION,
+ __LIBSYCL_PATCH_VERSION);
+#elif GMX_SYCL_HIPSYCL
+ return hipsycl::sycl::detail::version_string();
+#else
+ GMX_THROW(gmx::InternalError("Not implemented for non-SYCL build"));
+#endif
+}
+
+} // namespace gmx
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 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.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+#ifndef GMX_UTILITY_SYCL_VERSION_INFORMATION_H
+#define GMX_UTILITY_SYCL_VERSION_INFORMATION_H
+
+#include <string>
+
+namespace gmx
+{
+
+//! Returns an internal version strings of the Intel DPC++ and hipSYCL compiler.
+std::string getSyclCompilerVersion();
+
+} // namespace gmx
+
+#endif