From 9ff2a3e0ca4431898126e8210966ec168428f92c Mon Sep 17 00:00:00 2001 From: Andrey Alekseenko Date: Sun, 19 Sep 2021 00:30:45 +0300 Subject: [PATCH] Fix compilation with oneAPI 2021.2 and earlier We were using some PP defines introduced only in 2021.3. And, since they are not standard, now we play it safe and don't use them if they are not defined. Bug introduced in MR !1888 (2861057f). --- src/gromacs/utility/sycl_version_information.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gromacs/utility/sycl_version_information.cpp b/src/gromacs/utility/sycl_version_information.cpp index b3a1541244..fdb01bf724 100644 --- a/src/gromacs/utility/sycl_version_information.cpp +++ b/src/gromacs/utility/sycl_version_information.cpp @@ -51,11 +51,15 @@ namespace gmx std::string getSyclCompilerVersion() { #if GMX_SYCL_DPCPP +# ifdef __LIBSYCL_MAJOR_VERSION return formatString("%d (libsycl %d.%d.%d)", __SYCL_COMPILER_VERSION, __LIBSYCL_MAJOR_VERSION, __LIBSYCL_MINOR_VERSION, __LIBSYCL_PATCH_VERSION); +# else + return formatString("%d", __SYCL_COMPILER_VERSION); +# endif #elif GMX_SYCL_HIPSYCL return hipsycl::sycl::detail::version_string(); #else -- 2.22.0