Initialize the MPI environment
subroutine comm_start use mod_global_parameters integer(kind=MPI_ADDRESS_KIND) :: lb integer(kind=MPI_ADDRESS_KIND) :: sizes ! Each process stores its rank, which ranges from 0 to N-1, where N is the ! number of processes. call MPI_COMM_RANK(MPI_COMM_WORLD,mype,ierrmpi) ! Store the number of processes call MPI_COMM_SIZE(MPI_COMM_WORLD,npe,ierrmpi) ! Use the default communicator, which contains all the processes icomm = MPI_COMM_WORLD ! Get size of double/integer call MPI_TYPE_GET_EXTENT(MPI_REAL,lb,sizes,ierrmpi) if (sizes /= size_real) call mpistop("Incompatible real size") call MPI_TYPE_GET_EXTENT(MPI_DOUBLE_PRECISION,lb,sizes,ierrmpi) if (sizes /= size_double) call mpistop("Incompatible double size") call MPI_TYPE_GET_EXTENT(MPI_INTEGER,lb,sizes,ierrmpi) if (sizes /= size_int) call mpistop("Incompatible integer size") call MPI_TYPE_GET_EXTENT(MPI_LOGICAL,lb,sizes,ierrmpi) if (sizes /= size_logical) call mpistop("Incompatible logical size") end subroutine comm_start