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

Jose Borreguero borreguero at gmail.com
Wed Aug 3 00:06:23 CEST 2016


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


More information about the gromacs.org_gmx-users mailing list