Castro
Castro copied to clipboard
build error for RadBlastWave with Hypre v2.25 and CUDA 11.7
I can't build the RadBlastWave example with HYPRE 2.25.0 and CUDA 11.7.0. It fails at the final link step with undefined references to cublas
functions. I've installed HYPRE as recommended in the Castro documentation.
/g/data/jh2/bw0729/hypre_v2.25.0/lib/libHYPRE.a(device_utils.obj): In function `hypre_DeviceDataDestroy(hypre_DeviceData*)':
tmpxft_002ba087_00000000-6_device_utils.cudafe1.cpp:(.text+0x26c4): undefined reference to `cublasDestroy_v2'
/g/data/jh2/bw0729/hypre_v2.25.0/lib/libHYPRE.a(device_utils.obj): In function `hypre_DeviceDataCublasHandle(hypre_DeviceData*)':
tmpxft_002ba087_00000000-6_device_utils.cudafe1.cpp:(.text+0x340e): undefined reference to `cublasCreate_v2'
tmpxft_002ba087_00000000-6_device_utils.cudafe1.cpp:(.text+0x342a): undefined reference to `cublasSetStream_v2'
/g/data/jh2/bw0729/hypre_v2.25.0/lib/libHYPRE.a(vector.obj): In function `hypre_SeqVectorScale':
tmpxft_002bae35_00000000-6_vector.cudafe1.cpp:(.text+0x604): undefined reference to `cublasDscal_v2'
/g/data/jh2/bw0729/hypre_v2.25.0/lib/libHYPRE.a(vector.obj): In function `hypre_SeqVectorAxpy':
tmpxft_002bae35_00000000-6_vector.cudafe1.cpp:(.text+0x6a6): undefined reference to `cublasDaxpy_v2'
/g/data/jh2/bw0729/hypre_v2.25.0/lib/libHYPRE.a(vector.obj): In function `hypre_SeqVectorInnerProd':
tmpxft_002bae35_00000000-6_vector.cudafe1.cpp:(.text+0x82d): undefined reference to `cublasDdot_v2'
collect2: error: ld returned 1 exit status
make: *** [../../../external/amrex/Tools/GNUMake/Make.rules:56: Castro3d.gnu.MPI.CUDA.ex] Error 1
Acknowledged, I was able to reproduce this on Perlmutter with Hypre v2.25.0 and the CUDA 11.7 from NVHPC.
Can you try this again on Perlmutter? I suspect this was fixed by https://github.com/AMReX-Codes/amrex/pull/2933
I don't have access to Perlmutter, but tested it on NCSA Delta and it builds now. The amrex submodule checked out by default does not yet include this fix.
I'll update the submodule
https://github.com/AMReX-Astro/Castro/pull/2275