[petsc-dev] Including petsc.h breaks user code
Balay, Satish
balay at mcs.anl.gov
Sun Sep 14 17:42:17 CDT 2014
Did you build petsc with mpich or openmpi?
Do petsc examples work with petsc makefiles?
________________________________
From: Pierre Jolivet<mailto:jolivet at ann.jussieu.fr>
Sent: 9/14/2014 5:17 PM
To: For users of the development version of PETSc<mailto:petsc-dev at mcs.anl.gov>
Subject: [petsc-dev] Including petsc.h breaks user code
Hello,
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 ?
$ mpicxx in-place.cpp -I$PETSC_DIR/include -I$PETSC_DIR/$PETSC_ARCH/include -L$PETSC_DIR/$PETSC_ARCH/lib -lpetsc
$ mpirun -np 2 ./a.out
Done with the scatter !
0 0 0 0 (this line should be filled with 0)
1 1 1 1 (this line should be filled with 1)
Done with the gather !
$ mpicxx in-place.cpp -I$PETSC_DIR/include -I$PETSC_DIR/$PETSC_ARCH/include -L$PETSC_DIR/$PETSC_ARCH/lib -lpetsc -DPETSC_BUG
$ mpirun -np 2 ./a.out
[:3367] *** An error occurred in MPI_Type_size
[:3367] *** reported by process [4819779585,140733193388032]
[:3367] *** on communicator MPI_COMM_WORLD
[:3367] *** MPI_ERR_TYPE: invalid datatype
[:3367] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
[:3367] *** and potentially your MPI job)
Thank you for looking,
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140914/57d6df17/attachment.html>
More information about the petsc-dev
mailing list