<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Jan 18, 2015 at 3:28 AM, Jerry <span dir="ltr"><<a href="mailto:orzgodlo@gmail.com" target="_blank">orzgodlo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks, Matthew.<br><div><br>I thought "--with-cc" "--with-cxx "  "--with-fc" are all needed, according to the following webpage <br><a href="http://www.mcs.anl.gov/petsc/documentation/installation.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/installation.html</a></div></div></blockquote><div><br></div><div>Only if you want to turn on those features. I'll see if we can clarify that.</div><div><br></div><div>Glad it works.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br>Now, I configured as follows, and then compile. It seems ok.<br><br>./configure --prefix=/usr/local --with-cc=gcc --with-cxx=0 --with-fc=0 --with-mpi-include=/usr/include/mpi --with-mpi-lib=/usr/lib/libmpi.so<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-17 11:29 GMT-08:00 Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Sat, Jan 17, 2015 at 1:18 PM, Jerry <span dir="ltr"><<a href="mailto:orzgodlo@gmail.com" target="_blank">orzgodlo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>Hi, Matthew.<br><br></div>Please find attached the configure log. Thanks.<br></div></div></blockquote><div><br></div></span><div>There are problems with C++ and this MPI install:</div><div><br></div><div><div>Executing: g++  -o /tmp/petsc-FhcRYT/config.libraries/conftest    -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g -O0  /tmp/petsc-FhcRYT/config.libraries/conftest.o  -Wl,-rpath,/usr/lib -L/usr/lib -lmpi -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -ldl -lgcc_s -ldl </div><div>Possible ERROR while running linker: exit code 256</div><div>stderr:</div><div>/tmp/petsc-FhcRYT/config.libraries/conftest.o: In function `MPI::Intracomm::Intracomm()':</div><div>/usr/include/mpi/openmpi/ompi/mpi/cxx/intracomm.h:25: undefined reference to `MPI::Comm::Comm()'</div><div>/tmp/petsc-FhcRYT/config.libraries/conftest.o: In function `MPI::Intracomm::Intracomm(ompi_communicator_t*)':</div><div>/usr/include/mpi/openmpi/ompi/mpi/cxx/intracomm_inln.h:23: undefined reference to `MPI::Comm::Comm()'</div><div>/tmp/petsc-FhcRYT/config.libraries/conftest.o: In function `MPI::Op::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)':</div><div>/usr/include/mpi/openmpi/ompi/mpi/cxx/op_inln.h:122: undefined reference to `ompi_mpi_cxx_op_intercept'</div><div>/tmp/petsc-FhcRYT/config.libraries/conftest.o:(.data.rel.ro._ZTVN3MPI3WinE[_ZTVN3MPI3WinE]+0x48): undefined reference to `MPI::Win::Free()'</div><div>/tmp/petsc-FhcRYT/config.libraries/conftest.o:(.data.rel.ro._ZTVN3MPI8DatatypeE[_ZTVN3MPI8DatatypeE]+0x78): undefined reference to `MPI::Datatype::Free()'</div><div>collect2: error: ld returned 1 exit status</div></div><div><br></div><div>If you are using your own installation of MPI, it is best to use its compiler wrappers:</div><div><br></div><div>  --with-cc=/usr/bin/mpicc --with-cxx=/usr/bin/mpicxx</div><div><br></div><div>instead of the MPI flags (since it looks like you missed a library). Also, do you really</div><div>need to build PETSc with C++? If not, leave it out using</div><div><br></div><div>  --with-cxx=0</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div>-Jerry<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-17 4:52 GMT-08:00 Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Send the whole configure.log<div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Sat, Jan 17, 2015 at 4:07 AM, Jerry <span dir="ltr"><<a href="mailto:orzgodlo@gmail.com" target="_blank">orzgodlo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Hi, all.<br><br>I am trying to configure&compile petsc. However, during configuring, I got the following error (C++ error! MPI_Finalize() could not be located!). I am also copying the last few lines in configure.log.<br><br></div><div>But I am sure mpi.h is under the folder I specified (--with-mpi-include=/usr/include/mpi )<br><br></div><div>Any idea about the problem? Thanks.<br><br></div><div><br>$$ ./configure --prefix=~/local --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --with-mpi-include=/usr/include/mpi --with-mpi-lib=/usr/lib/libmpi.so<br><br>===============================================================================<br>             Configuring PETSc to compile on your system                       <br>===============================================================================<br>TESTING: CxxMPICheck from config.packages.MPI(config/BuildSystem/config/packages*******************************************************************************<br>         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):<br>-------------------------------------------------------------------------------<br>C++ error! MPI_Finalize() could not be located!<br>*******************************************************************************<br><br><br><br></div>===========  Last few lines from configure.log ================<br><br><br><div>*******************************************************************************<br>  File "./config/configure.py", line 272, in petsc_configure<br>    framework.configure(out = sys.stdout)<br>  File "/home/delia/workspace/programs/petsc/config/BuildSystem/config/framework.py", line 941, in configure<br>    child.configure()<br>  File "/home/delia/workspace/programs/petsc/config/BuildSystem/config/package.py", line 606, in configure<br>    self.executeTest(self.configureLibrary)<br>  File "/home/delia/workspace/programs/petsc/config/BuildSystem/config/base.py", line 126, in executeTest<br>    ret = test(*args,**kargs)<br>  File "/home/delia/workspace/programs/petsc/config/BuildSystem/config/packages/MPI.py", line 660, in CxxMPICheck<br>    raise RuntimeError('C++ error! MPI_Finalize() could not be located!')<br>================================================================================<br>Finishing Configure Run at Sat Jan 17 01:34:31 2015<br>================================================================================<span><font color="#888888"><br><br><br></font></span></div><span><font color="#888888"><div>Jerry <br></div></font></span></div>
</blockquote></div><br><br clear="all"><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><div><br></div></font></span></font></span></div></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><span><font color="#888888">-- <br><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</font></span></font></span></font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><div><div><br><br clear="all"><div><br></div>-- <br><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div></font></span></div></div>
</blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>