SIGSEGV during GPU initialization in xsmooth_sem under CUDA 12.6 / GCC 11+ (Parameter mismatch) #1873
SerenaLiu0
started this conversation in
SPECFEM3D [General]
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
When running xsmooth_sem compiled with CUDA 12.6 and GCC 11+, the program crashes with a segmentation fault (SIGSEGV) at:
There is a parameter count mismatch between the Fortran caller and the C/CUDA definition:
C/CUDA Definition (gpu/initialize_gpu.cu): Expects 3 arguments.
void FC_FUNC_(initialize_gpu_device, ...)(&rank, &dummy_nb_devices, &init_type);Fortran Caller (smooth_sem.F90): Passes only 2 arguments.
call initialize_gpu_device(myrank, ncuda_devices)Under stricter register/stack optimizations in modern compilers (CUDA 12.6 / GCC 11+), dereferencing the missing third argument (init_type) leads to an invalid memory reference, causing the SIGSEGV.
FIX:
Append the missing third argument 0 (default initialization type) in smooth_sem.F90:
if (USE_GPU) call initialize_gpu_device(myrank,ncuda_devices,0)All reactions