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).
std::string getSyclCompilerVersion()
{
#if GMX_SYCL_DPCPP
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);
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
#elif GMX_SYCL_HIPSYCL
return hipsycl::sycl::detail::version_string();
#else