Satish, Jed,<br><br>Thank you for the replies and suggestions for a solution.<br><br>The MPI_INTEGER4 seems to work. However, the MPIU_INTEGER suggested by Satish gives the same error as did the MPIU_INT, though I include the petscsys.h. Could it relate to the Petsc version? For compatibility reasons I am using the 2.3.3 distribution.<br>
<br>regards,<br>Wienand<br><br><br><br><div class="gmail_quote">On Wed, Aug 24, 2011 at 10:20 PM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Wed, 24 Aug 2011, Jed Brown wrote:<br>
<br>
> On Wed, Aug 24, 2011 at 09:33, Wienand Drenth <<a href="mailto:w.drenth@gmail.com">w.drenth@gmail.com</a>> wrote:<br>
><br>
> > The program compiles without troubles, but running it gives me an error. It<br>
> > is, I think, related to the MPI_SUM operation:<br>
> > [walrus:463] *** An error occurred in MPI_Scan: the reduction operation<br>
> > MPI_SUM is not defined on the MPI_BYTE datatype<br>
> > [walrus:463] *** on communicator MPI_COMM_WORLD<br>
> > [walrus:463] *** MPI_ERR_OP: invalid reduce operation<br>
> > [walrus:463] *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)<br>
> ><br>
> > In addition, I needed to declare MPIU_INT explicitly as integer; this was<br>
> > not required for the C program.<br>
> ><br>
><br>
> I believe MPIU_INT (which is normally made to match PetscInt) is not defined<br>
> in Fortran. You can use MPI_INTEGER4 or MPI_INTEGER8 as needed.<br>
><br>
> Perhaps PETSc should define MPIU_INT, MPIU_SCALAR, etc in Fortran too?<br>
<br>
</div></div>MPI does MPI_INT (c) vs MPI_INTEGER (fortran) - so we have<br>
MPIU_INTEGER on the fortran side. [in finclude/petscsys.h]<br>
<br>
And we do have MPIU_SCALAR on the fortran side.<br>
<br>
Satish<br>
<br>
><br>
<br>
</blockquote></div>