Installation of gromacs-2021.1-qmmm

Hello everyone,
I am Sudarshan Behera, a graduate student, trying to install gromacs-2021.1-qmmm (Files · 2021.1-qmmm · Dmitry Morozov / CP2KInterface · GitLab) for quite a long time now. I could install it but whenever I run “grompp” module I get the following error (I provide proper path to the gromacs executable).

"Unknown left-hand ‘qmmm-active’ in parameter file"

Below are the steps I’ve followed to install it. Please have a look if there are any mistakes.

(I) CP2K installation:
(a) ./install_cp2k_toolchain.sh --enable-cuda=no --with-sirius=no --with-openblas=install
(b) cp /pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/arch/* /pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/arch
source /pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/setup
cd /pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/
make -j 24 ARCH=local VERSION=“psmp” libcp2k

     After this I get a "libcp2k.a" file in the /pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/lib/local/psmp/ directory.

(II) Gromacs Installation:
(a) downloaded gromacs from Files · 2021.1-qmmm · Dmitry Morozov / CP2KInterface · GitLab
(b) cd /pfs/home/bala/Sudarshan/softwares/gromacs/
mkdir build
cd build
(c) /pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/cmake-3.18.5/bin/cmake … -DGMX_INSTALL_NBLIB_API=OFF -DBUILD_SHARED_LIBS=OFF -DGMXAPI=OFF -DGMX_DOUBLE=ON -DGMX_FFT_LIBRARY=fftw3 -DCMAKE_CXX_FLAGS="-I/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/src/start" -DGMX_BLAS_USER="/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/lib/libopenblas.a" -DGMX_LAPACK_USER="/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/lib/libopenblas.a" -DCMAKE_CXX_STANDARD_LIBRARIES=" -Wl,–allow-multiple-definition -pthread -L/pfs/softwares/admin/sw/target/prl/openmpi/openmpi-2.1.2_gcc-7.2.0/lib -L/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/lib -L/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/fftw-3.3.8/lib -L/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/lib -L/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libxc-4.3.4/lib -L/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libxsmm-1.16.1/lib -L/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/scalapack-2.1.0/lib -L/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/lib/local/psmp/exts/dbcsr -L/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/lib/local/psmp -L/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/elpa-2020.05.001/lib -L/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/spglib-1.16.0/lib -L/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/cosma-2.2.0/lib -L/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libvori-201229/lib -lcp2k -ldbcsr -lsymspg -lelpa_openmp -lcosma_pxgemm -lcosma -lgrid2grid -lscalapack -lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lint2 -lfftw3_mpi -lfftw3 -lfftw3_omp -lmpi -lopenblas -lvori -lstdc++ -lstdc++ -lgfortran" -DGMX_MPI=on -DCMAKE_INSTALL_PREFIX=/pfs/home/bala/Sudarshan/softwares/gromacs/
(d) make -j 24
make install -j 24

Then I find a “gmx_mpi_d” executable in the /pfs/home/bala/Sudarshan/softwares/gromacs/bin/ directory which I guessed would have QMMM capabilities. I execute the following command
/pfs/home/bala/Sudarshan/softwares/gromacs/bin/gmx_mpi_d grompp -f em-qmmm2.mdp -c …/EM/em.gro -p …/topol.top -n …/QM.ndx -o em-qmmm2.tpr
and get the following warnings,
WARNING 1 [file em-qmmm2.mdp, line 27]:
Unknown left-hand ‘qmmm-active’ in parameter file
WARNING 2 [file em-qmmm2.mdp, line 27]:
Unknown left-hand ‘qmmm-qmgroup’ in parameter file
WARNING 3 [file em-qmmm2.mdp, line 27]:
Unknown left-hand ‘qmmm-qmmethod’ in parameter file
WARNING 4 [file em-qmmm2.mdp, line 27]:
Unknown left-hand ‘qmmm-qmcharge’ in parameter file
WARNING 5 [file em-qmmm2.mdp, line 27]:
Unknown left-hand ‘qmmm-qmmultiplicity’ in parameter file

   which I think are because of incapabilities of the gmx_mpi_d executable to read QMMM specific CP2K parameters (keywords). 

Please help me to find out if there are any mistakes while installing the packages or anywhere else. I am also pasting the content the cp2k arch file named “local.psmp” below for reference.

Content of /pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/arch/local.psmp:

CC = /pfs/softwares/admin/sw/target/cmpl/gcc/gcc-7.2.0/bin/gcc
CXX = /pfs/softwares/admin/sw/target/cmpl/gcc/gcc-7.2.0/bin/g++
AR = ar -r
FC = mpif90
LD = mpif90

DFLAGS = -D__LIBXSMM -D__parallel -D__FFTW3 -D__LIBINT -D__LIBXC -D__SCALAPACK -D__COSMA -D__ELPA -D__SPGLIB -D__LIBVORI

WFLAGS = -Werror=aliasing -Werror=ampersand -Werror=c-binding-type -Werror=intrinsic-shadow -Werror=intrinsics-std -Werror=line-truncation -Werror=tabs -Werror=target-lifetime -Werror=underflow -Werror=unused-but-set-variable -Werror=unused-variable -Werror=unused-dummy-argument -Werror=conversion -Werror=zerotrip -Wno-maybe-uninitialized -Wuninitialized -Wuse-without-only

FCDEBFLAGS = -fbacktrace -ffree-form -fimplicit-none -std=f2008
CFLAGS = -march=native -mtune=native -fno-omit-frame-pointer -g -O3 -funroll-loops $(PROFOPT) -fopenmp -I/pfs/softwares/admin/sw/target/prl/openmpi/openmpi-2.1.2_gcc-7.2.0/include -pthread -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/include’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/fftw-3.3.8/include’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/include’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libxc-4.3.4/include’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libxsmm-1.16.1/include’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/cosma-2.2.0/include’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/elpa-2020.05.001/include/elpa_openmp-2020.05.001/modules’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/elpa-2020.05.001/include/elpa_openmp-2020.05.001/elpa’ -I/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/spglib-1.16.0/include -std=c99 -Wall -Wextra -Werror $(DFLAGS)
FCFLAGS = -march=native -mtune=native -fno-omit-frame-pointer -g -O3 -funroll-loops $(PROFOPT) -fopenmp -I/pfs/softwares/admin/sw/target/prl/openmpi/openmpi-2.1.2_gcc-7.2.0/include -pthread -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/include’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/fftw-3.3.8/include’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/include’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libxc-4.3.4/include’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libxsmm-1.16.1/include’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/cosma-2.2.0/include’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/elpa-2020.05.001/include/elpa_openmp-2020.05.001/modules’ -I’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/elpa-2020.05.001/include/elpa_openmp-2020.05.001/elpa’ -I/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/spglib-1.16.0/include $(FCDEBFLAGS) $(WFLAGS) $(DFLAGS)

LDFLAGS = $(FCFLAGS) -Wl,–enable-new-dtags -pthread -L/usr/lib64 -Wl,-rpath -Wl,/usr/lib64 -Wl,-rpath -Wl,/pfs/softwares/admin/sw/target/prl/openmpi/openmpi-2.1.2_gcc-7.2.0/lib -Wl,–enable-new-dtags -L/pfs/softwares/admin/sw/target/prl/openmpi/openmpi-2.1.2_gcc-7.2.0/lib -L’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/lib’ -Wl,-rpath=’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/lib’ -L’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/fftw-3.3.8/lib’ -Wl,-rpath=’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/fftw-3.3.8/lib’ -L’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/lib’ -L’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libxc-4.3.4/lib’ -Wl,-rpath=’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libxc-4.3.4/lib’ -L’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libxsmm-1.16.1/lib’ -Wl,-rpath=’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libxsmm-1.16.1/lib’ -L’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/scalapack-2.1.0/lib’ -Wl,-rpath=’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/scalapack-2.1.0/lib’ -L’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/cosma-2.2.0/lib’ -Wl,-rpath=’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/cosma-2.2.0/lib’ -L’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/elpa-2020.05.001/lib’ -Wl,-rpath=’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/elpa-2020.05.001/lib’ -L’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/spglib-1.16.0/lib’ -Wl,-rpath=’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/spglib-1.16.0/lib’ -L’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libvori-201229/lib’ -Wl,-rpath=’/pfs/home/bala/Sudarshan/softwares/cp2k/cp2k-8.1/tools/toolchain/install/libvori-201229/lib’
LIBS = -lsymspg -lelpa_openmp -lcosma_pxgemm -lcosma -lgrid2grid -lscalapack -lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lint2 -lfftw3_mpi -lfftw3 -lfftw3_omp -lmpi -lopenblas -lvori -lstdc++ -lstdc++

FYPPFLAGS = -n --line-marker-format=gfortran5

Waiting for a reply.
Thank you.


Sudarshan Behera
Graduate Student
Molecular Simulation Laboratory
JNCASR, Bengaluru, India-560064

Could you please also copy the whole output of the grompp?

Could you also try to use grompp with the following gmx_mpi_d:
/pfs/home/bala/Sudarshan/softwares/gromacs/build/bin/gmx_mpi_d

Just in case it is very bad idea to have build, source and installation directories in one place, i.e.
/pfs/home/bala/Sudarshan/softwares/gromacs/

Usually it is good to keep them all in separate places, for example:
installation directory is the same: /pfs/home/bala/Sudarshan/softwares/gromacs/
source directory: /pfs/home/bala/Sudarshan/source/gromacs/
and build directory: /pfs/home/bala/Sudarshan/build/gromacs/

Dear Dr. Dmitry,
Thank you for your reply.

As you suggested, I kept the build, source and installation directories in separate places while installation gromacs-2021.1-qmmm again. But I got the same error. I am pasting here the entire output of “grompp”:

:slight_smile: GROMACS - gmx grompp, 2021-dev-20200909-bc85c60-unknown (double precision) (-:

                        GROMACS is written by:
 Emile Apol      Rossen Apostolov      Paul Bauer     Herman J.C. Berendsen
Par Bjelkmar      Christian Blau   Viacheslav Bolnykh     Kevin Boyd    

Aldert van Buuren Rudi van Drunen Anton Feenstra Alan Gray
Gerrit Groenhof Anca Hamuraru Vincent Hindriksen M. Eric Irrgang
Aleksei Iupinov Christoph Junghans Joe Jordan Dimitrios Karkoulis
Peter Kasson Jiri Kraus Carsten Kutzner Per Larsson
Justin A. Lemkul Viveca Lindahl Magnus Lundborg Erik Marklund
Pascal Merz Pieter Meulenhoff Teemu Murtola Szilard Pall
Sander Pronk Roland Schulz Michael Shirts Alexey Shvetsov
Alfons Sijbers Peter Tieleman Jon Vincent Teemu Virolainen
Christian Wennberg Maarten Wolf Artem Zhmurov
and the project leaders:
Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel

Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2019, The GROMACS development team at
Uppsala University, Stockholm University and
the Royal Institute of Technology, Sweden.
check out http://www.gromacs.org for more information.

GROMACS is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.

GROMACS: gmx grompp, version 2021-dev-20200909-bc85c60-unknown (double precision)
Executable: /pfs/home/bala/Sudarshan/build/gromacs/bin/gmx_mpi_d
Data prefix: /pfs/home/bala/Sudarshan/source/gromacs (source tree)
Working dir: /pfs/home/bala/Sudarshan/Projects/LipA_Mutant/WT/Qm-MM/EM_mallige_test
Command line:
gmx_mpi_d grompp -f em-qmmm2.mdp -c …/EM/em.gro -p …/topol.top -n …/QM.ndx -o em-qmmm2.tpr

WARNING 1 [file em-qmmm2.mdp, line 27]:
Unknown left-hand ‘qmmm-active’ in parameter file

WARNING 2 [file em-qmmm2.mdp, line 27]:
Unknown left-hand ‘qmmm-qmgroup’ in parameter file

WARNING 3 [file em-qmmm2.mdp, line 27]:
Unknown left-hand ‘qmmm-qmmethod’ in parameter file

WARNING 4 [file em-qmmm2.mdp, line 27]:
Unknown left-hand ‘qmmm-qmcharge’ in parameter file

WARNING 5 [file em-qmmm2.mdp, line 27]:
Unknown left-hand ‘qmmm-qmmultiplicity’ in parameter file

NOTE 1 [file em-qmmm2.mdp]:
You have set rlist larger than the interaction cut-off, but you also have
verlet-buffer-tolerance > 0. Will set rlist using verlet-buffer-tolerance.

Setting the LD random seed to -15550786

Generated 2211 of the 2211 non-bonded parameter combinations
Generating 1-4 interactions: fudge = 0.5

Generated 2211 of the 2211 1-4 parameter combinations

Excluding 3 bonded neighbours molecule type ‘Protein_chain_A’

Excluding 2 bonded neighbours molecule type ‘SOL’

Excluding 2 bonded neighbours molecule type ‘SOL’

Excluding 1 bonded neighbours molecule type ‘CL’
Number of degrees of freedom in T-Coupling group rest is 67626.00
Calculating fourier grid dimensions for X Y Z
Using a fourier grid of 60x60x60, spacing 0.115 0.115 0.115

Estimate for the relative computational load of the PME mesh part: 0.20

This run will generate roughly 751 Mb of data

There was 1 note

There were 5 warnings


Program: gmx grompp, version 2021-dev-20200909-bc85c60-unknown
Source file: src/gromacs/gmxpreprocess/grompp.cpp (line 2382)

Fatal error:
Too many warnings (5).
If you are sure all warnings are harmless, use the -maxwarn option.

For more information and tips for troubleshooting, please check the GROMACS
website at Errors - Gromacs


MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.

When I use “/pfs/home/bala/Sudarshan/softwares/gromacs/bin/gmx_mpi_d”, I get the same error.

I see the problem. You are compiling branch master instead of 2021.1-qmmm
Did you used git to download source?
If so then you forgot to switch branch to 2021.1-qmmm, from the INSTALL-dev:

If you want to clone whole repository, remember to checkout branch 2021.1-qmmm

this could be done with:
git checkout origin/2021.1-qmmm

Here is direct link to the branch if you want to download just 2021.1-qmmm:
https://gitlab.com/aracsmd/gromacs/-/archive/2021.1-qmmm/gromacs-2021.1-qmmm.tar.gz

Thank you for recongnizing the problem. I downloaded the gromacs-2021.1-qmm from the link you provided and installed. It is working fine now.

Thank you once again for helping me resolving the issue.

Goodnight. My name is Diullio and I am a doctoral student at the Federal University of Goias, Brazil.

I installed the same way, but using openmpi 4.0. When I try to run the tutorial, I get an error in the mdrun part. See below

ds@pop-os:~/tutorial/stilbene_vacuum$ gmx mdrun -npme 0 -s stilbene.tpr
Invalid MIT-MAGIC-COOKIE-1 key :slight_smile: GROMACS - gmx mdrun, 2021.2-dev-UNCHECKED (double precision) (-:

                        GROMACS is written by:
 Andrey Alekseenko              Emile Apol              Rossen Apostolov     
     Paul Bauer           Herman J.C. Berendsen           Par Bjelkmar       
   Christian Blau           Viacheslav Bolnykh             Kevin Boyd        
 Aldert van Buuren           Rudi van Drunen             Anton Feenstra      
Gilles Gouaillardet             Alan Gray               Gerrit Groenhof      
   Anca Hamuraru            Vincent Hindriksen          M. Eric Irrgang      
  Aleksei Iupinov           Christoph Junghans             Joe Jordan        
Dimitrios Karkoulis            Peter Kasson                Jiri Kraus        
  Carsten Kutzner              Per Larsson              Justin A. Lemkul     
   Viveca Lindahl            Magnus Lundborg             Erik Marklund       
    Pascal Merz             Pieter Meulenhoff            Teemu Murtola       
    Szilard Pall               Sander Pronk              Roland Schulz       
   Michael Shirts            Alexey Shvetsov             Alfons Sijbers      
   Peter Tieleman              Jon Vincent              Teemu Virolainen     
 Christian Wennberg            Maarten Wolf              Artem Zhmurov       
                       and the project leaders:
    Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel

Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2019, The GROMACS development team at
Uppsala University, Stockholm University and
the Royal Institute of Technology, Sweden.
check out http://www.gromacs.org for more information.

GROMACS is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.

GROMACS: gmx mdrun, version 2021.2-dev-UNCHECKED (double precision)
Executable: /home/ds/gromacs/bin/./gmx_mpi_d
Data prefix: /home/ds/gromacs
Working dir: /home/ds/tutorial/stilbene_vacuum
Command line:
gmx_mpi_d mdrun -npme 0 -s stilbene.tpr

Back Off! I just backed up md.log to ./#md.log.1#
Reading file stilbene.tpr, VERSION 2021.2-dev-UNCHECKED (double precision)
Using 1 MPI process
Using 4 OpenMP threads

Back Off! I just backed up pullx.xvg to ./#pullx.xvg.1#

Back Off! I just backed up pullf.xvg to ./#pullf.xvg.1#

Back Off! I just backed up traj_comp.xtc to ./#traj_comp.xtc.1#

Back Off! I just backed up traj.trr to ./#traj.trr.1#

Back Off! I just backed up ener.edr to ./#ener.edr.1#
starting mdrun ‘Protein’
10000 steps, 10.0 ps.
[pop-os:429753] *** An error occurred in MPI_Comm_rank
[pop-os:429753] *** reported by process [1792212993,0]
[pop-os:429753] *** on communicator MPI_COMM_WORLD
[pop-os:429753] *** MPI_ERR_COMM: invalid communicator
[pop-os:429753] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
[pop-os:429753] *** and potentially your MPI job)

Hello Diullio,

It looks like you are using the 2021.2-dev version of GROMACS, so you probably just need to do the same thing advised by dmorozov above to make sure you are using the 2021.1-qmmm version.

Perhaps you could try this?

I tried to install the file that dmorozov posted above. Then I tried the same way with the 2021.2-qmmm version available in his Git, but using the new flags with -DCP2K=ON and passing the libraries. Both ways gave the same mistake. When I test the cp2k alone using the mpi it works normal, but when I run the qmmm in the gromacs it gives this error.

Hi,

  1. could you copy here a full cmake configuration command?
  2. You are running now with MPI but using 1 MPI process, try to run with 2 MPI processes and 2 OpenMP threads for each.
  3. Is problem persist if you compile the 2022 beta version?
    https://manual.gromacs.org/documentation/2022-beta1/index.html
    (for 2022 beta Check installation and run instructions, as they have changed)

Hi,

Thanks for the answer.
Using 2 MPI Process and 2 OpenMP threads worked.

I installed version 2021.2-qmmm. Here’s the cmake below:

sudo /usr/local/cp2k-8.1/tools/toolchain/install/cmake-3.18.5/bin/./cmake … -DBUILD_SHARED_LIBS=OFF -DGMXAPI=OFF -DGMX_INSTALL_NBLIB_API=OFF -DGMX_DOUBLE=ON -DGMX_MPI=ON -DGMX_CP2K=ON -DFFTW_LIBRARY=’/usr/local/cp2k-8.1/tools/toolchain/install/fftw-3.3.8/lib/libfftw3.so’ -DFFTW_INCLUDE_DIR=’/usr/local/cp2k-8.1/tools/toolchain/install/fftw-3.3.8/include’ -DCP2K_DIR="/usr/local/cp2k-8.1/lib/local/psmp" -DCP2K_LIBS="-Wl,–enable-new-dtags -pthread -fopenmp -L/usr/lib/x86_64-linux-gnu/openmpi/lib -L’/usr/local/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/lib’ -L’/usr/local/cp2k-8.1/tools/toolchain/install/fftw-3.3.8/lib’ -L’/usr/local/cp2k-8.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/lib’ -L’/usr/local/cp2k-8.1/tools/toolchain/install/libxc-4.3.4/lib’ -L’/usr/local/cp2k-8.1/tools/toolchain/install/libxsmm-1.16.1/lib’ -L’/usr/local/cp2k-8.1/tools/toolchain/install/scalapack-2.1.0/lib’ -L’/usr/local/cp2k-8.1/tools/toolchain/install/cosma-2.2.0/lib’ -L’/usr/local/cp2k-8.1/tools/toolchain/install/elpa-2020.05.001/lib’ -L’/usr/local/cp2k-8.1/tools/toolchain/install/spglib-1.16.0/lib’ -L’/usr/local/cp2k-8.1/tools/toolchain/install/libvori-201229/lib’ -L/home/ds/cp2k-8.1/lib/local/psmp/exts/dbcsr -ldbcsr -lsymspg -lelpa_openmp -lcosma_pxgemm -lcosma -lgrid2grid -lscalapack -lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lint2 -lfftw3_mpi -lfftw3 -lfftw3_omp -lmpi_cxx -lmpi -lopenblas -lvori -lstdc++"

Then probably something is wrong with your OpenMPI, that prevents use of 1 MPI process.
I could suggest you for single-node usage to compile interface without MPI for that you need to:

  1. build “ssmp” version of CP2K (and libcp2k)
  2. Use -DGMX_MPI=OFF in GROMACS CMake command

Also, I don’t see in you command that Gromacs instructed to use OpenBLAS form /usr/local/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/lib which is used by CP2K. Use the following flags: -DGMX_EXTERNAL_BLAS=ON -DGMX_EXTERNAL_LAPACK=ON -DCMAKE_PREFIX_PATH=/usr/local/cp2k-8.1/tools/toolchain/install/openblas-0.3.10

P.S. Try also our current beta version which I linked above, as it has some differences with respect to 2021.2 version. Final release will be based on it and not on 2021.2.

I am trying to install gromacs-2021.1-qmmm. I have installed cp2k using following commands

Cp2k installation

./install_cp2k_toolchain.sh --enable-cuda=no --with-sirius=no --with-openblas=install --with-openmpi=install`

cp /home/faizan/Desktop/qmmm /cp2k-8.1/tools/toolchain/install/arch/* /home/faizan/Desktop/qmmm/cp2k/cp2k-8.1/arch

source /home/faizan/Desktop/qmmm/cp2k-8.1/tools/toolchain/install/setup

make -j 8 ARCH=local VERSION=“psmp” libcp2k

Gromacs installation

/home/faizan/Desktop/qmmm/cp2k-8.1/tools/toolchain/install/cmake-3.18.5/bin/cmake
… -DGMX_INSTALL_NBLIB_API=OFF -DBUILD_SHARED_LIBS=OFF -DGMXAPI=OFF
-DGMX_DOUBLE=ON -DGMX_MPI=ON -DGMX_FFT_LIBRARY=fftw3
-DCMAKE_CXX_FLAGS="-I/home/faizan/Desktop/qmmm/cp2k-8.1/src/start"
-DCMAKE_CXX_STANDARD_LIBRARIES=" -Wl,–enable-new-dtags -pthread
-L/usr/lib/x86_64-linux-gnu/openmpi/lib
-L/home/faizan/Desktop/qmmm/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/lib
-L/home/faizan/Desktop/qmmm/cp2k-8.1/tools/toolchain/install/fftw-3.3.8/lib
-L/home/faizan/Desktop/qmmm/cp2k-8.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/lib
-L/home/faizan/Desktop/qmmm/cp2k-8.1/tools/toolchain/install/libxc-4.3.4/lib
-L/home/faizan/Desktop/qmmm/cp2k-8.1/tools/toolchain/install/libxsmm-1.16.1/lib
-L/home/faizan/Desktop/qmmm/cp2k-8.1/tools/toolchain/install/scalapack-2.1.0/lib
-L/home/faizan/Desktop/qmmm/cp2k-8.1/tools/toolchain/install/cosma-2.2.0/lib
-L/home/faizan/Desktop/qmmm/cp2k-8.1/tools/toolchain/install/elpa-2020.05.001/lib
-L/home/faizan/Desktop/qmmm/cp2k-8.1/tools/toolchain/install/spglib-1.16.0/lib
-L/home/faizan/Desktop/qmmm/cp2k-8.1/tools/toolchain/install/libvori-201229/lib
-L/home/faizan/Desktop/qmmm/cp2k-8.1/lib/local/psmp/exts/dbcsr
-L/home/faizan/Desktop/qmmm/cp2k-8.1/lib/local/psmp -lcp2k -ldbcsr
-lsymspg -lelpa_openmp -lcosma_pxgemm -lcosma -lgrid2grid -lscalapack
-lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lint2 -lfftw3_mpi -lfftw3
-lfftw3_omp -lmpi_cxx -lmpi -lopenblas -lvori -lstdc++ -lgfortran"
-DCMAKE_INSTALL_PREFIX=/home/faizan/Desktop/gromacs-2021.1-qmmm/

In make command after 100% scan, the error output is given in the attached file. The errors refer to “undefined reference to” followed by name of different packages. Refer to the attachment for more details.

Any suggestions to solve this out would be of great help.

Error_after_make.txt (500.5 KB)

Hi, in that particular case the problem is that you need to change -lmpi_cxx -lmpi to -lmpi_cxx -lmpi -lmpi_mpifh (basically add -lmpi_mpifh).

But the thing is that 2021 versions of Interface will not be supported (they are unofficial). I strongly suggest you to install official GROMACS 2022 beta version, which you can find here: Downloads — GROMACS 2022-beta1 documentation

Installation instructions with CP2K Interface you can find here: Installation guide — GROMACS 2022-beta1 documentation

Also note that some things, like mdp options and external input support, has changed please read documentation: Hybrid Quantum-Classical simulations (QM/MM) with CP2K interface — GROMACS 2022-beta1 documentation

Hi,
Thank you for the response.
The “-lmpi_mpifh” works.

Hi Morozov
I am trying to install gromacs-2021.1-qmmm on another machine.
I am giving here the commands for installation.
Installation Of Cp2k-8.1 Version:
./install_cp2k_toolchain.sh --enable-cuda=no --with-sirius=no --with-openblas=install --with-openmpi=install
cp /home/pc/qmmm/cp2k-8.1/tools/toolchain/install/arch/* to the cp2k/arch/ directory
source /home/pc/qmmm/cp2k-8.1/tools/toolchain/install/setup
cd cp2k/
make -j 8 ARCH=local VERSION=“psmp” libcp2k
Installation Gromacs
cd gromacs-2021.1-qmmm/build
sudo /home/pc/qmmm/cp2k-8.1/tools/toolchain/install/cmake-3.18.5/bin/cmake … -DGMX_INSTALL_NBLIB_API=OFF -DBUILD_SHARED_LIBS=OFF -DGMXAPI=OFF -DGMX_DOUBLE=ON -DGMX_MPI=ON -DGMX_FFT_LIBRARY=fftw3 -DCMAKE_CXX_FLAGS="-I/home/pc/qmmm/cp2k-8.1/src/start" -DCMAKE_CXX_STANDARD_LIBRARIES=" -Wl,–enable-new-dtags -pthread -L/usr/lib/x86_64-linux-gnu/openmpi/lib -L/home/pc/qmmm/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/lib -L/home/pc/qmmm/cp2k-8.1/tools/toolchain/install/fftw-3.3.8/lib -L/home/pc/qmmm/cp2k-8.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/lib -L/home/pc/qmmm/cp2k-8.1/tools/toolchain/install/libxc-4.3.4/lib -L/home/pc/qmmm/cp2k-8.1/tools/toolchain/install/libxsmm-1.16.1/lib -L/home/pc/qmmm/cp2k-8.1/tools/toolchain/install/scalapack-2.1.0/lib -L/home/pc/qmmm/cp2k-8.1/tools/toolchain/install/cosma-2.2.0/lib -L/home/pc/qmmm/cp2k-8.1/tools/toolchain/install/elpa-2020.05.001/lib -L/home/pc/qmmm/cp2k-8.1/tools/toolchain/install/spglib-1.16.0/lib -L/home/pc/qmmm/cp2k-8.1/tools/toolchain/install/libvori-201229/lib -L/home/pc/qmmm/cp2k-8.1/lib/local/psmp/exts/dbcsr -L/home/pc/qmmm/cp2k-8.1/lib/local/psmp -lcp2k -ldbcsr -lsymspg -lelpa_openmp -lcosma_pxgemm -lcosma -lgrid2grid -lscalapack -lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lint2 -lfftw3_mpi -lfftw3 -lfftw3_omp -lmpi_cxx -lmpi -lmpi_mpifh -lopenblas -lvori -lstdc++ -lgfortran" -DCMAKE_INSTALL_PREFIX=/home/pc/gromacs-2021.1-qmmm/ -DGMX_GPU=OFF
sudo make -j 8

make ends up with the error.

[ 98%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_insolidangle.cpp.o
[ 98%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_keywords.cpp.o
[ 98%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_merge.cpp.o
[ 98%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_permute.cpp.o
[ 98%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_position.cpp.o
[100%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_same.cpp.o
[100%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_simple.cpp.o
[100%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/symrec.cpp.o
[100%] Linking CXX static library …/…/lib/libgromacs_mpi_d.a
[100%] Built target libgromacs
Scanning dependencies of target gmx
[100%] Linking CXX executable …/…/bin/gmx_mpi_d
/home/pc/qmmm/cp2k-8.1/lib/local/psmp/libcp2k.a(libint_wrapper.o): In function __libint_wrapper_MOD_cp_libint_get_derivs': /home/pc/qmmm/cp2k-8.1/src/libint_wrapper.F:450: undefined reference to libint2_build_eri1’
/home/pc/qmmm/cp2k-8.1/lib/local/psmp/libcp2k.a(libint_wrapper.o): In function __libint_wrapper_MOD_cp_libint_cleanup_eri1': /home/pc/qmmm/cp2k-8.1/src/libint_wrapper.F:567: undefined reference to libint2_cleanup_eri1’
/home/pc/qmmm/cp2k-8.1/lib/local/psmp/libcp2k.a(libint_wrapper.o): In function __libint_wrapper_MOD_cp_libint_init_eri1': /home/pc/qmmm/cp2k-8.1/src/libint_wrapper.F:522: undefined reference to libint2_init_eri1’
collect2: error: ld returned 1 exit status
src/programs/CMakeFiles/gmx.dir/build.make:102: recipe for target ‘bin/gmx_mpi_d’ failed
make[2]: *** [bin/gmx_mpi_d] Error 1
CMakeFiles/Makefile2:6251: recipe for target ‘src/programs/CMakeFiles/gmx.dir/all’ failed
make[1]: *** [src/programs/CMakeFiles/gmx.dir/all] Error 2
Makefile:181: recipe for target ‘all’ failed
make: *** [all] Error 2

I have checked libint2 in the system, it is already installed. libint2 is also present in the cp2k installation location.
Kindly look into the issue.
Thank you for your time in advance.

Tasneem

Try to build CP2kk itself with make -j 8 ARCH=local VERSION=“psmp”
Could you also attach local.psmp file which is used for building libcp2k?

hello
I am trying to install cp2k-9.1 with gromacs, after cp2k installation when I want to make the libcp2k file I get the following error:
Discovering programs …
make -C /home/ghasemi/software/cp2k-9.1/exts/dbcsr -f /home/ghasemi/software/cp2k-9.1/exts/build_dbcsr/Makefile
ARCHFILE=/home/ghasemi/software/cp2k-9.1/arch/local.psmp
LIBDIR=/home/ghasemi/software/cp2k-9.1/lib/local/psmp/exts/dbcsr
OBJDIR=/home/ghasemi/software/cp2k-9.1/obj/local/psmp/exts/dbcsr
USE_ACCEL=""
ACC=""
ACCFLAGS=""
Writing pkg-config /home/ghasemi/software/cp2k-9.1/lib/local/psmp/pkgconfig/libcp2k.pc
Removing stale archives for psmp …
/bin/sh: 1: Syntax error: “(” unexpected
make[2]: *** [/home/ghasemi/software/cp2k-9.1/Makefile:200: pkgconfig] Error 2
make[2]: *** Waiting for unfinished jobs…
Removing stale archives …
Resolving dependencies …
Resolving dependencies for psmp …
make[1]: *** [/home/ghasemi/software/cp2k-9.1/Makefile:140: psmp] Error 2
make: *** [Makefile:135: libcp2k] Error 2
It would be greatly appreciated if someone could help me to fix it.
best regards

Have no idea what happened, you should ask on the CP2K forum.
Is this you message?
https://groups.google.com/g/cp2k/c/cuAG_GXcv8M

yes, that is my question,
thank you