module fd4_globaldef_mod module fd4_mpi_modVariables:
integer (kind=MPI_ADDRESS_KIND), private, allocatable, dimension (:) :: displ integer, private, allocatable, dimension (:) :: blens integer, private, allocatable, dimension (:) :: typesSubroutines and functions:
public subroutine fd4_comm_build_array_type (ext, stride, sbnd, sdata_type, err) private subroutine fd4_comm_alloc_helpers (len)
Preprocessor options:
Author: Matthias Lieber
public subroutine fd4_comm_build_array_type (ext, stride, sbnd, sdata_type, err) integer (kind=i_k), intent(in), dimension (0:3) :: ext integer (kind=i_k), intent(in), dimension (:,:) :: stride integer (kind=i_k), intent(in), dimension (3,2) :: sbnd integer, intent(out) :: sdata_type integer (kind=i_k), intent(out) :: err end subroutine fd4_comm_build_array_typeParameters:
ext | extents of the sdata array |
stride | stride to select subsets of the array for the datatype |
sbnd | bounds to select a spatial subset |
sdata_type | the MPI datatype for the array |
err | error status: 0...ok |
The stride on 1st dimension is defined with stride, e.g.:
stride(1,1:2) = (/ 1,2 /) ! start end end index of one contiguous subsection stride(2,1:2) = (/ 4,4 /) stride(3,1:2) = (/ 7,9 /)selects the following values from dimension 0 of the array, assuming size 9:
123456789 xx x xxx
The implementation uses MPI_Type_create_subarray (MPI-2) unless FD4_NO_MPI_TYPE_CREATE_SUBARRAY is set. The resulting data type is not commited!
private subroutine fd4_comm_alloc_helpers (len) integer, intent(in) :: len end subroutine fd4_comm_alloc_helpersAllocate module variables blens, types, displ.
Internal routine.