lanl / phoebus

Phifty One Ergs Blows Up A Star
BSD 3-Clause "New" or "Revised" License
46 stars 2 forks source link

build failure in 'ngp_analysis' on aarch64 with CUDA #52

Closed jti-lanl closed 3 years ago

jti-lanl commented 3 years ago
$ module list

Currently Loaded Modules:
  1) gcc/11.1.0   2) openmpi/4.1.1-gcc_11.1.0   3) cuda/11.5.0   4) cmake/3.19.2

cmake -DPHOEBUS_ENABLE_CUDA=On -DCMAKE_CXX_COMPILER=`pwd`/../external/singularity-eos/utils/kokkos/bin/nvcc_wrapper -DKokkos_ARCH_HSW=ON -DKokkos_ARCH_VOLTA70=ON -DPHOEBUS_ENABLE_MPI=OFF ..

Building single-threaded here just for simplicity and reproducibility. With multiple threads, there are similar errors in many compiles. I've also shortened the list of "known arguments", in the diagnostics below.

$ make |& more
[  0%] Building CXX object parthenon/Kokkos/core/src/CMakeFiles/kokkoscore.dir/impl/Kokkos_CPUDiscovery.cpp.o
cc1plus: error: unknown value ‘core-avx2’ for ‘-march’
cc1plus: note: valid arguments are: armv8-a armv8.1-a armv8.2-a [etc]
cc1plus: error: unknown value ‘core-avx2’ for ‘-mtune’
cc1plus: note: valid arguments are: cortex-a34 cortex-a35 cortex-a53 cortex-a57 [etc]
pgrete commented 3 years ago

It looks like you're setting the host architecture to "Haswell" (with AVX2 instructions), but the issue title suggests you compile for ARM. Depending on the host architecture you may want to change the Kokkos_ARCH_HSW to the appropriate ARM version, see https://github.com/kokkos/kokkos/blob/master/BUILD.md#architecture-keywords

jdolence commented 3 years ago

Thanks @pgrete! I'm pretty sure that's exactly the problem.

jti-lanl commented 3 years ago

Apologies, and thanks for the pointer. I had no idea what 'HSW' meant. Now, I've found Kokkos_ARCH_ARMV81 (close enough) which configures for a successful build.

Yurlungur commented 3 years ago

Kokkos can also automatically detect the architecture. You might try leaving the Kokkos_ARCH_* line off.