Castro icon indicating copy to clipboard operation
Castro copied to clipboard

build error for RadBlastWave with Hypre v2.25 and CUDA 11.7

Open BenWibking opened this issue 1 year ago • 5 comments

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

BenWibking avatar Aug 07 '22 23:08 BenWibking

Acknowledged, I was able to reproduce this on Perlmutter with Hypre v2.25.0 and the CUDA 11.7 from NVHPC.

maxpkatz avatar Aug 11 '22 18:08 maxpkatz

Can you try this again on Perlmutter? I suspect this was fixed by https://github.com/AMReX-Codes/amrex/pull/2933

maxpkatz avatar Sep 22 '22 02:09 maxpkatz

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.

BenWibking avatar Sep 22 '22 15:09 BenWibking

I'll update the submodule

zingale avatar Sep 22 '22 15:09 zingale

https://github.com/AMReX-Astro/Castro/pull/2275

zingale avatar Sep 22 '22 15:09 zingale