Skip to content

CUDA aarch64 fix from German P. Barletta#1142

Merged
drroe merged 1 commit intoAmber-MD:masterfrom
drroe:fix.aarch64.cuda
Jul 25, 2025
Merged

CUDA aarch64 fix from German P. Barletta#1142
drroe merged 1 commit intoAmber-MD:masterfrom
drroe:fix.aarch64.cuda

Conversation

@drroe
Copy link
Contributor

@drroe drroe commented Jul 25, 2025

Email from @pgbarletta :

I was getting this error:

cuda_kernels/libcpptraj_cuda_routines.a(cpptraj_cuda_routines_generated_core_kernels.cu.o): in function __device_stub__Z25kClosestDistsToPt_NoImagePdPKdS1_diii(double*, double const*, double const*, double, int, int, int)': tmpxft_003a07b9_00000000-6_core_kernels.compute_90.cudafe1.cpp:(.text+0x1c4): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against symbol kClosestDistsToPt_NoImage(double*, double const*, double const*, double, int, int, int)' defined in .text section in cuda_kernels/libcpptraj_cuda_routines.a(cpptraj_cuda_routines_generated_core_kernels.cu.o)
/scratch/10321/pb777/miniforge3/envs/at25/conda-bld/ambertools-dac_1753055509953/_build_env/bin/../lib/gcc/aarch64-conda-linux-gnu/13.2.0/../../../../aarch64-conda-linux-gnu/bin/ld: tmpxft_003a07b9_00000000-6_core_kernels.compute_90.cudafe1.cpp:(.text+0x1c4): warning: too many GOT entries for -fpic, please recompile with -fPIC
collect2: error: ld returned 1 exit status

when building, so I had to apply the patch I'm attaching to `Ambertools/src/cpptra/CMakeLists.txt`, 

It works now, and it doesn't break the x86_64 build.

I will need to do a followup pull request to fix the configure build at some point as well.

@drroe drroe added the cmake Issues/changes related to the cmake build system. label Jul 25, 2025
@drroe drroe merged commit e4bb6ba into Amber-MD:master Jul 25, 2025
11 checks passed
@drroe drroe deleted the fix.aarch64.cuda branch July 25, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake Issues/changes related to the cmake build system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant