- subroutine user_op( invec, outvec, count, datatype )
- implicit none
- include 'mpif.h'
- integer invec(*), outvec(*)
- integer count, datatype
- integer ii
-
- if (datatype .ne. MPI_INTEGER) then
- write(6,*) 'Invalid datatype passed to user_op()'
- return
- endif
-
- do ii=1, count
- outvec(ii) = invec(ii) * 2 + outvec(ii)
- enddo
-
- end
-