Problem with mpi.h in CGNS installation

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
alexandre.lebouvier

Problem with mpi.h in CGNS installation

Post by alexandre.lebouvier »

Hello,

I try to install code_saturne on Ubuntu 12.04 64-bits and I get some issues in the installation of CGNS :

cd /home/user/Downloads/installer-2.2.1/cgnslib_3.1.3.build/src && /usr/bin/gcc -Dcgns_shared_EXPORTS -DBUILD_HDF5 -O3 -DNDEBUG -fPIC -I/home/user/Downloads/installer-2.2.1/cgnslib_3.1.3/src/. -I/home/user/saturne/hdf5-1.8.8/include -I/home/user/Downloads/installer-2.2.1/cgnslib_3.1.3.build/src -o CMakeFiles/cgns_shared.dir/cgnslib.c.o -c /home/user/Downloads/installer-2.2.1/cgnslib_3.1.3/src/cgnslib.c
In file included from /usr/include/hdf5.h:24:0,
from /home/user/Downloads/installer-2.2.1/cgnslib_3.1.3/src/cgnslib.c:57:
/usr/include/H5public.h:57:20: fatal error: mpi.h: No such file or directory
compilation terminated.

I got a similar problem just before with hdf5.h, so I installed libhdf5, and now I have this issue with mpi.h. mpi.h is though present in my folder /usr/lib/openmpi/include/ so it seems to be more a library issue.

I get the same error for CS 2.0 and 2.2 installation. I attached the full log file.

Thank you

Alexandre
Attachments
install_saturne.log
(5.85 KiB) Downloaded 746 times
Jacques Fontaine
Posts: 118
Joined: Mon Feb 20, 2012 2:07 pm

Re: Problem with mpi.h in CGNS installation

Post by Jacques Fontaine »

Hello,

Try after installing those packages: mpi-default-bin and mpi-default-dev.

Best regards,
JF
alexandre.lebouvier

Re: Problem with mpi.h in CGNS installation

Post by alexandre.lebouvier »

Hello,

For those 2 packages, i get this following error :

user@ubuntu:~$ sudo apt-get install mpi-default-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
mpi-default-dev : Depends: libopenmpi-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Should I uninstall libopenmpi?

Alexandre
alexandre.lebouvier

Re: Problem with mpi.h in CGNS installation

Post by alexandre.lebouvier »

I uninstalled libopenmpi and achieve installing the 2 packages but I still get the same installation error for CS...

Thanks,

Alexandre
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Problem with mpi.h in CGNS installation

Post by Yvan Fournier »

Hello,

Do you have a mpi.h in /usr/include ? What MPI version/packages do you have after all ?

If you do not need CGNS file format support, tell the installer not to use it. Otherwise, you may either use a packaged version of CGNS (but you will only have version 2.5), or install CGNS manually (using ccmake, which is also availble as the cmake-curses-gui pacage, you go to the CGNS build directory and edit the path where MPI includes are searched for).

Another solution is to use a serial package for HDF5 (this will avoid pulling mpi.h in HDF5 headers).

If you encounter the same error for Code_Saturne, you may add CPPFLAGS=-I/usr/lib/openmpi/include to the configure options, but this will work only for Code_Saturne or MED manual installs, not for CGNS, which uses CMake instead of the autools (though "export CPPFLAGS=-I/usr/lib/openmpi/include" before running the install script might work).

Best regards,

Yvan
alexandre.lebouvier

Re: Problem with mpi.h in CGNS installation

Post by alexandre.lebouvier »

I do not have mpi.h in usr/include. ompi_info returns version 1.4.3 of openMPI.
The installation worked fine without the CGNS support.

Thank you very much!
Post Reply