Problem compiling Gromacs 2022.1 [Solved]

GROMACS version: 2022.1
GROMACS modification: No

Hi Folks

I ran into an interesting problem compiling Gromacs 2022.1

I have 2 nearly identical computers. Both have:
Nvidia 2080Ti GPU
Ubuntu 20.04
gcc version 9.4.0
cuda-11.2

system A has Intel i7-9700K CPU
system B has Intel i9-9820X CPU

Compiling Gromacs as follows:
cmake … -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.2 >& make_1.log
make >& make_2.log
make check >& make_3.log

Both systems compiled Gromacs 2022 fine, and system A compiled 2022.1. However system B gave multiple errors including:

15/88 Test #15: GmxlibTests …***Failed 0.01 sec
/home/programs/gromacs/gromacs-2022.1/build/bin/nonbonded-fep-test: symbol lookup error: /home/programs/gromacs/gromacs-2022.1/build/bin/nonbonded-fep-test: undefined symbol: Z25gmx_nb_free_energy_kernelRK8t_nblistRKN3gmx19ArrayRefWithPaddingIKNS2_11BasicVectorIfEEEEbiffRK19interaction_const_tNS2_8ArrayRefIS6_EENSD_IKfEESG_SG_SG_NSD_IKiEESI_iSG_P6t_nrnbNS3_IS5_EEPA3_fNSD_IfEESO_SO

30/88 Test #30: MathUnitTests …***Failed 0.01 sec
/home/programs/gromacs/gromacs-2022.1/build/bin/math-test: symbol lookup error: /home/programs/gromacs/gromacs-2022.1/build/bin/math-test: undefined symbol: _ZNK3gmx20AffineTransformation8gradientEv

…etc

and

The following tests FAILED:
1 - GmxapiExternalInterfaceTests (Failed)
15 - GmxlibTests (Failed)
30 - MathUnitTests (Failed)
48 - GmxPreprocessTests (Failed)
62 - MdrunModulesTests (Failed)

The only difference in compiler flags I saw is that system B adds “–enable-avx512” when building FFTW3. However, running cmake with “-DGMX_SIMD=AVX2_256” turned that off but did not resolve the failures.
Removing “-DGMX_GPU=CUDA” also did not fix the problem.
What did work was to turn off shared libraries with “-DBUILD_SHARED_LIBS=OFF”. i.e.:

works:

cmake … -DBUILD_SHARED_LIBS=OFF -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.2 >& make_1.log
make >& make_2.log
make check >& make_3.log

I’m still not quite clear why this is neccessary on one system only, but I thought that I would share the information in case anyone else is having trouble.
Please let me know if you’d like me to do any more tests. I can upload the logfiles if anyone is interested in exploring further.

Best Wishes

gvigers

Hello, we got a report that there are issues with the compilation on Ubuntu with CUDA due to a fix that was supposed to resolve a different issue.

I’ll see that I update the information there with your observations, so we can fix this properly this time :)

Cheers

Paul

gvigers
May 1

GROMACS version: 2022.1
GROMACS modification: No

Hi Folks

I ran into an interesting problem compiling Gromacs 2022.1

I have 2 nearly identical computers. Both have:
Nvidia 2080Ti GPU
Ubuntu 20.04
gcc version 9.4.0
cuda-11.2

system A has Intel i7-9700K CPU
system B has Intel i9-9820X CPU

Compiling Gromacs as follows:
cmake … -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.2 >& make_1.log
make >& make_2.log
make check >& make_3.log

Both systems compiled Gromacs 2022 fine, and system A compiled 2022.1. However system B gave multiple errors including:

15/88 Test #15: GmxlibTests …***Failed 0.01 sec
/home/programs/gromacs/gromacs-2022.1/build/bin/nonbonded-fep-test: symbol lookup error: /home/programs/gromacs/gromacs-2022.1/build/bin/nonbonded-fep-test: undefined symbol: Z25gmx_nb_free_energy_kernelRK8t_nblistRKN3gmx19ArrayRefWithPaddingIKNS2_11BasicVectorIfEEEEbiffRK19interaction_const_tNS2_8ArrayRefIS6_EENSD_IKfEESG_SG_SG_NSD_IKiEESI_iSG_P6t_nrnbNS3_IS5_EEPA3_fNSD_IfEESO_SO

30/88 Test #30: MathUnitTests …***Failed 0.01 sec
/home/programs/gromacs/gromacs-2022.1/build/bin/math-test: symbol lookup error: /home/programs/gromacs/gromacs-2022.1/build/bin/math-test: undefined symbol: _ZNK3gmx20AffineTransformation8gradientEv

…etc

and

The following tests FAILED:
1 - GmxapiExternalInterfaceTests (Failed)
15 - GmxlibTests (Failed)
30 - MathUnitTests (Failed)
48 - GmxPreprocessTests (Failed)
62 - MdrunModulesTests (Failed)

The only difference in compiler flags I saw is that system B adds “–enable-avx512” when building FFTW3. However, running cmake with “-DGMX_SIMD=AVX2_256” turned that off but did not resolve the failures.
Removing “-DGMX_GPU=CUDA” also did not fix the problem.
What did work was to turn off shared libraries with “-DBUILD_SHARED_LIBS=OFF”. i.e.:

works:

cmake … -DBUILD_SHARED_LIBS=OFF -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.2 >& make_1.log
make >& make_2.log
make check >& make_3.log

I’m still not quite clear why this is neccessary on one system only, but I thought that I would share the information in case anyone else is having trouble.
Please let me know if you’d like me to do any more tests. I can upload the logfiles if anyone is interested in exploring further.

Best Wishes

gvigers

Great! Please let me know if you want me to do additional tests / submit log files / move this to the developers forum or anything else.

Thank you for the great program!

Guy