Gromacs 2020.2 install error

GROMACS version:2020.2
GROMACS modification: No
Here post your question: What has to be done based on "…undefined reference to srot_' and ...strsm_’ " ?


[ 98%] Linking CXX executable …/…/bin/template
/usr/bin/ld: …/…/lib/libgromacs.so.5.0.0: undefined reference to srot_' /usr/bin/ld: ../../lib/libgromacs.so.5.0.0: undefined reference to strsm_’
collect2: error: ld returned 1 exit status
make[2]: *** [share/template/CMakeFiles/template.dir/build.make:87: bin/template] Error 1
make[1]: *** [CMakeFiles/Makefile2:2225: share/template/CMakeFiles/template.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Can you share your CMake command and the following output of CMake? This problem arises, as linker can not find the shared object in your path.

Hi Masrul,

Thank you for trying to help.

My OS Ubuntu 19.10 64x

–>cmake … -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DBUILD_SHARED_LIBS=ON -DGMX_PREFER_STATIC_LIBS=OFF -DGMX_FFT_LIBRARY=fftw3 -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_COMPILER=/usr/bin/gcc


– Configuring done
– Generating done
– Build files have been written to: /usr/local/gromacs-2020.2/build

All went ok!

–>make

/usr/bin/ld: …/…/lib/libgromacs.so.5.0.0: undefined reference to srot_' collect2: error: ld returned 1 exit status make[2]: *** [share/template/CMakeFiles/template.dir/build.make:87: bin/template] Error 1 make[1]: *** [CMakeFiles/Makefile2:2447: share/template/CMakeFiles/template.dir/all] Error 2 make: *** [Makefile:163: all] Error 2 /usr/bin/ld: ../../lib/libgromacs.so.5.0.0: undefined reference to srot_’
collect2: error: ld returned 1 exit status
make[2]: *** [share/template/CMakeFiles/template.dir/build.make:87: bin/template] Error 1
make[1]: *** [CMakeFiles/Makefile2:2447: share/template/CMakeFiles/template.dir/all] Error 2

make: *** [Makefile:163: all] Error 2

Regards
Bruno

The configuration seems okay. By the way, what is ‘…’ three dots after cmake. Is it an alias or a typo. Typically, You would do the following

  • tar xvf gromacs-2020.2.tar.gz
  • cd gromacs-2020.2
  • mkdir build
  • cd build
  • Then execute command to configure
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DBUILD_SHARED_LIBS=ON -DGMX_PREFER_STATIC_LIBS=OFF -DGMX_FFT_LIBRARY=fftw3 -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_COMPILER=/usr/bin/gcc

There are two dots unless ‘…’ is aliased to something else.

Regards,
Masrul

Hi Masrul,
Related to your question " what is ‘…’ three dots after cmake. Is it an alias or a typo.": It is not a typo; means “the directory immediately above the current one“. It is where the cmake script file (as released by gromacs ) is placed.

If I follow the Gromacs install recommendation (similar to your post)

Hello Bruno,
Is issue solved? Okay, My mistake, If you use zsh then ‘…’ makes sense, which is aliased to two directory above current one. I am using bash, btw

– Masrul

Unfortunately not solved. When it comes to ‘make’ I still get


[ 98%] Linking CXX executable …/…/bin/template
/usr/bin/ld: …/…/lib/libgromacs.so.5.0.0: undefined reference to strsm_' /usr/bin/ld: ../../lib/libgromacs.so.5.0.0: undefined reference to srot_’
collect2: error: ld returned 1 exit status
make[2]: *** [share/template/CMakeFiles/template.dir/build.make:87: bin/template] Error 1
make[1]: *** [CMakeFiles/Makefile2:2447: share/template/CMakeFiles/template.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Changing the install path to /home/myname/gromacs-2020/build runs smoothly with ‘make’ BUT in ‘make check’ I get "84% tests passed, 9 tests failed out of 56
". I didn’t found how to correct this up to this moment. I ACCEPT ANY SUGGESTION/COMMENT.
bcramer@schroedinger:~/gromacs-2020.2/build$ make check

84% tests passed, 9 tests failed out of 56

Label Time Summary:
GTest = 102.18 secproc (52 tests)
IntegrationTest = 8.80 sec
proc (9 tests)
MpiTest = 75.22 secproc (8 tests)
SlowTest = 70.89 sec
proc (2 tests)
UnitTest = 22.50 sec*proc (41 tests)

Total Test time (real) = 175.26 sec

The following tests FAILED:
43 - MdrunTests (Failed)
44 - MdrunNonIntegratorTests (Failed)
46 - MdrunMpiTests (Failed)
49 - GmxapiExternalInterfaceTests (Failed)
50 - GmxapiMpiTests (Failed)
53 - regressiontests/complex (Failed)
54 - regressiontests/freeenergy (Failed)
55 - regressiontests/rotation (Failed)
56 - regressiontests/essentialdynamics (Failed)
Errors while running CTest
make[3]: *** [CMakeFiles/run-ctest-nophys.dir/build.make:58: CMakeFiles/run-ctest-nophys] Error 8
make[2]: *** [CMakeFiles/Makefile2:1312: CMakeFiles/run-ctest-nophys.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1091: CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:587: check] Error 2

According to your configuration, you don’t have MPI enabled, so those will be failed (46,50). I would ignore external api test, but essential dynamics failure, you should not ignore. Could you try ‘-DGMX_DOBULE=ON’ on configuration.

You can also check failed tests on regression folder, see these failed at runtime or tolerance error.

Regards
Masrul

Hi Masrul, including -DGMX_DOBULE=ON did not change the errors in ‘make check’. But one thing called my attention but I do not know how to fix this, namely: