[CIG-SEISMO] compilation error (configure: error: MPI header not found; try setting MPI_INC)

James Wookey J.Wookey at bristol.ac.uk
Mon Nov 13 08:27:26 PST 2017


It looks like you are pointing at the file specifically, not the directory which contains it. I think MPI_INC should be the directory containing mpi.h, i.e.:

./configure FC=gfortran MPIFC=mpif90 MPI_INC=/usr/include/mpich

> On 13 Nov 2017, at 16:21, Emanuel Kaestle <emanuel.kaestle at upmc.fr> wrote:
> 
> Thanks for your quick reply!
> 
> But why does the following command not do the trick (independent whether I use inverted commas or not)?
> ./configure FC=gfortran MPIFC=mpif90 MPI_INC='/usr/include/mpich/mpi.h'
> 
> The configure script recognizes that MPI_INC is set. Before, I got the error:
> gfortran:error: unrecognized command line option '-showme:incdirs'
> 
> Now I just get the error MPI header not found; ...
> Thanks again for any suggestions,
> 
> Emanuel
> 
> 
> 
> On 11/13/2017 04:50 PM, Malladi, Rama Kishan V wrote:
>> Typically MPI_INC is the path to the location where the header “mpi.h” is available. So, try setting MPI_INC to /usr/include/mpich
>> 
>>  
>> 
>> From: CIG-SEISMO [mailto:cig-seismo-bounces at geodynamics.org] On Behalf Of Emanuel Kaestle
>> Sent: Monday, November 13, 2017 9:10 PM
>> To: cig-seismo at geodynamics.org
>> Subject: [CIG-SEISMO] compilation error (configure: error: MPI header not found; try setting MPI_INC)
>> 
>>  
>> 
>> Hi there,
>> 
>> I am having some touble compiling SPECFEM3D. Execution of the configure script returns me the following error
>> 
>> ## --- ##
>> ## MPI ##
>> ## --- ##
>> checking mpi.h usability... no
>> checking mpi.h presence... no
>> checking for mpi.h... no
>> configure: error: MPI header not found; try setting MPI_INC.
>> 
>> I start it with the command ./configure FC=gfortran MPIFC=mpif90
>> 
>> Changing it to ./configure FC=gfortran MPIFC=mpif90 MPI_INC='/usr/include/mpich/mpi.h' doesn't change anything. It returns the same error.
>> 
>> The mpi.h header should be present, at least I can find it with the find command:
>> 
>> /usr/src/linux-headers-4.8.0-53/include/linux/mpi.h
>> /usr/src/linux-headers-4.10.0-28/include/linux/mpi.h
>> /usr/include/mpich/mpi.h
>> 
>> The small script from the manual (program main / include 'mpif.h' / ....) runs without problems if I compile it with mpif90 (not with gfortran).
>> 
>> What is the correct way to set MPI_INC?
>> 
>> Thanks for your help!
>> 
>> Emanuel
>> 
>> 
>> 
>> _______________________________________________
>> CIG-SEISMO mailing list
>> 
>> CIG-SEISMO at geodynamics.org
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo
> 
> _______________________________________________
> CIG-SEISMO mailing list
> CIG-SEISMO at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo



More information about the CIG-SEISMO mailing list