<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Sep 14, 2014 at 4:16 PM, Pierre Jolivet <span dir="ltr"><<a href="mailto:jolivet@ann.jussieu.fr" target="_blank">jolivet@ann.jussieu.fr</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">Hello,<br>
Could you please explain to me why the following example is not working properly when <petsc.h> (from master, with OpenMPI 1.8.1) is included ?<br>
<br>
$ mpicxx in-place.cpp  -I$PETSC_DIR/include -I$PETSC_DIR/$PETSC_ARCH/include -L$PETSC_DIR/$PETSC_ARCH/lib -lpetsc<br>
$ mpirun -np 2 ./a.out<br>
Done with the scatter !<br>
0 0 0 0 (this line should be filled with 0)<br>
1 1 1 1 (this line should be filled with 1)<br>
Done with the gather !<br>
<br>
$ mpicxx in-place.cpp  -I$PETSC_DIR/include -I$PETSC_DIR/$PETSC_ARCH/include -L$PETSC_DIR/$PETSC_ARCH/lib -lpetsc -DPETSC_BUG<br>
$ mpirun -np 2 ./a.out<br>
[:3367] *** An error occurred in MPI_Type_size<br>
[:3367] *** reported by process [4819779585,140733193388032]<br>
[:3367] *** on communicator MPI_COMM_WORLD<br>
[:3367] *** MPI_ERR_TYPE: invalid datatype<br>
[:3367] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,<br>
[:3367] ***    and potentially your MPI job)<br></blockquote><div><br></div><div>I just built this with MPICH and it runs fine:</div><div><br></div><div><div>master:/PETSc3/petsc/petsc-pylith$ /PETSc3/petsc/petsc-pylith/arch-pylith-cxx-debug/bin/mpiexec -host localhost -n 2 /PETSc3/petsc/petsc-pylith/arch-pylith-cxx-debug/lib/in-place-obj/in-place </div><div>Done with the scatter !</div><div>0 0 0 0 (this line should be filled with 0)</div><div>1 1 1 1 (this line should be filled with 1)</div><div>Done with the gather !</div></div><div><br></div><div>Will valgrind.</div><div><br></div><div>   Matt</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">
Thank you for looking,<br>
Pierre<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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>