LLNL / sundials

Official development repository for SUNDIALS - a SUite of Nonlinear and DIfferential/ALgebraic equation Solvers. Pull requests are welcome for bug fixes and minor changes.
https://computing.llnl.gov/projects/sundials
BSD 3-Clause "New" or "Revised" License
522 stars 130 forks source link

[BUG] Compilation failure for SYCL with Intel oneAPI 2025.0 #596

Open baperry2 opened 1 month ago

baperry2 commented 1 month ago

Current Behavior:

The PelePhysics CI is failing while compiling Sundials with SYCL support. The error is reproduced below - the std::sqrt function is not found. This is new behavior for Intel oneAPI 2025.0 (released 10/25/24) and does not occur for older versions.

/home/runner/work/PelePhysics/PelePhysics/PelePhysics-sycl/Submodules/sundials/src/nvector/sycl/nvector_sycl.cpp:1149:10: error: no member named 'sqrt' in namespace 'std'; did you mean 'sycl::sqrt'?
 1149 |   return std::sqrt(sum / N);
      |          ^~~~~~~~~
      |          sycl::sqrt
/opt/intel/oneapi/compiler/2025.0/bin/compiler/../../include/sycl/detail/builtins/math_functions.inc:188:34: note: 'sycl::sqrt' declared here
  188 | BUILTIN_GENF_NATIVE_OPT(ONE_ARG, sqrt)
      |                                  ^
/home/runner/work/PelePhysics/PelePhysics/PelePhysics-sycl/Submodules/sundials/src/nvector/sycl/nvector_sycl.cpp:1195:10: error: no member named 'sqrt' in namespace 'std'; did you mean 'sycl::sqrt'?
 1195 |   return std::sqrt(sum / N);
      |          ^~~~~~~~~
      |          sycl::sqrt
/opt/intel/oneapi/compiler/2025.0/bin/compiler/../../include/sycl/detail/builtins/math_functions.inc:188:34: note: 'sycl::sqrt' declared here
  188 | BUILTIN_GENF_NATIVE_OPT(ONE_ARG, sqrt)
      |                                  ^
/home/runner/work/PelePhysics/PelePhysics/PelePhysics-sycl/Submodules/sundials/src/nvector/sycl/nvector_sycl.cpp:1236:10: error: no member named 'sqrt' in namespace 'std'; did you mean 'sycl::sqrt'?
 1236 |   return std::sqrt(N_VWSqrSumLocal_Sycl(x, w));
      |          ^~~~~~~~~
      |          sycl::sqrt
/opt/intel/oneapi/compiler/2025.0/bin/compiler/../../include/sycl/detail/builtins/math_functions.inc:188:34: note: 'sycl::sqrt' declared here
  188 | BUILTIN_GENF_NATIVE_OPT(ONE_ARG, sqrt)
      |                                  ^

See here for full output.

Expected Behavior:

Sundials should compile successfully with Intel oneAPI 2025.0.

Steps To Reproduce:

Haven't reproduced locally, just by running the PelePhysics-CI workflow.

Environment:

Anything else: