# Install CPU only GROMACS 2018 with no GPU whatsoever?

**URL:** <https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898>\
**Category:** User discussions\
**Tags:** installation-error\
**Created:** [March 25, 2022, 6:18pm UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898 "2022-03-25T18:18:30Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Braden42](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@Braden42](https://gromacs.bioexcel.eu/u/Braden42)\
**Post date:** [March 25, 2022, 6:18pm UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898/1 "2022-03-25T18:18:30Z")

</div>

GROMACS version: 2018  
GROMACS modification: No

I would like to install an old version of GROMACS, I don’t particularly care as long as it is before 2020, but, can’t get any to install. I have tried 2016, 2018 to no avail. The issue always comes down to GPU’s.

Can I just install a CPU only version of GROMACS? I never use GPU’s ever, so it is a little frustrating to constantly run into an install wall due do GPU’s. There must be an option when using `cmake ..` to tell it no GPU whatsoever…

I am slowly going insane from seeing

```nohighlight
  NVCC/C compiler combination does not seem to be supported. CUDA frequently
  does not support the latest versions of the host compiler, so you might
  want to try an earlier C/C++ compiler version and make sure your CUDA
  compiler and driver are as recent as possible.
Call Stack (most recent call first):
  CMakeLists.txt:582 (gmx_gpu_setup)

```

and other gpu related issues

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [March 25, 2022, 6:31pm UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898/2 "2022-03-25T18:31:52Z")

</div>

In old versions, use `-DGMX_GPU=OFF` to disable anything related to GPU detection/utilization. Defaulting to `cmake ..` lacks a lot of control over important options.

---

<div class="post-metadata">

**Author:** ![Braden42](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@Braden42](https://gromacs.bioexcel.eu/u/Braden42)\
**Post date:** [March 25, 2022, 6:36pm UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898/3 "2022-03-25T18:36:13Z")

</div>

Thanks!

I also just found that `yum install gromacs` installs gromacs 2018.8 which also gets me out of a bind (alchemical decoupling in 2020 on has a PBC bug :( )

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [March 25, 2022, 6:47pm UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898/4 "2022-03-25T18:47:48Z")

</div>

Note that package manager versions of GROMACS are not optimized for your hardware and you will almost certainly be sacrificing a lot of performance. Installing from source is always best.

---

<div class="post-metadata">

**Author:** ![Braden42](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@Braden42](https://gromacs.bioexcel.eu/u/Braden42)\
**Post date:** [March 25, 2022, 6:55pm UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898/5 "2022-03-25T18:55:26Z")

</div>

yep. I was able to install 2018 with GPU off, so it should be fairly fast

---

<div class="post-metadata">

**Author:** ![Braden42](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@Braden42](https://gromacs.bioexcel.eu/u/Braden42)\
**Post date:** [March 26, 2022, 12:31am UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898/6 "2022-03-26T00:31:11Z")

</div>

It turns out the package manager version is for GPU and so I can’t use it. That said, I installed both 2016.4 and 2018 successfully, turning GPU off, however, both installs give me this when I run it

```auto
WARNING: Using the slow plain C kernels. This should
not happen during routine usage on supported platforms.

```

And both run at 25% the speed of the “correctly” installed 2021.3 version I also installed myself some months ago.

I installed 2016.4 using

`cmake .. -DGMX_MPI=OFF -DGMX_GPU=OFF -DCMAKE_INSTALL_PREFIX=/apps/gromacs-2016.4 -DGMX_BUILD_OWN_FFTW=ON `  
and 2018 using  
`cmake .. -DGMX_GPU=OFF -DCMAKE_INSTALL_PREFIX=/apps/gromacs-2018 -DGMX_BUILD_OWN_FFTW=ON `  
I have installed gromacs many times on my personal Ubuntu computers, and Compute Canada, and never had the slow plain C kernel warning before :( it is unbearably slow as well.

(With some homework, I see that this means it has not automatically done my SIMD selection for me)

Any suggestions?

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [March 26, 2022, 12:44am UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898/7 "2022-03-26T00:44:02Z")

</div>

Under normal circumstances, `cmake` should correctly detect the appropriate SIMD instructions for your hardware. The output of configuration would be useful here to see what it found and didn’t find. You can manually set the appropriate SIMD instructions with the `-DGMX_SIMD` option, but it’s really bizarre that this would be necessary, so something strange is going on.

---

<div class="post-metadata">

**Author:** ![Braden42](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@Braden42](https://gromacs.bioexcel.eu/u/Braden42)\
**Post date:** [March 26, 2022, 12:58am UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898/8 "2022-03-26T00:58:43Z")

</div>

When I run GROMACS it mentions both that it is using the slow plain C kernel, and also that I should be using `SIMD=AVX2_128`, and I do have that. I have tried setting `DGMX_SIMD=AVX2_128` and got an error message, I then also tried DGMX\_SIMD=auto. I also tried `-DGMX_USE_RDTSCP=ON`. setting SIMD to auto, and using `RDTSCP=ON` led to an install with `SIMD=none`, and using plain C kernel.

`gmx --version` spits out

```auto
GROMACS: gmx, version 2018
Executable: /apps/gromacs-2018/bin/gmx
Data prefix: /apps/gromacs-2018
Working dir: /home/bkelly/test_gromacs
Command line:
  gmx --version

GROMACS version: 2018
Precision: single
Memory model: 64 bit
MPI library: thread_mpi
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 64)
GPU support: disabled
SIMD instructions: NONE
FFT library: fftw-3.3.5
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: disabled
Tracing support: disabled
Built on: 2022-03-26 00:46:35
Built by: bkelly@c110370 [CMAKE]
Build OS/arch: Linux 3.10.0-1160.36.2.el7.x86_64 x86_64
Build CPU vendor: Unknown
Build CPU brand: Unknown
Build CPU family: 0 Model: 0 Stepping: 0
Build CPU features: Unknown
C compiler: /home/bkelly/psi4conda/bin/x86_64-conda-linux-gnu-cc GNU 9.3.0
C compiler flags: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bkelly/psi4conda/include -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast
C++ compiler: /home/bkelly/psi4conda/bin/x86_64-conda-linux-gnu-c++ GNU 9.3.0
C++ compiler flags: -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bkelly/psi4conda/include -std=c++11 -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast

```

which is alot messier than the 2021.3 version I have which is

```auto
GROMACS: gmx, version 2021.3
Executable: /usr/local/gromacs/bin/gmx
Data prefix: /usr/local/gromacs
Working dir: /home/bkelly/test_gromacs
Command line:
  gmx --version

GROMACS version: 2021.3
Verified release checksum is c5bf577cc74de0e05106b7b6426476abb7f6530be7b4a2c64f637d6a6eca8fcb
Precision: mixed
Memory model: 64 bit
MPI library: thread_mpi
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 64)
GPU support: disabled
SIMD instructions: AVX2_256
FFT library: fftw-3.3.8-sse2-avx-avx2-avx2_128
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: disabled
Tracing support: disabled
C compiler: /opt/rh/devtoolset-9/root/usr/bin/cc GNU 9.3.1
C compiler flags: -mavx2 -mfma -Wno-missing-field-initializers -fexcess-precision=fast -funroll-all-loops -O3 -DNDEBUG
C++ compiler: /opt/rh/devtoolset-9/root/usr/bin/c++ GNU 9.3.1
C++ compiler flags: -mavx2 -mfma -Wno-missing-field-initializers -fexcess-precision=fast -funroll-all-loops -fopenmp -O3 -DNDEBUG

```

I wonder if it is because these versions(2016.4 and 2018) are installing using the C compiler in psiconda, which was created when I installed `PSI4`. I may need to fix my paths :S

ALso note the FFTW versions… I think the FFTW library is a different, less sophisticated one that was installed with PSI4?

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [March 26, 2022, 1:25am UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898/9 "2022-03-26T01:25:31Z")

</div>

> [@Braden42](#):
>
> I wonder if it is because these versions(2016.4 and 2018) are installing using the C compiler in psiconda, which was created when I installed `PSI4` . I may need to fix my paths :S

Yes, get out of that psiconda environment. That build is a mess.

---

<div class="post-metadata">

**Author:** ![Braden42](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@Braden42](https://gromacs.bioexcel.eu/u/Braden42)\
**Post date:** [March 28, 2022, 2:14pm UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898/10 "2022-03-28T14:14:08Z")

</div>

I am at a bit of a loss on that part since I thought by specifying the compiler location, it would boycott psi4conda, but that doesn’t seem to be the case… I am using

```auto
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DGMX_GPU=OFF -DCMAKE_INSTALL_PREFIX=/apps/ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/cc -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++

```

but during `make` I can see it still going through psi4conda for compiler info… for example, a small piece (note, the install is 2022, but it is the same for other versions)

```auto
libtool: compile: /home/bkelly/psi4conda/bin/x86_64-conda-linux-gnu-cc -DHAVE_CONFIG_H -I. -I/apps/gromacs-2022/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2 -I../../.. -I /apps/gromacs-2022/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bkelly/psi4conda/include -march=core-avx2 -mfma -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bkelly/psi4conda/include -MT n1fv_2.lo -MD -MP -MF .deps/n1fv_2.Tpo -c /apps/gromacs-2022/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2/n1fv_2.c -fPIC -DPIC -o n1fv_2.o
libtool: compile: /home/bkelly/psi4conda/bin/x86_64-conda-linux-gnu-cc -DHAVE_CONFIG_H -I. -I/apps/gromacs-2022/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2 -I../../.. -I /apps/gromacs-2022/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bkelly/psi4conda/include -march=core-avx2 -mfma -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bkelly/psi4conda/include -MT n1fv_3.lo -MD -MP -MF .deps/n1fv_3.Tpo -c /apps/gromacs-2022/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2/n1fv_3.c -fPIC -DPIC -o n1fv_3.o
libtool: compile: /home/bkelly/psi4conda/bin/x86_64-conda-linux-gnu-cc -DHAVE_CONFIG_H -I. -I/apps/gromacs-2022/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2 -I../../.. -I /apps/gromacs-2022/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bkelly/psi4conda/include -march=core-avx2 -mfma -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bkelly/psi4conda/include -MT n1fv_7.lo -MD -MP -MF .deps/n1fv_7.Tpo -c /apps/gromacs-2022/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2/n1fv_7.c -fPIC -DPIC -o n1fv_7.o
libtool: compile: /home/bkelly/psi4conda/bin/x86_64-conda-linux-gnu-cc -DHAVE_CONFIG_H -I. -I/apps/gromacs-2022/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2 -I../../.. -I /apps/gromacs-2022/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bkelly/psi4conda/include -march=core-avx2 -mfma -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bkelly/psi4conda/include -MT n1fv_4.lo -MD -MP -MF .deps/n1fv_4.Tpo -c /apps/gromacs-2022/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2/n1fv_4.c -fPIC -DPIC -o n1fv_4.o

```

I can also see it is grabbing `BLAS` and `LAPACK` from psi4conda

```auto
 Found BLAS: /home/bkelly/psi4conda/lib/libmkl_intel_lp64.so;/home/bkelly/psi4conda/lib/libmkl_intel_thread.so;/home/bkelly/psi4conda/lib/libmkl_core.so;/home/bkelly/psi4conda/lib/libiomp5.so;-lpthread;-lm;-ldl
-- Looking for cheev_
-- Looking for cheev_ - found
-- Found LAPACK: /home/bkelly/psi4conda/lib/libmkl_intel_lp64.so;/home/bkelly/psi4conda/lib/libmkl_intel_thread.so;/home/bkelly/psi4conda/lib/libmkl_core.so;/home/bkelly/psi4conda/lib/libiomp5.so;-lpthread;-lm;-ldl;-lpthread;-lm;-ldl

```

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [March 28, 2022, 2:28pm UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898/11 "2022-03-28T14:28:20Z")

</div>

You need to completely deactivate the environment. As I recall, Psi4 inserts itself into your startup scripts and automatically sets PATH information. You need to disable that. I have had similar problems compiling other software so I have had to disable this environment entirely to make them work.

---

<div class="post-metadata">

**Author:** ![Braden42](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@Braden42](https://gromacs.bioexcel.eu/u/Braden42)\
**Post date:** [March 28, 2022, 4:20pm UTC](https://gromacs.bioexcel.eu/t/install-cpu-only-gromacs-2018-with-no-gpu-whatsoever/3898/12 "2022-03-28T16:20:38Z")

</div>

I think I have it all sorted, and have `gromacs-2018.6` running.

In the `.bashrc` I had to

```auto
#. $HOME/psi4conda/etc/profile.d/conda.sh
#conda activate
#. $HOME/psi4conda/etc/profile.d/conda.sh
#conda activate

```

then to compile, I did have to manually specify the SIMD… If I did not, it was None, this was odd, but, at least using the following, it worked

```auto
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DGMX_GPU=OFF -DCMAKE_INSTALL_PREFIX=/apps/gromacs-2018.6 -DGMX_SIMD=AVX2_256

```

so now I have

```auto
GROMACS: gmx, version 2018.6
Executable: /apps/gromacs-2018.6/bin/gmx
Data prefix: /apps/gromacs-2018.6
Working dir: /apps/gromacs-2018.6/build
Command line:
  gmx --version

GROMACS version: 2018.6
Precision: single
Memory model: 64 bit
MPI library: thread_mpi
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 64)
GPU support: disabled
SIMD instructions: AVX2_256
FFT library: fftw-3.3.8-sse2-avx-avx2-avx2_128-avx512
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: disabled
Tracing support: disabled
Built on: 2022-03-28 16:03:30
Built by: bkelly@c110370 [CMAKE]
Build OS/arch: Linux 3.10.0-1160.36.2.el7.x86_64 x86_64
Build CPU vendor: Unknown
Build CPU brand: Unknown
Build CPU family: 0 Model: 0 Stepping: 0
Build CPU features: Unknown
C compiler: /opt/rh/devtoolset-9/root/usr/bin/cc GNU 9.3.1
C compiler flags: -march=core-avx2 -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast
C++ compiler: /opt/rh/devtoolset-9/root/usr/bin/c++ GNU 9.3.1
C++ compiler flags: -march=core-avx2 -std=c++11 -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast

```

Thanks for the help!
