<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Aug 21, 2016 at 10:56 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"><div>Hi Matthew,</div><div><br></div><div>Thanks for your reply.</div><div>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>But now, after recompiling PETSc, I have another problem which I can’t really identify:</div><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 build</font><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:273:<br>In file included from src/include/custom.h:8:<br><font color="#ff2600">In file included from /Users/jrek/softs/petsc/<wbr>include/petsc/private/matimpl.<wbr>h:6:<br>/Users/jrek/softs/petsc/<wbr>include/petscmatcoarsen.h:33:<wbr>16: error: redefinition of '_PetscCDIntNd'<br>typedef struct _PetscCDIntNd{<br> ^<br>/usr/local/include/petscmat.h:<wbr>1322:16: note: previous definition is here<br>typedef struct _PetscCDIntNd{<br> ^<br>In file included from src/PETSc.c:3:<br>In file included from src/petsc4py.PETSc.c:273:<br>In file included from src/include/custom.h:8:<br>In file included from /Users/jrek/softs/petsc/<wbr>include/petsc/private/matimpl.<wbr>h:6:<br>/Users/jrek/softs/petsc/<wbr>include/petscmatcoarsen.h:36:<wbr>2: error: typedef redefinition with different types ('struct (anonymous struct at<br> /Users/jrek/softs/petsc/<wbr>include/petscmatcoarsen.h:33:<wbr>16)' vs 'struct _PetscCDIntNd')<br>}PetscCDIntNd;</font><br><br></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>Any thought. </div></div></blockquote><div><br></div><div>This is very similar. You have two inconsistent PETSc installs. One in</div><div><br></div><div> <span style="color:rgb(255,38,0)">/Users/jrek/softs/petsc/</span></div><div><span style="color:rgb(255,38,0)"><br></span></div><div>and one in</div><div><br></div><div> <span style="color:rgb(255,38,0)">/usr/local/</span></div><div><br></div><div>Get rid of the use/local one.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div><br></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>Thanks very much.</div><div>Cheers,<br><br><div><blockquote type="cite"><div>On 21 Aug 2016, at 5:35 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:</div><br><div><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"><div class="gmail_extra"><div class="gmail_quote">On Sun, Aug 21, 2016 at 10:04 AM, Jérémy REKIER<span> </span><span dir="ltr"><<a href="mailto:jrekier@gmail.com" target="_blank">jrekier@gmail.com</a>></span><span> </span>wro<wbr>te:<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"><span> </span>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/1<wbr>.10.3/include<br>cmake:<br> Arch: <br>hwloc:<br> Includes: -I/usr/local/include<br> Library: -Wl,-rpath,/usr/lo<wbr>cal/lib -L/usr/local/lib -lhwloc<br>scalapack:<br> Library: -Wl,-rpath,/Users/<wbr>jrek/softs/petsc/arch-darwin-c<wbr>-opt/lib -L/Users/jrek/softs/petsc/arch<wbr>-darwin-c-opt/lib -lscalapack<br>MUMPS:<br> Includes: -I/Users/jrek/softs/petsc/arch<wbr>-darwin-c-opt/include<br> Library: -Wl,-rpath,/Users/<wbr>jrek/softs/petsc/arch-darwin-c<wbr>-opt/lib -L/Users/jrek/softs/petsc/arch<wbr>-darwin-c-opt/lib -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord<br>X:<br> Includes: -I/opt/X11/include<br> Library: -Wl,-rpath,/opt/X1<wbr>1/lib -L/opt/X11/lib -lX11<br>pthread:<br>sowing:<br>ssl:<br> Includes: -I/usr/local/opt/openssl/inclu<wbr>de<br> Library: -Wl,-rpath,/usr/lo<wbr>cal/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/pe<wbr>tsc 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"><span> </span>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-op<wbr>t<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/inclu<wbr>de -arch x86_64 -DPETSC_DIR=/Users/jrek/softs/<wbr>petsc -I/usr/local/Cellar/open-mpi/1<wbr>.10.3/include -I/usr/local/opt/openssl/inclu<wbr>de -I/opt/X11/include -I/usr/local/include -I/Users/jrek/softs/petsc/arch<wbr>-darwin-c-opt/include -I/Users/jrek/softs/petsc/incl<wbr>ude -Isrc/include -I/Users/jrek/miniconda3/lib/p<wbr>ython3.5/site-packages/numpy/c<wbr>ore/include -I/Users/jrek/miniconda3/inclu<wbr>de/python3.5m -c src/PETSc.c -o build/temp.macosx-10.6-x86_64-<wbr>3.5/arch-darwin-c-opt/src/PETS<wbr>c.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/1<wbr>.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><span class=""><font color="#888888">--<span> </span><br><div 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></font></span></div></div></div></blockquote></div><br></div></div></blockquote></div><br><br clear="all"><div><br></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>