<div dir="ltr">That still caused the same problem.<div><br></div><div>But I have resolved the issue. I removed system mpich and built a local version of openmpi. That made it work. It appears that apt-get install mpich installs default GCC-5 headers even when I made GCC-7 the default complier.</div><div><br></div><div>By the way, I built openmpi 4.0.0 and PETSc was not compatible with it: some API errors occurred. So I installed openmpi 1.10 which I know works with PETSc. Just want to confirm that it is indeed the case. </div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 10, 2018 at 6:12 AM Balay, Satish <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">> Configure Options: --configModules=PETSc.Configure --optionsModule=config.compilerOptions --CC=mpicc --FC=mpif90 --with-debugging=1 --download-hypre=1 --with-x=0 --PETSC_ARCH=linux-dbg<br>
<br>
If specifying compilers - also specify a C++ compiler.<br>
<br>
--CC=mpicc --FC=mpif90 --CXX=mpicxx<br>
<br>
Satish<br>
<br>
<br>
On Sun, 9 Dec 2018, Amneet Bhalla via petsc-users wrote:<br>
<br>
> Hi Folks,<br>
> <br>
> I upgraded GCC (GCC-5 to GCC-7) on Ubuntu following the first suggestion<br>
> given here:<br>
> <a href="https://gist.github.com/application2000/73fd6f4bf1be6600a2cf9f56315a2d91" rel="noreferrer" target="_blank">https://gist.github.com/application2000/73fd6f4bf1be6600a2cf9f56315a2d91</a><br>
> <br>
> I then removed system mpich (which was using GCC-5) and reinstalled it<br>
> using Ubuntu package manager. However, now I am getting the following<br>
> configure error with PETSc<br>
> <br>
> ===============================================================================<br>
> <br>
> TESTING: CxxMPICheck from<br>
> config.packages.MPI(config/BuildSystem/config/packages/MPI.py:381)<br>
> <br>
> <br>
> *******************************************************************************<br>
> <br>
> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for<br>
> details):<br>
> <br>
> -------------------------------------------------------------------------------<br>
> <br>
> C++ error! mpi.h could not be located at: []<br>
> *******************************************************************************<br>
> <br>
> <br>
> <br>
> I am attaching the configure.log as well. Any hints on what I should be<br>
> doing?<br>
> <br>
> Thanks,<br>
> <br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_704934633480874275gmail_signature"><div dir="ltr"><div>--Amneet <br><br></div><div><br></div><div><br></div></div></div>