I am working on a much bigger program where I struggle with MPI_Gather.
I wrote a minimal example code, see below.
program test
use MPI
integer
You have forgotten to add the return error code to the call to MPI_Gather as the last argument. The value of the return code is being written to an unmapped address.
It should read
call MPI_Gather(send, 1, MPI_DOUBLE_PRECISION, &
recv, 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
ifort catches this at the compilation stage. It looks like your compiler (gfortran?) doesn't