ECP-WarpX / picsar

PICSAR is a library of modular physics routines for PIC codes; historically, it is also a Fortran, high performance repository intended to help scientists porting their Particle-In-Cell (PIC) codes
https://picsar.net
Other
31 stars 15 forks source link

WarpX: QED Compile Error On Spack oneAPI 2024.2.0 #52

Closed ax3l closed 3 weeks ago

ax3l commented 4 weeks ago

Compiling WarpX with PICSAR-QED on the CI runners of Spack for SYCL GPUs with oneAPI 2024.2.0 leads to compile errors of the form:

[  9%] Building CXX object CMakeFiles/lib_2d.dir/Source/WarpX.cpp.o
/builds/spack/spack/lib/spack/env/oneapi/icpx -DADIOS2_USE_MPI -DAMREX_SPACEDIM=2 -DPXRMP_DPCPP_FIX=1 -DWARPX_DIM_XZ -DWARPX_QED -DWARPX_USE_OPENPMD -DWARPX_ZINDEX=1 -Dlib_2d_EXPORTS -Dlib_rz_EXPORTS -I/tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-src/Source -I/tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-build-supyiby/Source -I/tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-build-supyiby/_deps/fetchedpicsar-src/multi_physics/QED/include -I/home/software/spack/[padded-to-256-chars]/linux-ubuntu22.04-x86_64_v3/oneapi-2024.2.0/amrex-24.08-3p2jxuxlztx7xqnzlguvrlaljvlqinp6/share/amrex/C_scripts -isystem /home/software/spack/[padded-to-256-chars]/linux-ubuntu22.04-x86_64_v3/oneapi-2024.2.0/amrex-24.08-3p2jxuxlztx7xqnzlguvrlaljvlqinp6/include -isystem /home/software/spack/[padded-to-256-chars]/linux-ubuntu22.04-x86_64_v3/oneapi-2024.2.0/mpich-4.2.2-ap7e2gsod6iqplrk7v6qlpy4ccxpgx4c/include -isystem /home/software/spack/[padded-to-256-chars]/linux-ubuntu22.04-x86_64_v3/oneapi-2024.2.0/openpmd-api-0.15.2-v2rgh55mh72rkpx5t7fbsrf3qmxhpque/include -isystem /home/software/spack/[padded-to-256-chars]/linux-ubuntu22.04-x86_64_v3/oneapi-2024.2.0/adios2-2.8.3-tclvcu6fodbodirnitfim7ylspahklgo/include -O3 -DNDEBUG -std=c++17 -fPIC -MD -MT CMakeFiles/lib_2d.dir/Source/WarpX.cpp.o -MF CMakeFiles/lib_2d.dir/Source/WarpX.cpp.o.d -o CMakeFiles/lib_2d.dir/Source/WarpX.cpp.o -c /tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-src/Source/WarpX.cpp
In file included from /tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-src/Source/WarpX.cpp:33:
In file included from /tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-src/Source/Particles/MultiParticleContainer.H:23:
In file included from /tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-src/Source/Particles/PhysicalParticleContainer.H:18:
In file included from /tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-src/Source/Particles/ElementaryProcess/QEDPairGeneration.H:15:
In file included from /tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-src/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H:12:
In file included from /tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-src/Source/Particles/ElementaryProcess/QEDInternals/QedChiFunctions.H:18:
In file included from /tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-build-supyiby/_deps/fetchedpicsar-src/multi_physics/QED/include/picsar_qed/physics/chi_functions.hpp:10:
In file included from /tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-build-supyiby/_deps/fetchedpicsar-src/multi_physics/QED/include/picsar_qed/math/vec_functions.hpp:10:
/tmp/root/spack-stage/spack-stage-warpx-24.08-supyibybcwsmmq4iztqvmr5jbeiv4hwz/spack-build-supyiby/_deps/fetchedpicsar-src/multi_physics/QED/include/picsar_qed/math/cmath_overloads.hpp:10:14: fatal error: 'CL/sycl.hpp' file not found
   10 |     #include <CL/sycl.hpp>
      |              ^~~~~~~~~~~~~

full log

Seen in https://github.com/spack/spack/pull/45251

ax3l commented 4 weeks ago

Quick google search: we need -fsycl-unnamed-lambda? I think this is default by now.

ax3l commented 4 weeks ago

I think the include is called #include <sycl/sycl.hpp> these days not <CL/sycl.hpp>, from a quick search in AMReX.