<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Aug 21, 2016 at 10:04 AM, Jérémy REKIER <span dir="ltr"><<a href="mailto:jrekier@gmail.com" target="_blank">jrekier@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><br>
Dear support team,<div><br></div><div>I am trying to install petsc4py on top of my miniconda3 python environment. </div><div><br></div><div>I recently filed an <a href="https://bitbucket.org/petsc/petsc4py/issues/50/cannot-pass-runtestpy#comment-30006281" target="_blank">issue</a> on bitbucket about the trouble that I was having with installing the development version of petsc4py. I have changed the status of this issue as invalid as this no longer corresponds to the trouble that I am having. </div><div><br></div><div>Since I think that the problem I’m probably having comes from my—possibly broken—environment, I reckoned the best was to ask for support via e-mail.</div><div><br></div><div>I had previously succeeded in installing the development version of both petsc and petsc4py on my office computer running on MacOSX. But, when I try to do so on my laptop (using the same OS) using exactly the same command inputs, I keep on failing. </div><div><br></div><div>Now, I seem to compile PETSc without trouble. Configuration step produces the following output:</div><div><br></div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font color="#00f900">jrek@MacJerem:petsc$</font><font color="#0433ff"> python2.7 ./configure --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 --with-scalar-type=complex --download-scalapack --download-mumps</font></div><div>==============================<wbr>==============================<wbr>===================<br>             Configuring PETSc to compile on your system                       <br>==============================<wbr>==============================<wbr>===================<br>Compilers:                                                                                                                                                                  <br>  C Compiler:         mpicc    -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -Qunused-arguments -fvisibility=hidden -g3 <br>  C++ Compiler:       mpicxx  -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fvisibility=hidden -g     <br>  Fortran Compiler:   mpif90   -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g  <br>Linkers:<br>  Shared linker:   mpicc  -dynamiclib -single_module -undefined dynamic_lookup -multiply_defined suppress    -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -Qunused-arguments -fvisibility=hidden -g3<br>  Dynamic linker:   mpicc  -dynamiclib -single_module -undefined dynamic_lookup -multiply_defined suppress    -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -Qunused-arguments -fvisibility=hidden -g3<br>make:<br>BLAS/LAPACK: -llapack -lblas<br>MPI:<br>  Includes: -I/usr/local/Cellar/open-mpi/<wbr>1.10.3/include<br>cmake:<br>  Arch:     <br>hwloc:<br>  Includes: -I/usr/local/include<br>  Library:  -Wl,-rpath,/usr/<wbr>local/lib -L/usr/local/lib -lhwloc<br>scalapack:<br>  Library:  -Wl,-rpath,/Users/<wbr>jrek/softs/petsc/arch-darwin-<wbr>c-opt/lib -L/Users/jrek/softs/petsc/<wbr>arch-darwin-c-opt/lib -lscalapack<br>MUMPS:<br>  Includes: -I/Users/jrek/softs/petsc/<wbr>arch-darwin-c-opt/include<br>  Library:  -Wl,-rpath,/Users/<wbr>jrek/softs/petsc/arch-darwin-<wbr>c-opt/lib -L/Users/jrek/softs/petsc/<wbr>arch-darwin-c-opt/lib -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord<br>X:<br>  Includes: -I/opt/X11/include<br>  Library:  -Wl,-rpath,/opt/<wbr>X11/lib -L/opt/X11/lib -lX11<br>pthread:<br>sowing:<br>ssl:<br>  Includes: -I/usr/local/opt/openssl/<wbr>include<br>  Library:  -Wl,-rpath,/usr/<wbr>local/opt/openssl/lib -L/usr/local/opt/openssl/lib -lssl -lcrypto<br>PETSc:<br>  PETSC_ARCH: arch-darwin-c-opt<br>  PETSC_DIR: /Users/jrek/softs/petsc<br>  Scalar type: complex<br>  Precision: double<br>  Clanguage: C<br>  Integer size: 32<br>  shared libraries: enabled<br>  Memory alignment: 16<br>xxx===========================<wbr>==============================<wbr>================xxx<br> Configure stage complete. Now build PETSc libraries with (gnumake build):<br>   make PETSC_DIR=/Users/jrek/softs/<wbr>petsc PETSC_ARCH=arch-darwin-c-opt all<br>xxx===========================<wbr>==============================<wbr>================xxx</div><div><br></div></blockquote>Then, everything works smoothly with building and testing until I get to the point of actually installing petsc4py. Then, the error I am having is this one:<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font color="#00f900">jrek@MacJerem:petsc4py$</font><font color="#0433ff"> python setup.py install </font><br>running install<br>running build<br>running build_src<br>running build_py<br>running build_ext<br>PETSC_DIR:    /Users/jrek/softs/petsc<br>PETSC_ARCH:   arch-darwin-c-<wbr>opt<br>version:      3.7.3 development<br>integer-size: 32-bit<br>scalar-type:  complex<br>precision:    double<br>language:     CONLY<br>compiler:     mpicc<br>linker:       mpicc<br>building 'PETSc' extension<br>mpicc -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -Qunused-arguments -g3 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/jrek/miniconda3/<wbr>include -arch x86_64 -DPETSC_DIR=/Users/jrek/softs/<wbr>petsc -I/usr/local/Cellar/open-mpi/<wbr>1.10.3/include -I/usr/local/opt/openssl/<wbr>include -I/opt/X11/include -I/usr/local/include -I/Users/jrek/softs/petsc/<wbr>arch-darwin-c-opt/include -I/Users/jrek/softs/petsc/<wbr>include -Isrc/include -I/Users/jrek/miniconda3/lib/<wbr>python3.5/site-packages/numpy/<wbr>core/include -I/Users/jrek/miniconda3/<wbr>include/python3.5m -c src/PETSc.c -o build/temp.macosx-10.6-x86_64-<wbr>3.5/arch-darwin-c-opt/src/<wbr>PETSc.o<br>In file included from src/PETSc.c:3:<br>In file included from src/petsc4py.PETSc.c:271:<br>In file included from /usr/local/include/petsc.h:5:<br>In file included from /usr/local/include/petscbag.h:<wbr>4:<br><font color="#ff2600">/usr/local/include/petscsys.h:<wbr>152:6: error: "PETSc was configured with one OpenMPI mpi.h version but now appears to be compiling using a different OpenMPI mpi.h version"<br>#    error "PETSc was configured with one OpenMPI mpi.h version but now appears to be compiling using a different OpenMPI mpi.h version"</font></div></blockquote><div><div><br></div><div>Plus other errors which I think have good chances of being due to this one. </div><div><br></div><div>I guess I must probably have conflicting OpenMPI installs but I do not understand why PETSc is cannot compile just as fine as it did a moment ago. </div><div>How can be sure of the “mpi.h” that I am using and would specify one solve my problem ? </div></div></div></blockquote><div><br></div><div>I believe this can happen because Python is not always as careful about letting default include directories sneak in since they believe</div><div>you should always be using them.</div><div><br></div><div>So the MPI that PETSc used was</div><div><br></div><div>  mpicc in your path</div><div>  Includes: -I/usr/local/Cellar/open-mpi/<wbr>1.10.3/include<br></div><div><br></div><div>but I bet that you have</div><div><br></div><div>  /use/include/mpi.h</div><div><br></div><div>as well. I guess its also possible that you have a slightly different path when you installed petsc4py</div><div>than when you installed PETSc, and this causes two different 'mpicc' to be picked up.</div><div><br></div><div>I would say that having multiple installs of MPI is always the road to disaster.</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><div>Any help would be greatly appreciated as this is slowly driving me insane :)</div><div>Thanks very much in advance :D</div><div><br></div><div>Cheers,</div><div>Jerem </div></div></div></blockquote></div>-- <br><div class="gmail_signature" data-smartmail="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>