Hi Kendall,
I am currently using GCC 11.2 and cuda 12.3.2, and that is not giving me compatibility issues. Maybe other colleagues can provide a chart of compatible version ranges.
Also, you may need to add "-DCUDA_TOOLKIT_ROOT_DIR='<cuda_location>/cuda12.3/toolkit/12.3.2' \" to your "build/run_cmake" file. Wish all the best!
Best regards,
Zhen.
_____________________
Zhen Li<
http://lizhen62017.wixsite.com/home>, Ph.D.,
The Merz Research Group<
http://merzgroup.org>,
Michigan State University,
Cleveland Clinic.
________________________________
From: Cherry, Kendall via AMBER <amber.ambermd.org>
Sent: Monday, August 11, 2025 5:21 PM
To: amber.ambermd.org <amber.ambermd.org>
Subject: [AMBER] Error: Incompatible CUDA and GNU versions when trying to install Amber
Hello all,
I am trying to install Amber on one of our lab computers now, rather than using it as a module as I have thus far. I am running into some CUDA/GNU compatibility issues when running ./run_cmake for pmemd24. I have followed the instructions in the manual exactly and have been troubleshooting how to downgrade the version of GCC I am using (at least temporarily, or in a conda environment) so that I can get this working.
Here is the error I have gotten when doing ./run_cmake:
-- **************************************************************************
-- Starting configuration of Amber version 24.0.0...
-- CMake Version: 3.22.1
-- For how to use this build system, please read this wiki:
--
https://urldefense.com/v3/__http://ambermd.org/pmwiki/pmwiki.php/Main/CMake__;!!HXCxUKc!wkqUNVrkrddFN3ctLii-3ggTUF6Zk1xx3lMU-tRK-7QTk1yIr61m5ZGQoco_xFl2ueJhBV3TgujeB1H97nn2J5c$
-- For a list of important CMake variables, check here:
--
https://urldefense.com/v3/__http://ambermd.org/pmwiki/pmwiki.php/Main/CMake-Common-Options__;!!HXCxUKc!wkqUNVrkrddFN3ctLii-3ggTUF6Zk1xx3lMU-tRK-7QTk1yIr61m5ZGQoco_xFl2ueJhBV3TgujeB1H9oB9u_YA$
-- **************************************************************************
-- Setting C compiler to gcc
-- Setting CXX compiler to g++
-- Setting Fortran compiler to gfortran
-- Amber source found, building AmberTools and Amber
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- The Fortran compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Testing if stdlib.h can be included...
-- Testing if stdlib.h can be included... yes
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-11.4 (found version "11.4")
-- CUDA version 11.4 detected
-- Configuring for SM3.5, SM5.0, SM5.2, SM5.3, SM6.0, SM6.1, SM7.0, SM7.5 and SM8.0
--
************************************************************
Error: Incompatible CUDA and GNU versions
11.4.0
See https://urldefense.com/v3/__https://stackoverflow.com/questions/6622454/cuda-incompatible-with-my-gcc-version__;!!HXCxUKc!wkqUNVrkrddFN3ctLii-3ggTUF6Zk1xx3lMU-tRK-7QTk1yIr61m5ZGQoco_xFl2ueJhBV3TgujeB1H9kXtFaWE$
************************************************************
--
CMake Error at cmake/CudaConfig.cmake:142 (message):
Call Stack (most recent call first):
CMakeLists.txt:129 (include)
-- Configuring incomplete, errors occurred!
See also "/home/vinnie/Amber24/pmemd24_src/build/CMakeFiles/CMakeOutput.log".
If errors are reported, search for 'CMake Error' in the cmake.log file.
If the cmake build report looks OK, you should now do the following:
make install
source /home/vinnie/Amber24/amber24/amber.sh
Consider adding the last line to your login startup script, e.g. ~/.bashrc
This was after running the following commands within my conda environment to point to GCC version 9, rather than 11.4.0, which is what is currently installed. CUDA is installed at version 11.4 and I know that it is not compatible with the 11.4.0 version of GCC, hence the attempt to downgrade.
sudo apt install gcc-9 g++-9
unset CC
unset CXX
export CC=/usr/bin/gcc-9
export CXX=/usr/bin/g++-9
export PATH=/usr/bin:$PATH
$CC --version
./run_cmake
If anyone has insight into how to fix this error, please let me know. I am happy to provide any more information that is helpful regarding my system setup, attempted troubleshooting, etc.
Thank you,
Kendall Cherry
Chemistry Ph.D. Student at UNC Chapel Hill
Kratochvil Lab
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
https://urldefense.com/v3/__http://lists.ambermd.org/mailman/listinfo/amber__;!!HXCxUKc!wkqUNVrkrddFN3ctLii-3ggTUF6Zk1xx3lMU-tRK-7QTk1yIr61m5ZGQoco_xFl2ueJhBV3TgujeB1H9bhqQI78$
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Aug 12 2025 - 09:00:02 PDT