Commit 4a571ad7 authored by Keith Bennett's avatar Keith Bennett

Merge branch 'chris/par_array_write' into 'master'

Added parallel write of arrays

See merge request !29
parents 58c81ee2 5f44efa7
......@@ -164,6 +164,7 @@ MODULE sdf
PUBLIC :: sdf_write_matvar
PUBLIC :: sdf_write_species
PUBLIC :: sdf_write_srl
PUBLIC :: sdf_write_array
PUBLIC :: sdf_write_plain_mesh
PUBLIC :: sdf_write_plain_variable
PUBLIC :: sdf_write_point_mesh
......
......@@ -45,6 +45,21 @@ MODULE sdf_output
write_2d_array_character
END INTERFACE sdf_write_srl
INTERFACE sdf_write_array
MODULE PROCEDURE write_1d_array_real_spec_r8_par
MODULE PROCEDURE write_2d_array_real_spec_r8_par
MODULE PROCEDURE write_3d_array_real_spec_r8_par
MODULE PROCEDURE write_1d_array_real_spec_r4_par
MODULE PROCEDURE write_2d_array_real_spec_r4_par
MODULE PROCEDURE write_3d_array_real_spec_r4_par
MODULE PROCEDURE write_1d_array_real_r8_par
MODULE PROCEDURE write_2d_array_real_r8_par
MODULE PROCEDURE write_3d_array_real_r8_par
MODULE PROCEDURE write_1d_array_real_r4_par
MODULE PROCEDURE write_2d_array_real_r4_par
MODULE PROCEDURE write_3d_array_real_r4_par
END INTERFACE sdf_write_array
INTERFACE sdf_write_cpu_split
MODULE PROCEDURE &
write_cpu_split_1d, &
......
......@@ -175,4 +175,301 @@ CONTAINS
END SUBROUTINE write_2d_array_real_r4
SUBROUTINE write_1d_array_real_spec_r4_par(h, id, name, sz, array, &
distribution, subarray)
INTEGER, PARAMETER :: ndims = 1
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
INTEGER, DIMENSION(ndims), INTENT(IN) :: sz
REAL(r4), DIMENSION(:), INTENT(IN) :: array
INTEGER, INTENT(IN) :: distribution, subarray
INTEGER :: errcode
TYPE(sdf_block_type), POINTER :: b
CALL sdf_get_next_block(h)
b => h%current_block
b%type_size = sof
b%datatype = datatype_real
b%mpitype = mpitype_real
b%ndims = ndims
b%dims(1:ndims) = sz
! Write header
CALL write_array_meta(h, id, name)
! Write data
h%current_location = b%data_location
CALL MPI_FILE_SET_VIEW(h%filehandle, h%current_location, MPI_BYTE, &
distribution, 'native', MPI_INFO_NULL, errcode)
CALL MPI_FILE_WRITE_ALL(h%filehandle, array, 1, subarray, &
MPI_STATUS_IGNORE, errcode)
CALL MPI_FILE_SET_VIEW(h%filehandle, c_off0, MPI_BYTE, MPI_BYTE, 'native', &
MPI_INFO_NULL, errcode)
h%current_location = b%data_location + b%data_length
b%done_data = .TRUE.
END SUBROUTINE write_1d_array_real_spec_r4_par
SUBROUTINE write_1d_array_real_r4_par(h, id, name, array, &
sz, local_starts, local_ghosts, null_proc)
INTEGER, PARAMETER :: ndims = 1
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
REAL(r4), DIMENSION(:), INTENT(IN) :: array
INTEGER, DIMENSION(ndims), INTENT(IN) :: sz, local_starts
INTEGER, DIMENSION(2*ndims), INTENT(IN), OPTIONAL :: local_ghosts
LOGICAL, INTENT(IN), OPTIONAL :: null_proc
INTEGER, DIMENSION(2*ndims) :: ghosts
INTEGER, DIMENSION(ndims) :: starts, sizes, subsizes
INTEGER :: distribution, subarray, errcode
LOGICAL :: not_this_processor
not_this_processor = .FALSE.
IF (PRESENT(null_proc)) THEN
not_this_processor = null_proc
ELSE IF (ANY(local_starts < 0)) THEN
not_this_processor = .TRUE.
END IF
IF (.NOT. not_this_processor) THEN
ghosts = 0
IF (PRESENT(local_ghosts)) ghosts = local_ghosts
starts = local_starts - 1
sizes = sz
subsizes = SHAPE(array) - ghosts(1:ndims) - ghosts(ndims+1:)
CALL MPI_TYPE_CREATE_SUBARRAY(ndims, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, mpitype_real, distribution, errcode)
CALL MPI_TYPE_COMMIT(distribution, errcode)
! Subsizes are unchanged
starts = ghosts(1:ndims)
sizes = SHAPE(array)
CALL MPI_TYPE_CREATE_SUBARRAY(ndims, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, mpitype_real, subarray, errcode)
CALL MPI_TYPE_COMMIT(subarray, errcode)
ELSE
CALL MPI_TYPE_CONTIGUOUS(0, mpitype_real, distribution, errcode)
CALL MPI_TYPE_COMMIT(distribution, errcode)
subarray = distribution
END IF
CALL write_1d_array_real_spec_r4_par(h, id, name, &
sz, array, distribution, subarray)
IF (subarray /= distribution) CALL MPI_TYPE_FREE(subarray, errcode)
CALL MPI_TYPE_FREE(distribution, errcode)
END SUBROUTINE write_1d_array_real_r4_par
SUBROUTINE write_2d_array_real_spec_r4_par(h, id, name, sz, array, &
distribution, subarray)
INTEGER, PARAMETER :: ndims = 2
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
INTEGER, DIMENSION(ndims), INTENT(IN) :: sz
REAL(r4), DIMENSION(:,:), INTENT(IN) :: array
INTEGER, INTENT(IN) :: distribution, subarray
INTEGER :: errcode
TYPE(sdf_block_type), POINTER :: b
CALL sdf_get_next_block(h)
b => h%current_block
b%type_size = sof
b%datatype = datatype_real
b%mpitype = mpitype_real
b%ndims = ndims
b%dims(1:ndims) = sz
! Write header
CALL write_array_meta(h, id, name)
! Write data
h%current_location = b%data_location
CALL MPI_FILE_SET_VIEW(h%filehandle, h%current_location, MPI_BYTE, &
distribution, 'native', MPI_INFO_NULL, errcode)
CALL MPI_FILE_WRITE_ALL(h%filehandle, array, 1, subarray, &
MPI_STATUS_IGNORE, errcode)
CALL MPI_FILE_SET_VIEW(h%filehandle, c_off0, MPI_BYTE, MPI_BYTE, 'native', &
MPI_INFO_NULL, errcode)
h%current_location = b%data_location + b%data_length
b%done_data = .TRUE.
END SUBROUTINE write_2d_array_real_spec_r4_par
SUBROUTINE write_2d_array_real_r4_par(h, id, name, array, &
sz, local_starts, local_ghosts, null_proc)
INTEGER, PARAMETER :: ndims = 2
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
REAL(r4), DIMENSION(:,:), INTENT(IN) :: array
INTEGER, DIMENSION(ndims), INTENT(IN) :: sz, local_starts
INTEGER, DIMENSION(2*ndims), INTENT(IN), OPTIONAL :: local_ghosts
LOGICAL, INTENT(IN), OPTIONAL :: null_proc
INTEGER, DIMENSION(2*ndims) :: ghosts
INTEGER, DIMENSION(ndims) :: starts, sizes, subsizes
INTEGER :: distribution, subarray, errcode
LOGICAL :: not_this_processor
not_this_processor = .FALSE.
IF (PRESENT(null_proc)) THEN
not_this_processor = null_proc
ELSE IF (ANY(local_starts < 0)) THEN
not_this_processor = .TRUE.
END IF
IF (.NOT. not_this_processor) THEN
ghosts = 0
IF (PRESENT(local_ghosts)) ghosts = local_ghosts
starts = local_starts - 1
sizes = sz
subsizes = SHAPE(array) - ghosts(1:ndims) - ghosts(ndims+1:)
CALL MPI_TYPE_CREATE_SUBARRAY(ndims, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, mpitype_real, distribution, errcode)
CALL MPI_TYPE_COMMIT(distribution, errcode)
! Subsizes are unchanged
starts = ghosts(1:ndims)
sizes = SHAPE(array)
CALL MPI_TYPE_CREATE_SUBARRAY(ndims, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, mpitype_real, subarray, errcode)
CALL MPI_TYPE_COMMIT(subarray, errcode)
ELSE
CALL MPI_TYPE_CONTIGUOUS(0, mpitype_real, distribution, errcode)
CALL MPI_TYPE_COMMIT(distribution, errcode)
subarray = distribution
END IF
CALL write_2d_array_real_spec_r4_par(h, id, name, &
sz, array, distribution, subarray)
IF (subarray /= distribution) CALL MPI_TYPE_FREE(subarray, errcode)
CALL MPI_TYPE_FREE(distribution, errcode)
END SUBROUTINE write_2d_array_real_r4_par
SUBROUTINE write_3d_array_real_spec_r4_par(h, id, name, sz, array, &
distribution, subarray)
INTEGER, PARAMETER :: ndims = 3
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
INTEGER, DIMENSION(ndims), INTENT(IN) :: sz
REAL(r4), DIMENSION(:,:,:), INTENT(IN) :: array
INTEGER, INTENT(IN) :: distribution, subarray
INTEGER :: errcode
TYPE(sdf_block_type), POINTER :: b
CALL sdf_get_next_block(h)
b => h%current_block
b%type_size = sof
b%datatype = datatype_real
b%mpitype = mpitype_real
b%ndims = ndims
b%dims(1:ndims) = sz
! Write header
CALL write_array_meta(h, id, name)
! Write data
h%current_location = b%data_location
CALL MPI_FILE_SET_VIEW(h%filehandle, h%current_location, MPI_BYTE, &
distribution, 'native', MPI_INFO_NULL, errcode)
CALL MPI_FILE_WRITE_ALL(h%filehandle, array, 1, subarray, &
MPI_STATUS_IGNORE, errcode)
CALL MPI_FILE_SET_VIEW(h%filehandle, c_off0, MPI_BYTE, MPI_BYTE, 'native', &
MPI_INFO_NULL, errcode)
h%current_location = b%data_location + b%data_length
b%done_data = .TRUE.
END SUBROUTINE write_3d_array_real_spec_r4_par
SUBROUTINE write_3d_array_real_r4_par(h, id, name, array, &
sz, local_starts, local_ghosts, null_proc)
INTEGER, PARAMETER :: ndims = 3
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
REAL(r4), DIMENSION(:,:,:), INTENT(IN) :: array
INTEGER, DIMENSION(ndims), INTENT(IN) :: sz, local_starts
INTEGER, DIMENSION(2*ndims), INTENT(IN), OPTIONAL :: local_ghosts
LOGICAL, INTENT(IN), OPTIONAL :: null_proc
INTEGER, DIMENSION(2*ndims) :: ghosts
INTEGER, DIMENSION(ndims) :: starts, sizes, subsizes
INTEGER :: distribution, subarray, errcode
LOGICAL :: not_this_processor
not_this_processor = .FALSE.
IF (PRESENT(null_proc)) THEN
not_this_processor = null_proc
ELSE IF (ANY(local_starts < 0)) THEN
not_this_processor = .TRUE.
END IF
IF (.NOT. not_this_processor) THEN
ghosts = 0
IF (PRESENT(local_ghosts)) ghosts = local_ghosts
starts = local_starts - 1
sizes = sz
subsizes = SHAPE(array) - ghosts(1:ndims) - ghosts(ndims+1:)
CALL MPI_TYPE_CREATE_SUBARRAY(ndims, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, mpitype_real, distribution, errcode)
CALL MPI_TYPE_COMMIT(distribution, errcode)
! Subsizes are unchanged
starts = ghosts(1:ndims)
sizes = SHAPE(array)
CALL MPI_TYPE_CREATE_SUBARRAY(ndims, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, mpitype_real, subarray, errcode)
CALL MPI_TYPE_COMMIT(subarray, errcode)
ELSE
CALL MPI_TYPE_CONTIGUOUS(0, mpitype_real, distribution, errcode)
CALL MPI_TYPE_COMMIT(distribution, errcode)
subarray = distribution
END IF
CALL write_3d_array_real_spec_r4_par(h, id, name, &
sz, array, distribution, subarray)
IF (subarray /= distribution) CALL MPI_TYPE_FREE(subarray, errcode)
CALL MPI_TYPE_FREE(distribution, errcode)
END SUBROUTINE write_3d_array_real_r4_par
END MODULE sdf_output_r4
......@@ -175,4 +175,301 @@ CONTAINS
END SUBROUTINE write_2d_array_real_r8
SUBROUTINE write_1d_array_real_spec_r8_par(h, id, name, sz, array, &
distribution, subarray)
INTEGER, PARAMETER :: ndims = 1
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
INTEGER, DIMENSION(ndims), INTENT(IN) :: sz
REAL(r8), DIMENSION(:), INTENT(IN) :: array
INTEGER, INTENT(IN) :: distribution, subarray
INTEGER :: errcode
TYPE(sdf_block_type), POINTER :: b
CALL sdf_get_next_block(h)
b => h%current_block
b%type_size = sof
b%datatype = datatype_real
b%mpitype = mpitype_real
b%ndims = ndims
b%dims(1:ndims) = sz
! Write header
CALL write_array_meta(h, id, name)
! Write data
h%current_location = b%data_location
CALL MPI_FILE_SET_VIEW(h%filehandle, h%current_location, MPI_BYTE, &
distribution, 'native', MPI_INFO_NULL, errcode)
CALL MPI_FILE_WRITE_ALL(h%filehandle, array, 1, subarray, &
MPI_STATUS_IGNORE, errcode)
CALL MPI_FILE_SET_VIEW(h%filehandle, c_off0, MPI_BYTE, MPI_BYTE, 'native', &
MPI_INFO_NULL, errcode)
h%current_location = b%data_location + b%data_length
b%done_data = .TRUE.
END SUBROUTINE write_1d_array_real_spec_r8_par
SUBROUTINE write_1d_array_real_r8_par(h, id, name, array, &
sz, local_starts, local_ghosts, null_proc)
INTEGER, PARAMETER :: ndims = 1
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
REAL(r8), DIMENSION(:), INTENT(IN) :: array
INTEGER, DIMENSION(ndims), INTENT(IN) :: sz, local_starts
INTEGER, DIMENSION(2*ndims), INTENT(IN), OPTIONAL :: local_ghosts
LOGICAL, INTENT(IN), OPTIONAL :: null_proc
INTEGER, DIMENSION(2*ndims) :: ghosts
INTEGER, DIMENSION(ndims) :: starts, sizes, subsizes
INTEGER :: distribution, subarray, errcode
LOGICAL :: not_this_processor
not_this_processor = .FALSE.
IF (PRESENT(null_proc)) THEN
not_this_processor = null_proc
ELSE IF (ANY(local_starts < 0)) THEN
not_this_processor = .TRUE.
END IF
IF (.NOT. not_this_processor) THEN
ghosts = 0
IF (PRESENT(local_ghosts)) ghosts = local_ghosts
starts = local_starts - 1
sizes = sz
subsizes = SHAPE(array) - ghosts(1:ndims) - ghosts(ndims+1:)
CALL MPI_TYPE_CREATE_SUBARRAY(ndims, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, mpitype_real, distribution, errcode)
CALL MPI_TYPE_COMMIT(distribution, errcode)
! Subsizes are unchanged
starts = ghosts(1:ndims)
sizes = SHAPE(array)
CALL MPI_TYPE_CREATE_SUBARRAY(ndims, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, mpitype_real, subarray, errcode)
CALL MPI_TYPE_COMMIT(subarray, errcode)
ELSE
CALL MPI_TYPE_CONTIGUOUS(0, mpitype_real, distribution, errcode)
CALL MPI_TYPE_COMMIT(distribution, errcode)
subarray = distribution
END IF
CALL write_1d_array_real_spec_r8_par(h, id, name, &
sz, array, distribution, subarray)
IF (subarray /= distribution) CALL MPI_TYPE_FREE(subarray, errcode)
CALL MPI_TYPE_FREE(distribution, errcode)
END SUBROUTINE write_1d_array_real_r8_par
SUBROUTINE write_2d_array_real_spec_r8_par(h, id, name, sz, array, &
distribution, subarray)
INTEGER, PARAMETER :: ndims = 2
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
INTEGER, DIMENSION(ndims), INTENT(IN) :: sz
REAL(r8), DIMENSION(:,:), INTENT(IN) :: array
INTEGER, INTENT(IN) :: distribution, subarray
INTEGER :: errcode
TYPE(sdf_block_type), POINTER :: b
CALL sdf_get_next_block(h)
b => h%current_block
b%type_size = sof
b%datatype = datatype_real
b%mpitype = mpitype_real
b%ndims = ndims
b%dims(1:ndims) = sz
! Write header
CALL write_array_meta(h, id, name)
! Write data
h%current_location = b%data_location
CALL MPI_FILE_SET_VIEW(h%filehandle, h%current_location, MPI_BYTE, &
distribution, 'native', MPI_INFO_NULL, errcode)
CALL MPI_FILE_WRITE_ALL(h%filehandle, array, 1, subarray, &
MPI_STATUS_IGNORE, errcode)
CALL MPI_FILE_SET_VIEW(h%filehandle, c_off0, MPI_BYTE, MPI_BYTE, 'native', &
MPI_INFO_NULL, errcode)
h%current_location = b%data_location + b%data_length
b%done_data = .TRUE.
END SUBROUTINE write_2d_array_real_spec_r8_par
SUBROUTINE write_2d_array_real_r8_par(h, id, name, array, &
sz, local_starts, local_ghosts, null_proc)
INTEGER, PARAMETER :: ndims = 2
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
REAL(r8), DIMENSION(:,:), INTENT(IN) :: array
INTEGER, DIMENSION(ndims), INTENT(IN) :: sz, local_starts
INTEGER, DIMENSION(2*ndims), INTENT(IN), OPTIONAL :: local_ghosts
LOGICAL, INTENT(IN), OPTIONAL :: null_proc
INTEGER, DIMENSION(2*ndims) :: ghosts
INTEGER, DIMENSION(ndims) :: starts, sizes, subsizes
INTEGER :: distribution, subarray, errcode
LOGICAL :: not_this_processor
not_this_processor = .FALSE.
IF (PRESENT(null_proc)) THEN
not_this_processor = null_proc
ELSE IF (ANY(local_starts < 0)) THEN
not_this_processor = .TRUE.
END IF
IF (.NOT. not_this_processor) THEN
ghosts = 0
IF (PRESENT(local_ghosts)) ghosts = local_ghosts
starts = local_starts - 1
sizes = sz
subsizes = SHAPE(array) - ghosts(1:ndims) - ghosts(ndims+1:)
CALL MPI_TYPE_CREATE_SUBARRAY(ndims, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, mpitype_real, distribution, errcode)
CALL MPI_TYPE_COMMIT(distribution, errcode)
! Subsizes are unchanged
starts = ghosts(1:ndims)
sizes = SHAPE(array)
CALL MPI_TYPE_CREATE_SUBARRAY(ndims, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, mpitype_real, subarray, errcode)
CALL MPI_TYPE_COMMIT(subarray, errcode)
ELSE
CALL MPI_TYPE_CONTIGUOUS(0, mpitype_real, distribution, errcode)
CALL MPI_TYPE_COMMIT(distribution, errcode)
subarray = distribution
END IF
CALL write_2d_array_real_spec_r8_par(h, id, name, &
sz, array, distribution, subarray)
IF (subarray /= distribution) CALL MPI_TYPE_FREE(subarray, errcode)
CALL MPI_TYPE_FREE(distribution, errcode)
END SUBROUTINE write_2d_array_real_r8_par
SUBROUTINE write_3d_array_real_spec_r8_par(h, id, name, sz, array, &
distribution, subarray)
INTEGER, PARAMETER :: ndims = 3
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
INTEGER, DIMENSION(ndims), INTENT(IN) :: sz
REAL(r8), DIMENSION(:,:,:), INTENT(IN) :: array
INTEGER, INTENT(IN) :: distribution, subarray
INTEGER :: errcode
TYPE(sdf_block_type), POINTER :: b
CALL sdf_get_next_block(h)
b => h%current_block
b%type_size = sof
b%datatype = datatype_real
b%mpitype = mpitype_real
b%ndims = ndims
b%dims(1:ndims) = sz
! Write header
CALL write_array_meta(h, id, name)
! Write data
h%current_location = b%data_location
CALL MPI_FILE_SET_VIEW(h%filehandle, h%current_location, MPI_BYTE, &
distribution, 'native', MPI_INFO_NULL, errcode)
CALL MPI_FILE_WRITE_ALL(h%filehandle, array, 1, subarray, &
MPI_STATUS_IGNORE, errcode)
CALL MPI_FILE_SET_VIEW(h%filehandle, c_off0, MPI_BYTE, MPI_BYTE, 'native', &
MPI_INFO_NULL, errcode)
h%current_location = b%data_location + b%data_length
b%done_data = .TRUE.
END SUBROUTINE write_3d_array_real_spec_r8_par
SUBROUTINE write_3d_array_real_r8_par(h, id, name, array, &
sz, local_starts, local_ghosts, null_proc)
INTEGER, PARAMETER :: ndims = 3
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
REAL(r8), DIMENSION(:,:,:), INTENT(IN) :: array
INTEGER, DIMENSION(ndims), INTENT(IN) :: sz, local_starts
INTEGER, DIMENSION(2*ndims), INTENT(IN), OPTIONAL :: local_ghosts
LOGICAL, INTENT(IN), OPTIONAL :: null_proc
INTEGER, DIMENSION(2*ndims) :: ghosts
INTEGER, DIMENSION(ndims) :: starts, sizes, subsizes
INTEGER :: distribution, subarray, errcode
LOGICAL :: not_this_processor
not_this_processor = .FALSE.
IF (PRESENT(null_proc)) THEN
not_this_processor = null_proc
ELSE IF (ANY(local_starts < 0)) THEN
not_this_processor = .TRUE.
END IF
IF (.NOT. not_this_processor) THEN
ghosts = 0
IF (PRESENT(local_ghosts)) ghosts = local_ghosts
starts = local_starts - 1
sizes = sz
subsizes = SHAPE(array) - ghosts(1:ndims) - ghosts(ndims+1:)
CALL MPI_TYPE_CREATE_SUBARRAY(ndims, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, mpitype_real, distribution, errcode)
CALL MPI_TYPE_COMMIT(distribution, errcode)
! Subsizes are unchanged
starts = ghosts(1:ndims)
sizes = SHAPE(array)
CALL MPI_TYPE_CREATE_SUBARRAY(ndims, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, mpitype_real, subarray, errcode)
CALL MPI_TYPE_COMMIT(subarray, errcode)
ELSE
CALL MPI_TYPE_CONTIGUOUS(0, mpitype_real, distribution, errcode)
CALL MPI_TYPE_COMMIT(distribution, errcode)
subarray = distribution
END IF
CALL write_3d_array_real_spec_r8_par(h, id, name, &
sz, array, distribution, subarray)
IF (subarray /= distribution) CALL MPI_TYPE_FREE(subarray, errcode)
CALL MPI_TYPE_FREE(distribution, errcode)
END SUBROUTINE write_3d_array_real_r8_par
END MODULE sdf_output_r8
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment