Mdrun error with GPU in MacOS

GROMACS version: 2022
GROMACS modification: No
SO: MacOS 10.13.6
Compiler: clang 12 & OpenCL

Hello, i want to run GROMACS with GPU (OpenCL) in MacOS. During the compiling there’s no errors, but when i try to run mdrun this error appears:

Compilation of source file /usr/local/apps/gromacs-2022/src/gromacs/nbnxm/opencl/ failed!
– Used build options: -DWARP_SIZE_TEST=64 -D_AMD_SOURCE_ -DGMX_OCL_FASTGEN_ADD_TWINCUT -DEL_EWALD_ANA -DEELNAME=_ElecEw -DLJ_COMB_LB -DVDWNAME=_VdwLJCombLB -Dc_nbnxnGpuClusterSize=8 -DNBNXM_MIN_DISTANCE_SQUARED_VALUE_FLOAT=3.82e-07 -Dc_nbnxnGpuNumClusterPerSupercluster=8 -Dc_nbnxnGpuJgroupSize=4 -Dc_centralShiftIndex=22 -DIATYPE_SHMEM -cl-fast-relaxed-math -cl-denorms-are-zero -I/usr/local/apps/gromacs-2022/src/gromacs/nbnxm/opencl -I/usr/local/apps/gromacs-2022/src/
--------------LOG START---------------
:38:10: fatal error: ‘nbnxm_ocl_kernel_pruneonly.clh’ file not found
#include “nbnxm_ocl_kernel_pruneonly.clh”
---------------LOG END----------------

Program: gmx mdrun, version 2022
Source file: src/gromacs/gpu_utils/ocl_compiler.cpp (line 495)
Function: cl_program gmx::ocl::compileProgram(FILE *, const std::string &, const std::string &, const std::string &, cl_context, cl_device_id, DeviceVendor)

Internal error (bug):
Failed to compile/load nbnxm kernels for GPU #0 ATI Radeon HD 6770M
Could not build OpenCL program, error was CL_BUILD_PROGRAM_FAILURE

I already tried to put the nbnxm_ocl_kernel_pruneonly.clh full path but does not work.


LDFLAGS="-L/usr/local/opt/llvm@12/lib" CPPFLAGS="-I/usr/local/opt/llvm@12/include" CMAKE_INCLUDE_PATH=/usr/local/Cellar/open-mpi/4.1.2/include SDKROOT=$(xcrun --show-sdk-path) cmake … -DGMX_BUILD_OWN_FFTW=OFF -DREGRESSIONTEST_DOWNLOAD=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGMX_GPU=OpenCL

I tested with various GROMACS version but the result is the same, any ideas?

Thank you

That looks strange, assuming the file /usr/local/apps/gromacs-2022/src/gromacs/nbnxm/opencl/nbnxm_ocl_kernel_pruneonly.clh is not missing, with the full explicit path supplied to the runtime compilation command, it should not fail. Does mdrun run from the build tree (where you compiled it)?

I tried to run with full path, sourcing GMXRC and yes, from build tree.

Other thing, in some compilation the error is this:

Abort trap: 6

That’s a sign of a memory error; does it appear during compilation or during execution? In the former case that’s your compiler crashing, in the latter it is the application. Either way, I’m not sure I can help much as I don’t have such a system, we don’t run OSX in CI either (and you are also running a rather old operating system).