[AMBER] amber20 - test suite picks up the wrong libgfortran

From: Mark Dixon <mark.c.dixon.durham.ac.uk>
Date: Mon, 22 Nov 2021 17:12:07 +0000 (GMT)

Hi there,

I'm trying to tackle building amber20 using the new cmake-based system for
the first time. I'm not sure what compiler to use, so am playing with GCC
11.2 on Rocky 8 Linux and have hit a problem.

The build process adds an RPATH into its test executables, with /usr/lib64
placed sufficiently near the start that the OS-provided GCC gfortran
runtime overrides my compiler (which is in a non-standard location). The
contents of $AMBERHOME/{bin,lib} don't suffer from this problem.

Manually deleting the RPATH fixes the test executables, but is annoying.

e.g.

$ readelf -d ./AmberTools/test/nab/rismala-mdiis0 | grep RPATH
  0x000000000000000f (RPATH) Library rpath: [/local/slurm.1052/amber20/lib:/usr/lib64:/apps/developers/libraries/openblas/0.3.18/1/gcc-11.2/lib:/apps/developers/compilers/gcc/11.2/1/default/lib64:/lib64:/local/slurm.1052/amber20_src/build/AmberTools/src/xblas/build]

$ ./AmberTools/test/nab/rismala-mdiis0
./AmberTools/test/nab/rismala-mdiis0: /usr/lib64/libgfortran.so.5: version `GFORTRAN_10' not found (required by ./AmberTools/test/nab/rismala-mdiis0)
./AmberTools/test/nab/rismala-mdiis0: /usr/lib64/libgfortran.so.5: version `GFORTRAN_10' not found (required by /local/slurm.1052/amber20/lib/libnetcdff.so.6)
./AmberTools/test/nab/rismala-mdiis0: /usr/lib64/libgfortran.so.5: version `GFORTRAN_10' not found (required by /local/slurm.1052/amber20/lib/libpbsa.so)

$ chrpath -d ./AmberTools/test/nab/rismala-mdiis0

$ ./AmberTools/test/nab/rismala-mdiis0
getpdb: can't open file ala.pdb

$ echo $LD_LIBRARY_PATH
/local/slurm.1052/amber20/lib:/local/slurm.1052/amber20/lib:/apps/developers/libraries/openblas/0.3.18/1/gcc-11.2/lib:/apps/developers/libraries/openmpi/4.1.1/1/gcc-11.2/lib:/apps/developers/compilers/gcc/11.2/1/default/lib64:/apps/developers/compilers/gcc/11.2/1/default/lib:/apps/infrastructure/slurm/default/default/default/lib:/apps/infrastructure/slurm/default/default/default/lib:
$ echo $LIBRARY_PATH
/apps/developers/libraries/openblas/0.3.18/1/gcc-11.2/lib:/apps/developers/libraries/openmpi/4.1.1/1/gcc-11.2/lib:/apps/developers/compilers/gcc/11.2/1/default/lib64:/apps/developers/compilers/gcc/11.2/1/default/lib:/apps/infrastructure/slurm/default/default/default/lib:/apps/infrastructure/slurm/default/default/default/lib:/apps/infrastructure/slurm/default/default/default/lib:


Starting again and giving cmake "-DCMAKE_SKIP_INSTALL_RPATH=TRUE" results
in the same issue. Using "-DCMAKE_SKIP_RPATH=TRUE" causes the build to
fail, with the "make" step no longer being able find bundled libraries it
has built (e.g. netcdf)

Any tips, please? Or should I just be using intel or clang anyway?

Thanks,

Mark

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Nov 22 2021 - 09:30:02 PST
Custom Search