Hi,
On Sat, Nov 05, 2022 at 12:08:11AM +0100, Vlad Cojocaru via AMBER wrote:
> On an openSUSE Tumbleweed machine, I am trying to compile AMBER 22 with a
> non-default gcc. It worked with the default gcc (which points to gcc-12) but
> I cannot build the CUDA enabled executables because CUDA only supports gcc
> up to 11. So, I am trying to use "gcc-11" instead.
>
> I tried modifying the run_cmake file to include the options
> "-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
> -DCMAKE_FORTRAN_COMPILER=gfortran-11"
>
> I also tried setting the CC, CXX. FC environment variables (export CC=gcc-11
> ... ). However, run_cmake still tries to compile with the default gcc
> ignoring all these settings.
There's a gotcha: CMAKE_FORTRAN_COMPILER should be CMAKE_Fortran_COMPILER.
(This was discovered late in amber 22 release testing and deemed low
priority. Perhaps we were high on fungi as this looks like too mushroom
for error in hindsight 8.)
I used this to build with them thar new fangled oneapi compilers:
cmake $AMBER_PREFIX/amber22_src \
-DCMAKE_INSTALL_PREFIX=$AMBER_PREFIX/amber22 \
-DCOMPILER=MANUAL \
-DCMAKE_C_COMPILER=icx \
-DCMAKE_CXX_COMPILER=icpx \
-DCMAKE_F90_COMPILER=ifx \
-DCMAKE_Fortran_COMPILER=ifx \
-DBUILD_QUICK=TRUE \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCOLOR_CMAKE_MESSAGES=FALSE \
-DMPI=FALSE -DCUDA=FALSE -DINSTALL_TESTS=TRUE \
-DDOWNLOAD_MINICONDA=TRUE \
2>&1 | tee cmake.log
scott
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Nov 04 2022 - 23:30:03 PDT