[gmx-users] Installation woe: fatal error: mpi.h: No such file or directory

Jose Borreguero borreguero at gmail.com
Wed Aug 3 15:58:27 CEST 2016


Hi Mark,

I followed your instructions and had no problem at all with the install.

Thanks a lot!
.Jose


On Tue, Aug 2, 2016 at 7:00 PM, Mark Abraham <mark.j.abraham at gmail.com>
wrote:

> Hi,
>
> That seems a lot more complicated than you should need. First, don't run
> the whole script as sudo unless you like re-installing OSes. As the install
> guide says, you only need the install stage as sudo. You haven't set the
> C++ compiler, either, so that might why it hasn't found mpi.h when
> compiling a C++ file. You've managed a whole pile of things that don't need
> to be managed if you have a normal installation of OpenMPI - the whole
> point of using the wrapper compilers is that they already know where to
> find the matching headers and libraries.
>
> GROMACSDIR=/SNSlocal/sw/gromacs/gromacs-5.1.3
> module load mpi/openmpi-x86_64
> mkdir -p $GROMACSDIR/install
> mkdir -p $GROMACSDIR/build
> cd $GROMACSDIR/build
> cmake $GROMACSDIR -DGMX_MPI=ON -DGMX_BUILD_MDRUN_ONLY=ON
> -DGMX_BUILD_OWN_FFTW=ON
> -DCMAKE_INSTALL_PREFIX=/SNSlocal/sw/gromacs/gromacs-5.1.3/install
>
> If that works, then consider -DBUILD_SHARED_LIBS=off
>
> Mark
>
> On Wed, Aug 3, 2016 at 12:06 AM Jose Borreguero <borreguero at gmail.com>
> wrote:
>
> > Dear GROMACS users,
> >
> > I don't know what's going on, installation "fails to find mpi.h" again
> and
> > again. The error message:
> > In file included from
> >
> >
> /SNSlocal/sw/gromacs/gromacs-5.1.3/src/gromacs/legacyheaders/types/commrec.h:45:0,
> >                  from
> >
> >
> /SNSlocal/sw/gromacs/gromacs-5.1.3/src/gromacs/commandline/cmdlineinit.cpp:56:
> > /SNSlocal/sw/gromacs/gromacs-5.1.3/src/gromacs/utility/gmxmpi.h:61:17:
> > fatal error: mpi.h: No such file or directory
> > compilation terminated.
> >
> > My installation script:
> >
> > #!/bin/bash
> > # To run, issue:
> > # $> sudo su - -c /SNSlocal/sw/gromacs/gromacs-5.1.3/myInstall.sh
> >
> > GROMACSDIR=/SNSlocal/sw/gromacs/gromacs-5.1.3
> > module load mpi/openmpi-x86_64
> > mkdir -p $GROMACSDIR/install
> > mkdir -p $GROMACSDIR/build
> > cd $GROMACSDIR/build
> >
> > cmake $GROMACSDIR -DCMAKE_INCLUDE_PATH=/usr/include/openmpi-x86_64
> > -DCMAKE_LIBRARY_PATH=/usr/lib64/openmpi/li\
> > b -DCMAKE_PREFIX_PATH=/usr/lib64/openmpi/bin
> > -DCMAKE_C_COMPILER=/usr/lib64/openmpi/bin/mpicc -DGMX_MPI=ON -DG\
> > MX_BUILD_MDRUN_ONLY=ON -DBUILD_SHARED_LIBS=OFF -DGMX_BUILD_OWN_FFTW=ON
> > -DCMAKE_INSTALL_PREFIX=/SNSlocal/sw/gr\
> > omacs/gromacs-5.1.3/install
> >
> > make -j 24
> > make install
> >
> > As you see, I have populated variable CMAKE_INCLUDE_PATH
> > Furthermore:
> > $> locate mpi.h
> > $> /usr/include/openmpi-x86_64/mpi.h
> >
> > This is what I get by grepping the CMakeCache.txt:
> > $> grep "openmpi-x86_64" CMakeCache.txt
> >
> CMakeCache.txt:CMAKE_INCLUDE_PATH:UNINITIALIZED=/usr/include/openmpi-x86_64
> >
> > and under CMakeFiles/ directory:
> > $> grep -R "openmpi-x86_64" *
> > CMakeOutput.log:COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_a8886' '-rdynamic'
> '-I'
> > '/usr/include/openmpi-x86_64' '-pthread' '-L/usr/lib64/openmpi/lib'
> > '-mtune=generic' '-march=x86-64'
> > CMakeOutput.log:  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o'
> 'cmTC_a8886'
> > '-rdynamic' '-I' '/usr/include/openmpi-x86_64' '-pthread'
> > '-L/usr/lib64/openmpi/lib' '-mtune=generic' '-march=x86-64']
> >
> > The last info, the ignore line seems suspicious but I don't know what it
> > means.
> > I'm stuck here, please any help will be much appreciated.
> >
> > Best,
> > .Jose
> > --
> > Gromacs Users mailing list
> >
> > * Please search the archive at
> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > posting!
> >
> > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >
> > * For (un)subscribe requests visit
> > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> > send a mail to gmx-users-request at gromacs.org.
> >
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>


More information about the gromacs.org_gmx-users mailing list