[petsc-dev] configuration error: Cannot compile C with mpicc

Balay, Satish balay at mcs.anl.gov
Fri Apr 24 14:17:28 CDT 2015


However mumps - and perhaps other packages require fortran.

Satish
________________________________
From: Matthew Knepley<mailto:knepley at gmail.com>
Sent: ‎4/‎24/‎2015 2:11 PM
To: Jin, Shuangshuang<mailto:Shuangshuang.Jin at pnnl.gov>
Cc: petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov>
Subject: Re: [petsc-dev] configuration error: Cannot compile C with mpicc

On Fri, Apr 24, 2015 at 1:55 PM, Jin, Shuangshuang <Shuangshuang.Jin at pnnl.gov<mailto:Shuangshuang.Jin at pnnl.gov>> wrote:
Thanks for the quick fix for the problem. However I came up with a new one now and the configure.log is too big to attach..

It seems to complain about mpif.h when I look at the log file. Here's a piece of the error:

Executing: gfortran -c -o /tmp/petsc-u4h0ot/config.libraries/conftest.o -I/tmp/petsc-u4h0ot/config.compilers -I/tmp/petsc-u4h0ot/config.types -I/tmp/petsc-u4h0ot/config.setCompilers -I/tmp/petsc-u4h0ot/config.libraries  -Wall -Wno-unused-variable -ffree-line-length-0 -Wno-unused-dummy-argument -O    /tmp/petsc-u4h0ot/config.libraries/conftest.F
Possible ERROR while running compiler: exit code 256
stderr:
/tmp/petsc-u4h0ot/config.libraries/conftest.F:2:0: fatal error: mpif.h: No such file or directory
 #include "mpif.h"
 ^
compilation terminated.
Source:
      program main
#include "mpif.h"
      end
*******************************************************************************
         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
-------------------------------------------------------------------------------
Fortran error! mpif.h could not be located at: []
*******************************************************************************

And my configure option is:

./configure PETSC_ARCH=arch-complex-opt --with-prefix=./ --with-mpi=1 --with-cc=mpicc --with-cxx=mpicxx --with-c++-support=1 --with-c-support=0 --with-fortran=0 --with-scalar-type=complex --with-debugging=0 CFLAGS=-O3 --download-superlu_dist --download-superlu --download-parmetis --download-metis --download-f2cblaslapack=1 --with-clanguage=c++ --with-shared-libraries=0 --with-x=0 --with-mpirun=mpirun --with-mpiexec=mpiexec --download-fblaslapack=1 --download-mumps --download-plapack --download-suitesparse

You want --with-fc-0 not with-fortran=0.

This belongs on petsc-maint at mcs.anl.gov<mailto:petsc-maint at mcs.anl.gov>

  Thanks,

    Matt


Can you help to take a look again?

Thanks,
Shuangshuang



-----Original Message-----
From: Barry Smith [mailto:bsmith at mcs.anl.gov<mailto:bsmith at mcs.anl.gov>]
Sent: Friday, April 24, 2015 11:35 AM
To: Jin, Shuangshuang
Cc: petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov>
Subject: Re: [petsc-dev] configuration error: Cannot compile C with mpicc


CFLAGS=-03  should not be a 0 it should be an O for optimize




> On Apr 24, 2015, at 1:33 PM, Jin, Shuangshuang <Shuangshuang.Jin at pnnl.gov<mailto:Shuangshuang.Jin at pnnl.gov>> wrote:
>
> Hello, Petsc dev support team,
>
> I was trying to install the latest dev version PETSc on a linxu computer. I got an error “Cannot compile C with mpicc”. Please see my configure.log attached. Could you please help?
>
> Thanks,
> Shuangshuang
>
>
> <configure.log>




--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150424/3792fd3a/attachment.html>


More information about the petsc-dev mailing list