dear all,<br><br>For some parallellization project I am adapting example 10 of the SNES tutorials ($PETSC_DIR/src/snes/examples/tutorials/ex10d/). Since the project is writted in Fortran, and am trying to rewrite the example in Fortran.<br>
<br>So far little issues, but the MPI_Scan routine gives me some more problems. In the said example, the call is like<br><br>ierr = MPI_Scan(&amp;user.Nvlocal,&amp;rstart,1,MPIU_INT,MPI_SUM,PETSC_COMM_WORLD);CHKERRQ(ierr);<br>
<br>For Fortran I rewrote it a little to look like<br>call MPI_Scan(user%Nvlocal,rstart,1,MPIU_INT,MPI_SUM, PETSC_COMM_WORLD, ierr)<br><br>The program compiles without troubles, but running it gives me an error. It is, I think, related to the MPI_SUM operation:<br>
[walrus:463] *** An error occurred in MPI_Scan: the reduction operation 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 not required for the C program.<br><br>Am I missing a crucial header file with definitions? The solution will probably be very simple and straightforward, but I seem to overlook it. Any help will be greatly appreciated.<br>
<br>regards,<br>Wienand Drenth<br><br>