Hi all, we are trying to compile PETSc in Frontier using the structured matrix
hierarchical solver strumpack, which uses GPU and might be a good candidate for
our Poisson discretization.
The list of libs I used for PETSc in this case is:
$./configure COPTFLAGS="-O3" CXXOPTFLAGS="-O3" FOPTFLAGS="-O3" FCOPTFLAGS="-O3"
HIPOPTFLAGS="-O3 --offload-arch=gfx90a" --with-debugging=0 --with-cc=cc
--with-cxx=CC --with-fc=ftn --with-hip --with-hip-arch=gfx908 --with-hipc=hipcc
--LIBS="-L${MPICH_DIR}/lib -lmpi ${CRAY_XPMEM_POST_LINK_OPTS} -lxpmem
${PE_MPICH_GTL_DIR_amd_gfx90a} ${PE_MPICH_GTL_LIBS_amd_gfx90a}"
--download-kokkos --download-kokkos-kernels --download-suitesparse
--download-hypre --download-superlu_dist --download-strumpack --download-metis
--download-slate --download-magma --download-parmetis --download-ptscotch
--download-zfp --download-butterflypack
--with-openmp-dir=/opt/cray/pe/gcc/12.2.0/snos --download-scalapack
--download-cmake --force
I'm getting an error at configure time:
...
Trying to download
https://urldefense.us/v3/__https://github.com/liuyangzhuan/ButterflyPACK__;!!G_uCfscf7eWS!cW5KuKKMbmDa8n59SJGArXdSxVT_-V0qH3vt1-LE-CAr4wShO2pTXN3GvI0bVCwUh6RWH6z2URqBczHnVEyXXKAJ2LN7JnSj$
for BUTTERFLYPACK
=============================================================================================
=============================================================================================
Configuring BUTTERFLYPACK with CMake; this may take several minutes
=============================================================================================
=============================================================================================
Compiling and installing BUTTERFLYPACK; this may take several
minutes
=============================================================================================
=============================================================================================
Trying to download
https://urldefense.us/v3/__https://github.com/pghysels/STRUMPACK__;!!G_uCfscf7eWS!cW5KuKKMbmDa8n59SJGArXdSxVT_-V0qH3vt1-LE-CAr4wShO2pTXN3GvI0bVCwUh6RWH6z2URqBczHnVEyXXKAJ2FeUr7dA$
for STRUMPACK
=============================================================================================
=============================================================================================
Configuring STRUMPACK with CMake; this may take several minutes
=============================================================================================
=============================================================================================
Compiling and installing STRUMPACK; this may take several minutes
=============================================================================================
*********************************************************************************************
UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for
details):
---------------------------------------------------------------------------------------------
Error running make on STRUMPACK
*********************************************************************************************
Looking in the configure.log file I see error like this related to strumpack
compilation:
/opt/cray/pe/craype/2.7.19/bin/CC -D__HIP_PLATFORM_AMD__=1
-D__HIP_PLATFORM_HCC__=1 -Dstrumpack_EXPORTS
-I/autofs/nccs-svm1_home1/vanellam/Software/petsc/arch-linux-frontier-opt-gcc-direct/externalpackages/git.strumpack/src
-I/autofs/nccs-svm1_home1/vanellam/Software/petsc/arch-linux-frontier-opt-gcc-direct/externalpackages/git.strumpack/petsc-build
-isystem
/autofs/nccs-svm1_home1/vanellam/Software/petsc/arch-linux-frontier-opt-gcc-direct/include
-isystem /opt/rocm-5.4.0/include -isystem /opt/rocm-5.4.0/hip/include -isystem
/opt/rocm-5.4.0/llvm/lib/clang/15.0.0/.. -Wno-lto-type-mismatch -Wno-psabi -O3
-fPIC -fopenmp -Wno-lto-type-mismatch -Wno-psabi -O3 -fPIC -fopenmp -fPIC -Wall
-Wno-overloaded-virtual -fopenmp -x hip --offload-arch=gfx900
--offload-arch=gfx906 --offload-arch=gfx908 --offload-arch=gfx90a
--offload-arch=gfx1030 -MD -MT
CMakeFiles/strumpack.dir/src/clustering/NeighborSearch.cpp.o -MF
CMakeFiles/strumpack.dir/src/clustering/NeighborSearch.cpp.o.d -o
CMakeFiles/strumpack.dir/src/clustering/NeighborSearch.cpp.o -c
/autofs/nccs-svm1_home1/vanellam/Software/petsc/arch-linux-frontier-opt-gcc-direct/externalpackages/git.strumpack/src/clustering/NeighborSearch.cpp
gmake[2]: Leaving directory
'/autofs/nccs-svm1_home1/vanellam/Software/petsc/arch-linux-frontier-opt-gcc-direct/externalpackages/git.strumpack/petsc-build'
gmake[1]: Leaving directory
'/autofs/nccs-svm1_home1/vanellam/Software/petsc/arch-linux-frontier-opt-gcc-direct/externalpackages/git.strumpack/petsc-build'
stdout:
g++: error: unrecognized command-line option '--offload-arch=gfx900'
g++: error: unrecognized command-line option '--offload-arch=gfx900'
g++: error: unrecognized command-line option '--offload-arch=gfx900'
It seems the configure is picking up CC (g++) instead of hipcc as the compiler
for strumpack.
I wonder if anyone has come across this issue or has any suggestions?
Thanks!
Marcos