hiddenSymmetries / virtual-casing

4 stars 7 forks source link

Not compiling with Intel C++ compiler #13

Closed mbkumar closed 7 months ago

mbkumar commented 7 months ago

When compiling with Intel compiler suite, icc/2023.2.1, I am getting the below error.

[1/2] Building CXX object CMakeFiles/virtual_casing.dir/src/python.cpp.o
  FAILED: CMakeFiles/virtual_casing.dir/src/python.cpp.o
  /shared/Modules/software/intel/compiler/2023.2.1/linux/bin/intel64/icpc -DSCTL_HAVE_BLAS -DSCTL_HAVE_LAPACK -Dvirtual_casing_EXPORTS -I/shared/miniforge3/envs/simsopt310/include -I/shared/software/virtual-casing/include -I/shared/software/virtual-casing/BIEST/include -isystem /shared/miniforge3/envs/simsopt310/include/python3.10 -isystem /shared/software/virtual-casing/extern/pybind11/include -O3 -march=native -mfma -ffp-contract=fast -O3 -DNDEBUG -std=gnu++14 -fPIC -fvisibility=hidden -qopenmp -MD -MT CMakeFiles/virtual_casing.dir/src/python.cpp.o -MF CMakeFiles/virtual_casing.dir/src/python.cpp.o.d -o CMakeFiles/virtual_casing.dir/src/python.cpp.o -c /shared/software/virtual-casing/src/python.cpp
  icpc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
  icpc: command line warning #10148: option '-ffp-contract=fast' not supported
  /shared/software/virtual-casing/BIEST/include/sctl/common.hpp(82): internal error: assertion failed at: "declarator.c", line 4569 in make_bound_expr_referenceable_from_file_scope

    template <typename ValueType, Long DIM> using StaticArray = ValueType[DIM];
                                                                          ^

  compilation aborted for /shared/software/virtual-casing/src/python.cpp (code 4)
dmalhotra commented 7 months ago

It seems to be a compiler bug. I've posted an example code on the Intel developer forum.

In any case, switching to the newer icpx compiler (instead of the deprecated icpc) resolves the issue. To build with icpx using CMake, use this command CC=icx CXX=icpx cmake ..

mbkumar commented 7 months ago

Ok. I'll try.

Thank you!

On Sat, Feb 24, 2024, 11:20 AM Dhairya Malhotra @.***> wrote:

It seems to be a compiler bug. I've posted an example code on the Intel developer forum https://community.intel.com/t5/Intel-C-Compiler/Internal-error-with-icpc-version-2021-9-0/m-p/1575040 .

In any case, switching to the newer icpx compiler (instead of the deprecated icpc) resolves the issue. To build with icpx using CMake, use this command CC=icx CXX=icpx cmake ..

— Reply to this email directly, view it on GitHub https://github.com/hiddenSymmetries/virtual-casing/issues/13#issuecomment-1962413930, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA62VEFUUYKJYMHPKXZV7V3YVIHMTAVCNFSM6AAAAABDRWPD6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSGQYTGOJTGA . You are receiving this because you authored the thread.Message ID: @.***>