Package Details: gromacs 2019.4-2

Git Clone URL: (read-only, click to copy)
Package Base: gromacs
Description: A versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.
Upstream URL:
Licenses: LGPL
Submitter: xyproto
Maintainer: hseara
Last Packager: hseara
Votes: 20
Popularity: 0.30
First Submitted: 2011-12-14 17:03
Last Updated: 2019-10-15 15:51

Dependencies (12)

Required by (1)

Sources (1)

Latest Comments

1 2 3 4 5 6 ... Next › Last »

hseara commented on 2019-12-13 11:47

@brisvag Please recompile gromacs. hwloc has been updated from v1 to v2 which brakes gromacs installation. Recompiling gromacs solves the issue.

brisvag commented on 2019-12-10 14:09

When I try to use gmx dump on a .tpr, I get the following error:

gmx: error while loading shared libraries: cannot open shared object file: No such file or directory

Indeed, the library is missing. Simply adding a symlink to adding .5 at the end solves the issue. Shouldn't this be handled by the installation?

E3LDDfrK commented on 2019-10-24 17:05

EDIT 3: A solution here:

I have the same error as @mefistofeles.

EDIT 2: And @malinke too. It's partly because my CPU doesn't support AVX2, I think. There's a double "-march=core-avx2 -march=native" when compiling fftw. It fails because my "-march=native" doesn't actually support AVX2.

#error "compiling simd-avx2.h without avx2 support"

I've also changed my /etc/makepkg.conf as @hseara suggested.

It's a Thinkpad X220 with Sandy Bridge, so I used -DGMX_SIMD=AVX_256 on my PKGBUILD. At least in my case, computer doesn't support avx2, so it failed to compile fftw. Not sure what to do here, it seems fftw is automatically compiled with "--enable-avx2". I'll try again later without DGMX_BUILD_OWN_FFTW=ON on the PKGBUILD.

EDIT 1: So it builds successfully when I replaced DGMX_BUILD_OWN_FFTW=ON with -DGMX_FFT_LIBRARY=fftw3 on the PKGBUILD. Not sure if using pacman-installed fftw with GROMACS will lead to problems later on.

For what it's worth, like @mefistofeles, I also tried to manually build the package using cmake and DGMX_BUILD_OWN_FFTW=ON, and it worked. I wonder what the problem is. From what I can tell, gromacs-2019.4/src/external/build-fftw/CMakeLists.txt says it will build fftw with only either just "--enable-sse2" or the whole "--enable-sse2;--enable-avx;--enable-avx2". The "--enable-avx" always comes with "--enable-avx2". But it worked this time, despite my CPU not supporting AVX 2. When running cmake, it also outputted:

The GROMACS-managed build of FFTW 3 will configure with the following optimizations: --enable-sse2;--enable-avx;--enable-avx2;--enable-avx512

Just for comparison. This line from manual install succeeds:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/home/user/download/gromacs-2019.4/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2 -I../../.. -I /home/user/download/gromacs-2019.4/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild -march=core-avx2 -mfma -O3 -fomit-frame-pointer -mtune=native -malign-double -fstrict-aliasing -fno-schedule-insns -MT n1fv_2.lo -MD -MP -MF .deps/n1fv_2.Tpo -c /home/user/download/gromacs-2019.4/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2/n1fv_2.c  -fPIC -DPIC -o n1fv_2.o

This line from aur using pikaur fails:

libtool: compile:  gcc-8 -DHAVE_CONFIG_H -I. -I/home/user/.cache/pikaur/build/gromacs/src/double/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2 -I../../.. -I /home/user/.cache/pikaur/build/gromacs/src/double/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild -D_FORTIFY_SOURCE=2 -march=core-avx2 -mfma -march=native -O2 -pipe -fno-plt -MT n1fv_2.lo -MD -MP -MF .deps/n1fv_2.Tpo -c /home/user/.cache/pikaur/build/gromacs/src/double/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2/n1fv_2.c  -fPIC -DPIC -o n1fv_2.o

So possibly the double "-march" thing makes it fail? Just "-march=core-avx2" vs "-march=core-avx2 -march=native". Because my Sandy Bridge ("-march=native" part) doesn't actually support AVX2.

hseara commented on 2019-06-13 14:46

@mefistofeles, either your cpu does not support AVX2 (check in /proc/cpuinfo) or your /etc/makepkg.conf is not set to native architecture:

CFLAGS="-march=native -O2 -pipe -fno-plt"

PS: -fstack-protector-strong in makepkg.conf is not needed

mefistofeles commented on 2019-05-21 20:42

For some reason using the following PKGBUILD fails compiling, check

The error is in

Specifically the part that says error: #error "compiling simd-avx2.h without avx2 support" when compiling FFTW.

The funny thing is that when I manually compile using "cmake .. -DGMX_GPU=ON -DGMX_SIMD=AVX2_256 -DGMX_BUILD_OWN_FFTW=ON" it works fine. Don't really know what is causing the error. Help appreciated.

BTW, using the -fstack-protector-strong in makepkg.conf didn't work. as suggested by @hseara

hseara commented on 2019-04-15 20:13

No longer needed in gromacs 2019.4

Installation notes

With cmake update to v3.14.x, gromacs is no longer capable of identifying correctly the CPU and therefore the appropriated SIMD level for compilation. If you want to compile gromacs with SIMD while the problem is not solved add the following option to PKGBUILD:

-DGMX_SIMD={AVX_128_FMA, AVX_256, AVX2_256, AVX2_128, AVX_512}

The KEYWORD depends on the SIMD support provided by your CPU.

Usage notes
source /etc/profile.d/GMXRC.bash

roina commented on 2017-12-17 12:35

hseara, the current (2016.4 released September 15, 2017) doesn't works with CUDA in old systems. But new gromacs (2018-beta2 released December 12 2017) works perfectly with current PKGBUILD (gromacs 2016.4-2) and CUDA 9.1. So don't wait and update the version.

hseara commented on 2017-12-04 15:30

The current PKGBUILD works perfectly in new systems.

@manlinke: I have the feeling that at least part of your problem is Cuda related. You seem to have an "NVIDIA GeForce GTX 550 Ti" which is no longer supported by Cuda 9. That means that your code will compile well, but tests will fail. The only possible workaround which I'm using on an old system myself is to use Cuda 8 in your system instead of Cuda 9. It is not possible for me to deal with this issue as it is graphics card dependent. You can always disable CUDA "-DGMX_GPU=OFF".

@manlike: The following lines overriding the /etc/makepkg.conf defaults should take care of the avx2 issues:

export CFLAGS="-march=native -O2 -pipe -fstack-protector-strong"


Once you fix the Cuda issues, please check again if you have really avx2 issues.

mefistofeles commented on 2017-12-03 22:53

@malinke I was also getting avx2 errors. Specifically this: error: #error "compiling simd-avx2.h without avx2 support", which some guys at #archlinux think it's an error from upstream. The complete error output is at: (it may have a short lifetime, sorry)

There one can see that the problem is building the fftw, so I tried removing the -DGMX_BUILD_OWN_FFTW=ON \ lines in the PKGBUILD (lines 51 and 62) and got better results but still errors on testing it. The output I'm getting doing what I said is here:

BTW, when compiling directly the source code by using cmake and make it builds, with not special options, just as it's shown in: in the "Configuring with default settings" section. Hope this helps to give ideas on how to make gromacs build using this PKGBUILD/AUR?

hseara commented on 2017-10-01 11:00

@malink "(I didn't care if I had a avx build or not)"

You should care. mdrun will be 2x to 4x faster if compiled with avx (depending on the version) activated.

My fix will activate the highest level of avx by default. My fix will allow also CUDA support if available. This is why we need gcc5. CUDA 9 does not seem to solve this issue.

In any case, thanks for your comment as the fix simplifies the installation.