<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Tanks very much !!</div><div class="">It now works like a charm ! </div><div class=""><br class=""></div><div class="">Last time I use one of these silly ‘homebrew’ or 'conda' package managers for anything other than trivialities. </div><div class=""><br class=""></div><div class="">Thanks again. </div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Jerem</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On 21 Aug 2016, at 6:09 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote">On Sun, Aug 21, 2016 at 10:56 AM, Jérémy REKIER<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:jrekier@gmail.com" target="_blank" class="">jrekier@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><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;"><div style="word-wrap: break-word;" class=""><div class="">Hi Matthew,</div><div class=""><br class=""></div><div class="">Thanks for your reply.</div><div class="">I went down hunting for other possible mpi installs and might have identified the culprit as being the mpi4py installed via anaconda package management. </div><div class="">But now, after recompiling PETSc, I have another problem which I can’t really identify:</div><div class=""><br class=""></div><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" class=""><div class=""><font color="#00f900" class="">jrek@MacJerem:petsc4py$<span class="Apple-converted-space"> </span></font><font color="#0433ff" class="">python setup.py build</font><br class="">running build<br class="">running build_src<br class="">running build_py<br class="">running build_ext<br class="">PETSC_DIR: /Users/jrek/softs/petsc<br class="">PETSC_ARCH: arch-darwin-c-<wbr class="">opt<br class="">version: 3.7.3 development<br class="">integer-size: 32-bit<br class="">scalar-type: complex<br class="">precision: double<br class="">language: CONLY<br class="">compiler: mpicc<br class="">linker: mpicc<br class="">building 'PETSc' extension<br class="">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 class="">include -arch x86_64 -DPETSC_DIR=/Users/jrek/softs/<wbr class="">petsc -I/usr/local/Cellar/open-mpi/<wbr class="">1.10.3/include -I/usr/local/opt/openssl/<wbr class="">include -I/opt/X11/include -I/usr/local/include -I/Users/jrek/softs/petsc/<wbr class="">arch-darwin-c-opt/include -I/Users/jrek/softs/petsc/<wbr class="">include -Isrc/include -I/Users/jrek/miniconda3/lib/<wbr class="">python3.5/site-packages/numpy/<wbr class="">core/include -I/Users/jrek/miniconda3/<wbr class="">include/python3.5m -c src/PETSc.c -o build/temp.macosx-10.6-x86_64-<wbr class="">3.5/arch-darwin-c-opt/src/<wbr class="">PETSc.o<br class="">In file included from src/PETSc.c:3:<br class="">In file included from src/petsc4py.PETSc.c:273:<br class="">In file included from src/include/custom.h:8:<br class=""><font color="#ff2600" class="">In file included from /Users/jrek/softs/petsc/<wbr class="">include/petsc/private/matimpl.<wbr class="">h:6:<br class="">/Users/jrek/softs/petsc/<wbr class="">include/petscmatcoarsen.h:33:<wbr class="">16: error: redefinition of '_PetscCDIntNd'<br class="">typedef struct _PetscCDIntNd{<br class=""> ^<br class="">/usr/local/include/petscmat.h:<wbr class="">1322:16: note: previous definition is here<br class="">typedef struct _PetscCDIntNd{<br class=""> ^<br class="">In file included from src/PETSc.c:3:<br class="">In file included from src/petsc4py.PETSc.c:273:<br class="">In file included from src/include/custom.h:8:<br class="">In file included from /Users/jrek/softs/petsc/<wbr class="">include/petsc/private/matimpl.<wbr class="">h:6:<br class="">/Users/jrek/softs/petsc/<wbr class="">include/petscmatcoarsen.h:36:<wbr class="">2: error: typedef redefinition with different types ('struct (anonymous struct at<br class=""> /Users/jrek/softs/petsc/<wbr class="">include/petscmatcoarsen.h:33:<wbr class="">16)' vs 'struct _PetscCDIntNd')<br class="">}PetscCDIntNd;</font><br class=""><br class=""></div></blockquote>And many subsequent errors. I have never had that one before and I have no clue of what to do to solve it.<div class="">Any thought. </div></div></blockquote><div class=""><br class=""></div><div class="">This is very similar. You have two inconsistent PETSc installs. One in</div><div class=""><br class=""></div><div class=""> <span style="color: rgb(255, 38, 0);" class="">/Users/jrek/softs/petsc/</span></div><div class=""><span style="color: rgb(255, 38, 0);" class=""><br class=""></span></div><div class="">and one in</div><div class=""><br class=""></div><div class=""> <span style="color: rgb(255, 38, 0);" class="">/usr/local/</span></div><div class=""><br class=""></div><div class="">Get rid of the use/local one.</div><div class=""><br class=""></div><div class=""> <span class="Apple-converted-space"> </span>Thanks,</div><div class=""><br class=""></div><div class=""> Matt</div><div class=""><br class=""></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;"><div style="word-wrap: break-word;" class=""><div class="">Thanks very much.</div><div class="">Cheers,<br class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 21 Aug 2016, at 5:35 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" class="">knepley@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote">On Sun, Aug 21, 2016 at 10:04 AM, Jérémy REKIER<span class=""> </span><span dir="ltr" class=""><<a href="mailto:jrekier@gmail.com" target="_blank" class="">jrekier@gmail.com</a>></span><span class=""> </span>wro<wbr class="">te:<br class=""><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;"><div style="word-wrap: break-word;" class=""><br class="">Dear support team,<div class=""><br class=""></div><div class="">I am trying to install petsc4py on top of my miniconda3 python environment. </div><div class=""><br class=""></div><div class="">I recently filed an <a href="https://bitbucket.org/petsc/petsc4py/issues/50/cannot-pass-runtestpy#comment-30006281" target="_blank" class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Now, I seem to compile PETSc without trouble. Configuration step produces the following output:</div><div class=""><br class=""></div><div class=""><br class=""></div><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" class=""><div class=""><font color="#00f900" class="">jrek@MacJerem:petsc$</font><font color="#0433ff" class=""><span class=""> </span>python2.7 ./configure --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 --with-scalar-type=complex --download-scalapack --download-mumps</font></div><div class="">==============================<wbr class="">==============================<wbr class="">===================<br class=""> Configuring PETSc to compile on your system <br class="">==============================<wbr class="">==============================<wbr class="">===================<br class="">Compilers: <br class=""> C Compiler: mpicc -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -Qunused-arguments -fvisibility=hidden -g3 <br class=""> C++ Compiler: mpicxx -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fvisibility=hidden -g <br class=""> Fortran Compiler: mpif90 -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g <br class="">Linkers:<br class=""> 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 class=""> 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 class="">make:<br class="">BLAS/LAPACK: -llapack -lblas<br class="">MPI:<br class=""> Includes: -I/usr/local/Cellar/open-mpi/1<wbr class="">.10.3/include<br class="">cmake:<br class=""> Arch: <br class="">hwloc:<br class=""> Includes: -I/usr/local/include<br class=""> Library: -Wl,-rpath,/usr/lo<wbr class="">cal/lib -L/usr/local/lib -lhwloc<br class="">scalapack:<br class=""> Library: -Wl,-rpath,/Users/<wbr class="">jrek/softs/petsc/arch-darwin-c<wbr class="">-opt/lib -L/Users/jrek/softs/petsc/arch<wbr class="">-darwin-c-opt/lib -lscalapack<br class="">MUMPS:<br class=""> Includes: -I/Users/jrek/softs/petsc/arch<wbr class="">-darwin-c-opt/include<br class=""> Library: -Wl,-rpath,/Users/<wbr class="">jrek/softs/petsc/arch-darwin-c<wbr class="">-opt/lib -L/Users/jrek/softs/petsc/arch<wbr class="">-darwin-c-opt/lib -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord<br class="">X:<br class=""> Includes: -I/opt/X11/include<br class=""> Library: -Wl,-rpath,/opt/X1<wbr class="">1/lib -L/opt/X11/lib -lX11<br class="">pthread:<br class="">sowing:<br class="">ssl:<br class=""> Includes: -I/usr/local/opt/openssl/inclu<wbr class="">de<br class=""> Library: -Wl,-rpath,/usr/lo<wbr class="">cal/opt/openssl/lib -L/usr/local/opt/openssl/lib -lssl -lcrypto<br class="">PETSc:<br class=""> PETSC_ARCH: arch-darwin-c-opt<br class=""> PETSC_DIR: /Users/jrek/softs/petsc<br class=""> Scalar type: complex<br class=""> Precision: double<br class=""> Clanguage: C<br class=""> Integer size: 32<br class=""> shared libraries: enabled<br class=""> Memory alignment: 16<br class="">xxx===========================<wbr class="">==============================<wbr class="">================xxx<br class=""> Configure stage complete. Now build PETSc libraries with (gnumake build):<br class=""> make PETSC_DIR=/Users/jrek/softs/pe<wbr class="">tsc PETSC_ARCH=arch-darwin-c-opt all<br class="">xxx===========================<wbr class="">==============================<wbr class="">================xxx</div><div class=""><br class=""></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 class=""><br class=""></div><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" class=""><div class=""><font color="#00f900" class="">jrek@MacJerem:petsc4py$</font><font color="#0433ff" class=""><span class=""> </span>python setup.py install </font><br class="">running install<br class="">running build<br class="">running build_src<br class="">running build_py<br class="">running build_ext<br class="">PETSC_DIR: /Users/jrek/softs/petsc<br class="">PETSC_ARCH: arch-darwin-c-op<wbr class="">t<br class="">version: 3.7.3 development<br class="">integer-size: 32-bit<br class="">scalar-type: complex<br class="">precision: double<br class="">language: CONLY<br class="">compiler: mpicc<br class="">linker: mpicc<br class="">building 'PETSc' extension<br class="">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/inclu<wbr class="">de -arch x86_64 -DPETSC_DIR=/Users/jrek/softs/<wbr class="">petsc -I/usr/local/Cellar/open-mpi/1<wbr class="">.10.3/include -I/usr/local/opt/openssl/inclu<wbr class="">de -I/opt/X11/include -I/usr/local/include -I/Users/jrek/softs/petsc/arch<wbr class="">-darwin-c-opt/include -I/Users/jrek/softs/petsc/incl<wbr class="">ude -Isrc/include -I/Users/jrek/miniconda3/lib/p<wbr class="">ython3.5/site-packages/numpy/c<wbr class="">ore/include -I/Users/jrek/miniconda3/inclu<wbr class="">de/python3.5m -c src/PETSc.c -o build/temp.macosx-10.6-x86_64-<wbr class="">3.5/arch-darwin-c-opt/src/PETS<wbr class="">c.o<br class="">In file included from src/PETSc.c:3:<br class="">In file included from src/petsc4py.PETSc.c:271:<br class="">In file included from /usr/local/include/petsc.h:5:<br class="">In file included from /usr/local/include/petscbag.h:<wbr class="">4:<br class=""><font color="#ff2600" class="">/usr/local/include/petscsys.h:<wbr class="">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 class=""># 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 class=""><div class=""><br class=""></div><div class="">Plus other errors which I think have good chances of being due to this one. </div><div class=""><br class=""></div><div class="">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 class="">How can be sure of the “mpi.h” that I am using and would specify one solve my problem ? </div></div></div></blockquote><div class=""><br class=""></div><div class="">I believe this can happen because Python is not always as careful about letting default include directories sneak in since they believe</div><div class="">you should always be using them.</div><div class=""><br class=""></div><div class="">So the MPI that PETSc used was</div><div class=""><br class=""></div><div class=""> <span class="Apple-converted-space"> </span>mpicc in your path</div><div class=""> <span class="Apple-converted-space"> </span>Includes: -I/usr/local/Cellar/open-mpi/1<wbr class="">.10.3/include<br class=""></div><div class=""><br class=""></div><div class="">but I bet that you have</div><div class=""><br class=""></div><div class=""> <span class="Apple-converted-space"> </span>/use/include/mpi.h</div><div class=""><br class=""></div><div class="">as well. I guess its also possible that you have a slightly different path when you installed petsc4py</div><div class="">than when you installed PETSc, and this causes two different 'mpicc' to be picked up.</div><div class=""><br class=""></div><div class="">I would say that having multiple installs of MPI is always the road to disaster.</div><div class=""><br class=""></div><div class=""> Matt</div><div class=""> </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;"><div style="word-wrap: break-word;" class=""><div class=""><div class="">Any help would be greatly appreciated as this is slowly driving me insane :)</div><div class="">Thanks very much in advance :D</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Jerem </div></div></div></blockquote></div><span class=""><font color="#888888" class="">--<span class=""> </span><br class=""><div data-smartmail="gmail_signature" class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div></font></span></div></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space"> </span><br class=""><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 class="">-- Norbert Wiener</div></div></div></div></blockquote></div><br class=""></body></html>