SPECFEM / specfem3d

SPECFEM3D_Cartesian simulates acoustic (fluid), elastic (solid), coupled acoustic/elastic, poroelastic or seismic wave propagation in any type of conforming mesh of hexahedra (structured or not).
GNU General Public License v3.0
409 stars 227 forks source link

GPU compilation error: "texture is not a template" #1619

Closed th-reb closed 1 year ago

th-reb commented 1 year ago

Hello,

I am trying to install Specfem3d with Cuda enabled. I run on a GTX 1080 (Pascal), with cuda 12.1.

I pulled a clean master branch, then did:
./configure FC=gfortran CC=gcc MPIFC=mpif90 --with-cuda=cuda8 CUDA_LIB=/usr/local/cuda-12.1/lib64 make clean make install

During the make install I get the following error: image

I put the complete Makefile log attached.

Do you know if I'm doing something wrong ? I did not find anything relevant on the internet.

Best regards, Théo

danielpeter commented 1 year ago

yes, this error appears with CUDA toolkit version 12.

given you want to compile for a Pascal architecture, you can either use a CUDA toolkit version < 12 (there is Pascal support since CUDA 8) to fix this issue, or get the newest devel branch version:

git clone --recursive --branch devel https://github.com/SPECFEM/specfem3d.git

where this has been fixed in PR #1602

th-reb commented 1 year ago

Hello @danielpeter, thanks a lot for your reply ! I compiled using the current devel branch d3f66cb, it worked.

Gained a >5x speedup (was running on 4 cores only), which is pretty nice !