<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>
<div>
<div style="font-family:Calibri,sans-serif; font-size:11pt">Did you build petsc with mpich or openmpi?<br>
<br>
Do petsc examples work with petsc makefiles?</div>
</div>
<div dir="ltr">
<hr>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">From:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt"><a href="mailto:jolivet@ann.jussieu.fr">Pierre Jolivet</a></span><br>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">Sent:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt">ý9/ý14/ý2014 5:17 PM</span><br>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">To:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt"><a href="mailto:petsc-dev@mcs.anl.gov">For users of the development version of PETSc</a></span><br>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">Subject:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt">[petsc-dev] Including petsc.h breaks user code</span><br>
<br>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">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>
<br>
Thank you for looking,<br>
Pierre<br>
<br>
</div>
</span></font>
</body>
</html>