# Problem compiling Gromacs 2022.1 \[Solved\]

**URL:** <https://gromacs.bioexcel.eu/t/problem-compiling-gromacs-2022-1-solved/4100>\
**Category:** User discussions\
**Tags:** installation-error\
**Created:** [May 1, 2022, 2:56pm UTC](https://gromacs.bioexcel.eu/t/problem-compiling-gromacs-2022-1-solved/4100 "2022-05-01T14:56:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gvigers](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@gvigers](https://gromacs.bioexcel.eu/u/gvigers)\
**Post date:** [May 1, 2022, 2:56pm UTC](https://gromacs.bioexcel.eu/t/problem-compiling-gromacs-2022-1-solved/4100/1 "2022-05-01T14:56:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pbauer](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pbauer/32/13_2.png) [@pbauer](https://gromacs.bioexcel.eu/u/pbauer)\
**Post date:** [May 2, 2022, 4:50am UTC](https://gromacs.bioexcel.eu/t/problem-compiling-gromacs-2022-1-solved/4100/2 "2022-05-02T04:50:11Z")

</div>

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

> ![](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/6/65c4b25692666a2547bd181557bc3ea9aa226f67.png "gvigers") | [gvigers](https://gromacs.bioexcel.eu/u/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

---

<div class="post-metadata">

**Author:** ![gvigers](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@gvigers](https://gromacs.bioexcel.eu/u/gvigers)\
**Post date:** [May 2, 2022, 1:43pm UTC](https://gromacs.bioexcel.eu/t/problem-compiling-gromacs-2022-1-solved/4100/3 "2022-05-02T13:43:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sanjiv](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/sanjiv/32/1122_2.png) [@sanjiv](https://gromacs.bioexcel.eu/u/sanjiv)\
**Post date:** [May 23, 2022, 5:28pm UTC](https://gromacs.bioexcel.eu/t/problem-compiling-gromacs-2022-1-solved/4100/4 "2022-05-23T17:28:00Z")

</div>

> [@pbauer](#):
>
> -DBUILD\_SHARED\_LIBS=OFF

I faced the similar issue, with four tests failing, but resolved as suggested by @gvigers @pbauer . Though was concerned if it might have some performance issues.

System configuration:  
Ubuntu 20.04  
gcc version: gcc-11  
cuda version: cuda-11.7
