Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
2161 Discussions

catastrophic error: cannot open source file "mpi.h"

Tami_C_
Beginner
5,151 Views

Hi,

We have SGI altix cluster running SUSE SLES 11 sp 2.

Installed -  Intel_Cluster_Studio_2013.0.028  .

I try to compile the software "LAMMPS"  ang get the error :    "catastrophic error: cannot open source file "mpi.h"  "  for many files.

Any suggestions how to proceed ?

Thanks,

Ofir

 

 

0 Kudos
3 Replies
TimP
Honored Contributor III
5,151 Views

If you use the mpi wrappers such as mpiicc for Intel C, mpicpc for Intel C++, mpiifort for Fortran, the mpi.h include path is set for you.  If not, you must specify it in your command line or Makefile, but the MPI wrapper method is preferred.

0 Kudos
Tami_C_
Beginner
5,151 Views

Thank you Tim.

Could you write an example of the "mpi" lines in the Makefile ?

0 Kudos
TimP
Honored Contributor III
5,151 Views

It's done with the usual linux style Include path option added to the compiler options string, e.g.

-I/opt/intel/impi/include64/ 

(supposing you are building for 64-bit/Intel64 mode).

but a correct Makefile would allow you to set mpiifort, mpiicpc, mpiicc as the compiler tools, so you don't need to change -I options.

Some customers prefer to remove mpif90, mpif77, mpicc, mpiCC from the Intel MPI installation and set those as symlinks so they don't need  to set the name of the compiler tools when changing MPI.  This will work only if you have correctly set up your system so that there is no conflicting MPI installation, such as you normally get when installing the MPI which comes with a linux distribution.

0 Kudos
Reply