mfem: "CUSPARSE_SPMV_CSR_ALG1" is undefined
Compiling mfem with cuda support on ORNL Summit using the cuda 11.2.0 module.
Full error mssage
$ nvcc -Xcompiler=-fPIC -g -Xcompiler=-Wall -std=c++14 -x=cu --expt-extended-lambda -arch=sm_70 -ccbin mpicxx \
-I/ccs/home/jfaibussow/petsc/arch-olcf-summit-streams-debug/include \
-I/ccs/home/jfaibussow/petsc/arch-olcf-summit-streams-debug/include -I/ccs/home/jfaibussow/petsc/include \
-I/ccs/home/jfaibussow/petsc/arch-olcf-summit-streams-debug/include -I/sw/summit/cuda/11.2.0/include \
-c linalg/complex_operator.cpp -o linalg/complex_operator.o
linalg/sparsemat.cpp(694): error: identifier "CUSPARSE_SPMV_CSR_ALG1" is undefined
Version info
Output of make info
: mfemInfo.txt
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Nov_30_19:09:01_PST_2020
Cuda compilation tools, release 11.2, V11.2.67
Build cuda_11.2.r11.2/compiler.29373293_0
$ echo $CUDA_DIR
/sw/summit/cuda/11.2.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 20 (20 by maintainers)
I’ll open a PR tomorrow morning (for real this time!).
Yeah sure, I’ll check that the cusparse version check works on the machines I’ve got access to.
I’d say use the condition
CUSPARSE_VERSION >= 11400
whereCUSPARSE_VERSION
is defined incusparse.h
asJudging by the posts above, this should work on both Lassen and Summit with their respective installs of CUDA 11.2.0.
If this is not the exact cutoff version, we can adjust again later, if this comes up again.
Alrighty so after getting in touch with the ORNL folks they mentioned that:
With that I inspected the respective
$CUDA_[HOME|DIR]/include/cusparse.h
for both Lassen and Summit and lo and beholdLassen:
Summit:
So maybe its not the cuda version that needs checking but the cusparse version.
This works.