Revert "Addressed Fortran issues with promoted integers and reals via compil…" (#4220)

This reverts commit 06c42ff0385b34317ecdc06b6aaf6e435fbc07ca.
This commit is contained in:
Scot Breitenfeld 2024-03-23 09:16:43 -05:00 committed by GitHub
parent 86ca181bd8
commit c1a56f432e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
30 changed files with 205 additions and 315 deletions

View File

@ -84,9 +84,8 @@ CONTAINS
CHARACTER(LEN=10) :: space
INTEGER :: spaces ! Number of whitespaces to prepend to output
INTEGER :: len
INTEGER :: ret_val_func
ret_val_func = 0
ret_val = 0
name_string(1:10) = " "
len = 0
@ -141,7 +140,7 @@ CONTAINS
ptr2 = C_LOC(nextod%recurs)
funptr = C_FUNLOC(op_func)
CALL h5literate_by_name_f(loc_id, name_string, H5_INDEX_NAME_F, H5_ITER_NATIVE_F, idx, &
funptr, ptr2, ret_val_func, status)
funptr, ptr2, ret_val, status)
ENDIF
WRITE(*,'(A)') space(1:spaces)//"}"

View File

@ -25,10 +25,9 @@
!
! MPI definitions and calls.
!
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
comm = MPI_COMM_WORLD
info = MPI_INFO_NULL
CALL MPI_INIT(mpierror)

View File

@ -18,9 +18,9 @@
!
! MPI definitions and calls.
!
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
comm = MPI_COMM_WORLD
info = MPI_INFO_NULL

View File

@ -27,7 +27,7 @@ MODULE filter
INTEGER , PARAMETER :: PATH_MAX = 512
! Global variables
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_rank, mpi_size
INTEGER :: mpi_rank, mpi_size
CONTAINS
!
@ -91,11 +91,10 @@ CONTAINS
LOGICAL :: do_cleanup
INTEGER :: status
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror
CALL get_environment_variable("HDF5_NOCLEANUP", STATUS=status)
IF(status.EQ.0)THEN
CALL MPI_File_delete(filename, MPI_INFO_NULL, mpierror)
CALL MPI_File_delete(filename, MPI_INFO_NULL, status)
ENDIF
END SUBROUTINE cleanup
@ -242,19 +241,18 @@ CONTAINS
USE filter
IMPLICIT NONE
INTEGER(KIND=MPI_INTEGER_KIND) :: comm = MPI_COMM_WORLD
INTEGER(KIND=MPI_INTEGER_KIND) :: info = MPI_INFO_NULL
INTEGER :: comm = MPI_COMM_WORLD
INTEGER :: info = MPI_INFO_NULL
INTEGER(hid_t) :: file_id
INTEGER(hid_t) :: fapl_id
INTEGER(hid_t) :: dxpl_id
CHARACTER(LEN=PATH_MAX) :: par_prefix
CHARACTER(LEN=PATH_MAX) :: filename
INTEGER :: status
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror
CALL MPI_Init(mpierror)
CALL MPI_Comm_size(comm, mpi_size, mpierror)
CALL MPI_Comm_rank(comm, mpi_rank, mpierror)
CALL MPI_Init(status)
CALL MPI_Comm_size(comm, mpi_size, status)
CALL MPI_Comm_rank(comm, mpi_rank, status)
!
! Initialize HDF5 library and Fortran interfaces.
@ -351,6 +349,6 @@ CONTAINS
! ------------------------------------
CALL cleanup(filename)
CALL MPI_Finalize(mpierror)
CALL MPI_Finalize(status)
END PROGRAM main

View File

@ -34,9 +34,9 @@
!
! MPI definitions and calls.
!
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
comm = MPI_COMM_WORLD
info = MPI_INFO_NULL

View File

@ -30,9 +30,9 @@
!
! MPI definitions and calls.
!
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
comm = MPI_COMM_WORLD
info = MPI_INFO_NULL
CALL MPI_INIT(mpierror)

View File

@ -36,9 +36,9 @@
!
! MPI definitions and calls.
!
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
comm = MPI_COMM_WORLD
info = MPI_INFO_NULL

View File

@ -35,9 +35,9 @@
!
! MPI definitions and calls.
!
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
comm = MPI_COMM_WORLD
info = MPI_INFO_NULL

View File

@ -60,8 +60,8 @@ CONTAINS
IMPLICIT NONE
INTEGER(HID_T) :: fapl_id
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_rank
INTEGER :: mpi_size
INTEGER :: mpi_rank
INTEGER, DIMENSION(:), ALLOCATABLE, TARGET :: wdata
INTEGER(hsize_t), DIMENSION(1:EXAMPLE_DSET_DIMS) :: dset_dims
@ -171,8 +171,8 @@ CONTAINS
IMPLICIT NONE
INTEGER(HID_T) :: fapl_id
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_rank
INTEGER :: mpi_size
INTEGER :: mpi_rank
INTEGER, DIMENSION(:), ALLOCATABLE, TARGET :: wdata
@ -304,8 +304,8 @@ CONTAINS
IMPLICIT NONE
INTEGER(HID_T) :: fapl_id
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_rank
INTEGER :: mpi_size
INTEGER :: mpi_rank
INTEGER, DIMENSION(:), ALLOCATABLE, TARGET :: wdata
TYPE(H5FD_subfiling_config_t) :: subf_config
@ -320,7 +320,6 @@ CONTAINS
INTEGER :: status
INTEGER(SIZE_T) :: i
TYPE(C_PTR) :: f_ptr
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror
! Make a copy of the FAPL so we don't disturb
! it for the other examples
@ -414,7 +413,7 @@ CONTAINS
CALL H5Fclose_f(file_id, status)
ENDIF
CALL MPI_Barrier(MPI_COMM_WORLD, mpierror)
CALL MPI_Barrier(MPI_COMM_WORLD, status)
!
! Use all MPI ranks to re-open the file and
@ -468,27 +467,26 @@ PROGRAM main
USE SUBF
IMPLICIT NONE
INTEGER(KIND=MPI_INTEGER_KIND) :: comm = MPI_COMM_WORLD
INTEGER(KIND=MPI_INTEGER_KIND) :: info = MPI_INFO_NULL
INTEGER :: comm = MPI_COMM_WORLD
INTEGER :: info = MPI_INFO_NULL
INTEGER(HID_T) :: fapl_id
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_rank
INTEGER(KIND=MPI_INTEGER_KIND) :: required
INTEGER(KIND=MPI_INTEGER_KIND) :: provided
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror
INTEGER :: mpi_size
INTEGER :: mpi_rank
INTEGER :: required
INTEGER :: provided
INTEGER :: status
! HDF5 Subfiling VFD requires MPI_Init_thread with MPI_THREAD_MULTIPLE
required = MPI_THREAD_MULTIPLE
provided = 0
CALL mpi_init_thread(required, provided, mpierror)
CALL mpi_init_thread(required, provided, status)
IF (provided .NE. required) THEN
WRITE(*,*) "MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE *FAILED*"
CALL MPI_Abort(comm, -1_MPI_INTEGER_KIND, mpierror)
CALL MPI_Abort(comm, -1, status)
ENDIF
CALL MPI_Comm_size(comm, mpi_size, mpierror)
CALL MPI_Comm_rank(comm, mpi_rank, mpierror)
CALL MPI_Comm_size(comm, mpi_size, status)
CALL MPI_Comm_rank(comm, mpi_rank, status)
!
! Initialize HDF5 library and Fortran interfaces.
@ -518,6 +516,6 @@ PROGRAM main
IF(mpi_rank .EQ. 0) WRITE(*,"(A)") "PHDF5 example finished with no errors"
CALL MPI_Finalize(mpierror)
CALL MPI_Finalize(status)
END PROGRAM main

View File

@ -74,14 +74,14 @@ PROGRAM main
! Insert enumerated value for memtype.
!
val = i
f_ptr = C_LOC(val)
CALL h5tenum_insert_f(memtype, TRIM(names(i+1)), f_ptr, hdferr)
CALL h5tenum_insert_f(memtype, TRIM(names(i+1)), val, hdferr)
!
! Insert enumerated value for filetype. We must first convert
! the numerical value val to the base type of the destination.
!
f_ptr = C_LOC(val)
CALL h5tconvert_f (M_BASET, F_BASET, INT(1,SIZE_T), f_ptr, hdferr)
CALL h5tenum_insert_f(filetype, TRIM(names(i+1)), f_ptr, hdferr)
CALL h5tenum_insert_f(filetype, TRIM(names(i+1)), val, hdferr)
ENDDO
!
! Create dataspace. Setting maximum size to be the current size.
@ -129,7 +129,7 @@ PROGRAM main
!
! Get the name of the enumeration member.
!
CALL h5tenum_nameof_f( memtype, INT(rdata(i,j)), NAME_BUF_SIZE, name, hdferr)
CALL h5tenum_nameof_f( memtype, rdata(i,j), NAME_BUF_SIZE, name, hdferr)
WRITE(*,'(" ", A6," ")', ADVANCE='NO') TRIM(NAME)
ENDDO
WRITE(*,'("]")')

View File

@ -75,15 +75,14 @@ PROGRAM main
! Insert enumerated value for memtype.
!
val = i
f_ptr = C_LOC(val)
CALL h5tenum_insert_f(memtype, TRIM(names(i+1)), f_ptr, hdferr)
CALL h5tenum_insert_f(memtype, TRIM(names(i+1)), val, hdferr)
!
! Insert enumerated value for filetype. We must first convert
! the numerical value val to the base type of the destination.
!
f_ptr = C_LOC(val)
CALL h5tconvert_f(M_BASET, F_BASET, INT(1,SIZE_T), f_ptr, hdferr)
CALL h5tenum_insert_f(filetype, TRIM(names(i+1)), f_ptr, hdferr)
CALL h5tenum_insert_f(filetype, TRIM(names(i+1)), val, hdferr)
ENDDO
!
! Create dataspace with a null dataspace.
@ -138,7 +137,7 @@ PROGRAM main
!
! Get the name of the enumeration member.
!
CALL h5tenum_nameof_f( memtype, INT(rdata(i,j)), NAME_BUF_SIZE, name, hdferr)
CALL h5tenum_nameof_f( memtype, rdata(i,j), NAME_BUF_SIZE, name, hdferr)
WRITE(*,'(" ",A6," ")', ADVANCE='NO') TRIM(NAME)
ENDDO
WRITE(*,'("]")')

View File

@ -50,15 +50,9 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1
else ()
set (_RUN_OUTPUT_VARIABLE "RUN_OUTPUT_STDOUT_VARIABLE")
endif()
if (${FUNCTION_NAME} STREQUAL "SIZEOF NATIVE KINDs")
set(TMP_CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
else ()
set(TMP_CMAKE_Fortran_FLAGS "")
endif ()
TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90
CMAKE_FLAGS "${TMP_CMAKE_Fortran_FLAGS}"
LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}"
${_RUN_OUTPUT_VARIABLE} OUTPUT_VAR
)

View File

@ -120,10 +120,10 @@ CONTAINS
INTERFACE
INTEGER(HID_T) FUNCTION H5Fcreate(name, access_flags, &
creation_prp_default, access_prp_default) BIND(C,NAME='H5Fcreate')
IMPORT :: C_CHAR, C_INT
IMPORT :: C_CHAR
IMPORT :: HID_T
CHARACTER(KIND=C_CHAR), DIMENSION(*) :: name
INTEGER(C_INT), VALUE :: access_flags
INTEGER, VALUE :: access_flags
INTEGER(HID_T), VALUE :: creation_prp_default
INTEGER(HID_T), VALUE :: access_prp_default
END FUNCTION H5Fcreate
@ -137,7 +137,7 @@ CONTAINS
IF (PRESENT(creation_prp)) creation_prp_default = creation_prp
IF (PRESENT(access_prp)) access_prp_default = access_prp
file_id = h5fcreate(c_name, INT(access_flags, C_INT), &
file_id = h5fcreate(c_name, access_flags, &
creation_prp_default, access_prp_default)
hdferr = 0

View File

@ -1555,7 +1555,7 @@ CONTAINS
END FUNCTION H5Lvisit
END INTERFACE
return_value_c = H5Lvisit(grp_id, INT(idx_type, C_INT), INT(order, C_INT), op, op_data)
return_value_c = INT(H5Lvisit(grp_id, INT(idx_type, C_INT), INT(order, C_INT), op, op_data))
return_value = INT(return_value_c)
IF(return_value.GE.0)THEN
@ -1624,7 +1624,7 @@ CONTAINS
lapl_id_default = H5P_DEFAULT_F
IF(PRESENT(lapl_id)) lapl_id_default = lapl_id
return_value_c = H5Lvisit_by_name(loc_id, c_name, INT(idx_type, C_INT), INT(order, C_INT), op, op_data, lapl_id_default)
return_value_c = INT(H5Lvisit_by_name(loc_id, c_name, INT(idx_type, C_INT), INT(order, C_INT), op, op_data, lapl_id_default))
return_value = INT(return_value_c)
IF(return_value.GE.0)THEN

View File

@ -2931,7 +2931,7 @@ h5pset_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m
* Check that we got correct values from Fortran for memb_addr array
*/
for (i = 0; i < H5FD_MEM_NTYPES; i++) {
if (memb_addr[i] >= (real_f)1.0)
if (memb_addr[i] >= 1.0f)
return ret_value;
}
/*
@ -4598,7 +4598,7 @@ h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr)
* SOURCE
*/
int_f
h5pset_fapl_mpio_c(hid_t_f *prp_id, void *comm, void *info)
h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info)
/******/
{
int ret_value = -1;
@ -4606,8 +4606,8 @@ h5pset_fapl_mpio_c(hid_t_f *prp_id, void *comm, void *info)
herr_t ret;
MPI_Comm c_comm;
MPI_Info c_info;
c_comm = MPI_Comm_f2c(*((int *)comm));
c_info = MPI_Info_f2c(*((int *)info));
c_comm = MPI_Comm_f2c(*comm);
c_info = MPI_Info_f2c(*info);
/*
* Call H5Pset_mpi function.
@ -4633,7 +4633,7 @@ h5pset_fapl_mpio_c(hid_t_f *prp_id, void *comm, void *info)
* SOURCE
*/
int_f
h5pget_fapl_mpio_c(hid_t_f *prp_id, int *comm, int *info)
h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info)
/******/
{
int ret_value = -1;
@ -4649,8 +4649,8 @@ h5pget_fapl_mpio_c(hid_t_f *prp_id, int *comm, int *info)
ret = H5Pget_fapl_mpio(c_prp_id, &c_comm, &c_info);
if (ret < 0)
return ret_value;
*comm = (int)MPI_Comm_c2f(c_comm);
*info = (int)MPI_Info_c2f(c_info);
*comm = (int_f)MPI_Comm_c2f(c_comm);
*info = (int_f)MPI_Info_c2f(c_info);
ret_value = 0;
return ret_value;
}
@ -4669,7 +4669,7 @@ h5pget_fapl_mpio_c(hid_t_f *prp_id, int *comm, int *info)
* SOURCE
*/
int_f
h5pset_mpi_params_c(hid_t_f *prp_id, void *comm, void *info)
h5pset_mpi_params_c(hid_t_f *prp_id, int_f *comm, int_f *info)
/******/
{
int ret_value = -1;
@ -4677,8 +4677,8 @@ h5pset_mpi_params_c(hid_t_f *prp_id, void *comm, void *info)
herr_t ret;
MPI_Comm c_comm;
MPI_Info c_info;
c_comm = MPI_Comm_f2c(*((int *)comm));
c_info = MPI_Info_f2c(*((int *)info));
c_comm = MPI_Comm_f2c(*comm);
c_info = MPI_Info_f2c(*info);
/*
* Call H5Pset_mpi_params.
@ -4705,7 +4705,7 @@ h5pset_mpi_params_c(hid_t_f *prp_id, void *comm, void *info)
* SOURCE
*/
int_f
h5pget_mpi_params_c(hid_t_f *prp_id, int *comm, int *info)
h5pget_mpi_params_c(hid_t_f *prp_id, int_f *comm, int_f *info)
/******/
{
int ret_value = -1;
@ -4721,8 +4721,8 @@ h5pget_mpi_params_c(hid_t_f *prp_id, int *comm, int *info)
ret = H5Pget_mpi_params(c_prp_id, &c_comm, &c_info);
if (ret < 0)
return ret_value;
*comm = (int)MPI_Comm_c2f(c_comm);
*info = (int)MPI_Info_c2f(c_info);
*comm = (int_f)MPI_Comm_c2f(c_comm);
*info = (int_f)MPI_Info_c2f(c_info);
ret_value = 0;
return ret_value;
}

View File

@ -39,13 +39,6 @@
MODULE H5P
#ifdef H5_HAVE_PARALLEL
#ifdef H5_HAVE_MPI_F08
USE MPI_F08, ONLY : MPI_INTEGER_KIND
#else
USE MPI, ONLY : MPI_INTEGER_KIND
#endif
#endif
USE H5GLOBAL
USE H5fortkit
@ -57,7 +50,6 @@ MODULE H5P
PRIVATE h5pregister_integer, h5pregister_ptr
PRIVATE h5pinsert_integer, h5pinsert_char, h5pinsert_ptr
#ifdef H5_HAVE_PARALLEL
PRIVATE MPI_INTEGER_KIND
PRIVATE h5pset_fapl_mpio_f90, h5pget_fapl_mpio_f90
#ifdef H5_HAVE_MPI_F08
PRIVATE h5pset_fapl_mpio_f08, h5pget_fapl_mpio_f08
@ -5190,8 +5182,8 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(IN) :: comm
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(IN) :: info
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(IN) :: info
INTEGER, INTENT(OUT) :: hdferr
END SUBROUTINE h5pset_fapl_mpio_f
!>
@ -5221,17 +5213,17 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
SUBROUTINE h5pset_fapl_mpio_f90(prp_id, comm, info, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(IN) :: comm
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(IN) :: info
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(IN) :: info
INTEGER, INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5pset_fapl_mpio_c(prp_id, comm, info) &
BIND(C,NAME='h5pset_fapl_mpio_c')
IMPORT :: HID_T, MPI_INTEGER_KIND
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(HID_T) :: prp_id
INTEGER(KIND=MPI_INTEGER_KIND) :: comm
INTEGER(KIND=MPI_INTEGER_KIND) :: info
INTEGER :: comm
INTEGER :: info
END FUNCTION h5pset_fapl_mpio_c
END INTERFACE
@ -5248,7 +5240,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
TYPE(MPI_INFO), INTENT(IN) :: info
INTEGER, INTENT(OUT) :: hdferr
CALL h5pset_fapl_mpio_f90(prp_id, INT(comm%mpi_val,MPI_INTEGER_KIND), INT(info%mpi_val,MPI_INTEGER_KIND), hdferr)
CALL h5pset_fapl_mpio_f90(prp_id, comm%mpi_val, info%mpi_val, hdferr)
END SUBROUTINE h5pset_fapl_mpio_f08
#endif
@ -5306,28 +5298,21 @@ END SUBROUTINE h5pget_fapl_mpio_f
SUBROUTINE h5pget_fapl_mpio_f90(prp_id, comm, info, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(OUT) :: comm
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(OUT) :: info
INTEGER, INTENT(OUT) :: comm
INTEGER, INTENT(OUT) :: info
INTEGER, INTENT(OUT) :: hdferr
INTEGER(KIND=C_INT) :: c_comm
INTEGER(KIND=C_INT) :: c_info
INTERFACE
INTEGER FUNCTION h5pget_fapl_mpio_c(prp_id, comm, info) &
BIND(C,NAME='h5pget_fapl_mpio_c')
IMPORT :: HID_T, C_INT
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(HID_T) :: prp_id
INTEGER(KIND=C_INT) :: comm
INTEGER(KIND=C_INT) :: info
INTEGER :: comm
INTEGER :: info
END FUNCTION h5pget_fapl_mpio_c
END INTERFACE
hdferr = h5pget_fapl_mpio_c(prp_id, c_comm, c_info)
comm = INT(c_comm,KIND=MPI_INTEGER_KIND)
info = INT(c_info,KIND=MPI_INTEGER_KIND)
hdferr = h5pget_fapl_mpio_c(prp_id, comm, info)
END SUBROUTINE h5pget_fapl_mpio_f90
@ -5340,13 +5325,7 @@ END SUBROUTINE h5pget_fapl_mpio_f
TYPE(MPI_INFO), INTENT(OUT) :: info
INTEGER, INTENT(OUT) :: hdferr
INTEGER(KIND=MPI_INTEGER_KIND) :: tmp_comm
INTEGER(KIND=MPI_INTEGER_KIND) :: tmp_info
CALL h5pget_fapl_mpio_f90(prp_id, tmp_comm, tmp_info, hdferr)
comm%mpi_val = tmp_comm
info%mpi_val = tmp_info
CALL h5pget_fapl_mpio_f90(prp_id, comm%mpi_val, info%mpi_val, hdferr)
END SUBROUTINE h5pget_fapl_mpio_f08
#endif
@ -5553,8 +5532,8 @@ END SUBROUTINE h5pget_fapl_mpio_f
SUBROUTINE H5Pset_mpi_params_f(prp_id, comm, info, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(IN) :: comm
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(IN) :: info
INTEGER , INTENT(IN) :: comm
INTEGER , INTENT(IN) :: info
INTEGER , INTENT(OUT) :: hdferr
END SUBROUTINE H5Pset_mpi_params_f
!>
@ -5584,18 +5563,18 @@ END SUBROUTINE h5pget_fapl_mpio_f
SUBROUTINE H5Pset_mpi_params_f90(prp_id, comm, info, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(IN) :: comm
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(IN) :: info
INTEGER , INTENT(IN) :: comm
INTEGER , INTENT(IN) :: info
INTEGER , INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5pset_mpi_params_c(prp_id, comm, info) &
BIND(C,NAME='h5pset_mpi_params_c')
IMPORT :: HID_T, MPI_INTEGER_KIND
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(HID_T) :: prp_id
INTEGER(KIND=MPI_INTEGER_KIND) :: comm
INTEGER(KIND=MPI_INTEGER_KIND) :: info
INTEGER :: comm
INTEGER :: info
END FUNCTION H5pset_mpi_params_c
END INTERFACE
@ -5635,8 +5614,8 @@ END SUBROUTINE h5pget_fapl_mpio_f
SUBROUTINE H5Pget_mpi_params_f(prp_id, comm, info, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id
INTEGER, INTENT(OUT) :: comm
INTEGER, INTENT(OUT) :: info
INTEGER , INTENT(OUT) :: comm
INTEGER , INTENT(OUT) :: info
INTEGER , INTENT(OUT) :: hdferr
END SUBROUTINE H5Pget_mpi_params_f
!>
@ -5668,28 +5647,22 @@ END SUBROUTINE h5pget_fapl_mpio_f
SUBROUTINE H5Pget_mpi_params_f90(prp_id, comm, info, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(OUT) :: comm
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(OUT) :: info
INTEGER , INTENT(OUT) :: comm
INTEGER , INTENT(OUT) :: info
INTEGER , INTENT(OUT) :: hdferr
INTEGER(KIND=C_INT) :: c_comm
INTEGER(KIND=C_INT) :: c_info
INTERFACE
INTEGER FUNCTION h5pget_mpi_params_c(prp_id, comm, info) &
BIND(C,NAME='h5pget_mpi_params_c')
IMPORT :: HID_T, C_INT
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(HID_T) :: prp_id
INTEGER(KIND=C_INT) :: comm
INTEGER(KIND=C_INT) :: info
INTEGER :: comm
INTEGER :: info
END FUNCTION H5pget_mpi_params_c
END INTERFACE
hdferr = H5Pget_mpi_params_c(prp_id, c_comm, c_info)
comm = INT(c_comm,KIND=MPI_INTEGER_KIND)
info = INT(c_info,KIND=MPI_INTEGER_KIND)
hdferr = H5Pget_mpi_params_c(prp_id, comm, info)
END SUBROUTINE H5Pget_mpi_params_f90
@ -5702,13 +5675,7 @@ END SUBROUTINE h5pget_fapl_mpio_f
TYPE(MPI_INFO), INTENT(OUT) :: info
INTEGER , INTENT(OUT) :: hdferr
INTEGER(KIND=MPI_INTEGER_KIND) :: tmp_comm
INTEGER(KIND=MPI_INTEGER_KIND) :: tmp_info
CALL H5Pget_mpi_params_f90(prp_id, tmp_comm, tmp_info, hdferr)
comm%mpi_val = tmp_comm
info%mpi_val = tmp_info
CALL H5Pget_mpi_params_f90(prp_id, comm%mpi_val, info%mpi_val, hdferr)
END SUBROUTINE H5Pget_mpi_params_f08
#endif

View File

@ -55,7 +55,7 @@ h5screate_simple_c(int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *sp
c_maxdims[i] = maxdims[*rank - i - 1];
} /* end for */
c_space_id = H5Screate_simple((int)*rank, c_dims, c_maxdims);
c_space_id = H5Screate_simple(*rank, c_dims, c_maxdims);
if (c_space_id < 0)
HGOTO_DONE(FAIL);

View File

@ -518,10 +518,10 @@ H5_FCDLL int_f h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, siz
real_f *rdcc_w0);
#ifdef H5_HAVE_PARALLEL
H5_FCDLL int_f h5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode);
H5_FCDLL int_f h5pget_fapl_mpio_c(hid_t_f *prp_id, int *comm, int *info);
H5_FCDLL int_f h5pset_fapl_mpio_c(hid_t_f *prp_id, void *comm, void *info);
H5_FCDLL int_f h5pget_mpi_params_c(hid_t_f *prp_id, int *comm, int *info);
H5_FCDLL int_f h5pset_mpi_params_c(hid_t_f *prp_id, void *comm, void *info);
H5_FCDLL int_f h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info);
H5_FCDLL int_f h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info);
H5_FCDLL int_f h5pget_mpi_params_c(hid_t_f *prp_id, int_f *comm, int_f *info);
H5_FCDLL int_f h5pset_mpi_params_c(hid_t_f *prp_id, int_f *comm, int_f *info);
H5_FCDLL int_f h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f *data_xfer_mode);
H5_FCDLL int_f h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f *data_xfer_mode);
#endif

View File

@ -100,11 +100,12 @@ CONTAINS
CHARACTER(LEN=35), DIMENSION(2) :: aread_data ! Buffer to put read back
! string attr data
CHARACTER :: attr_character_data = 'A'
REAL(KIND=Fortran_DOUBLE), DIMENSION(1) :: attr_double_data = 3.459_Fortran_DOUBLE
REAL(KIND=Fortran_DOUBLE), DIMENSION(1) :: attr_double_data = 3.459D0
REAL, DIMENSION(1) :: attr_real_data = 4.0
INTEGER, DIMENSION(1) :: attr_integer_data = 5
INTEGER(HSIZE_T), DIMENSION(7) :: data_dims
CHARACTER :: aread_character_data ! variable to put read back Character attr data
INTEGER, DIMENSION(1) :: aread_integer_data ! variable to put read back integer attr data
INTEGER, DIMENSION(1) :: aread_null_data = 7 ! variable to put read back null attr data
@ -576,6 +577,8 @@ CONTAINS
total_error = total_error +1
END IF
CALL h5sclose_f(attr_space, error)
CALL check("h5sclose_f",error,total_error)
CALL h5sclose_f(attr2_space, error)

View File

@ -162,7 +162,7 @@ CONTAINS
INTEGER :: nlen, i, istart, iend
op_data%n_obj = op_data%n_obj + 1_C_INT
op_data%n_obj = op_data%n_obj + 1
nlen = 1
DO i = 1, MAX_CHAR_LEN

View File

@ -118,10 +118,10 @@ CONTAINS
IF((field .EQ. H5O_INFO_TIME_F).OR.(field .EQ. H5O_INFO_ALL_F))THEN
atime(1:8) = INT(h5gmtime(oinfo_c%atime),C_INT)
btime(1:8) = INT(h5gmtime(oinfo_c%btime),C_INT)
ctime(1:8) = INT(h5gmtime(oinfo_c%ctime),C_INT)
mtime(1:8) = INT(h5gmtime(oinfo_c%mtime),C_INT)
atime(1:8) = h5gmtime(oinfo_c%atime)
btime(1:8) = h5gmtime(oinfo_c%btime)
ctime(1:8) = h5gmtime(oinfo_c%ctime)
mtime(1:8) = h5gmtime(oinfo_c%mtime)
DO i = 1, 8
IF( (atime(i) .NE. oinfo_f%atime(i)) )THEN

View File

@ -709,8 +709,8 @@ END SUBROUTINE test_array_compound_atomic
DO i = 1, LENGTH
DO j = 1, ALEN
cf(i)%a(j) = 100*(i+1) + j
cf(i)%b(j) = (100._sp*REAL(i+1,sp) + 0.01_sp*REAL(j,sp))
cf(i)%c(j) = 100._dp*REAL(i+1,dp) + 0.02_dp*REAL(j,dp)
cf(i)%b(j) = (100.*(i+1) + 0.01*j)
cf(i)%c(j) = 100.*(i+1) + 0.02*j
ENDDO
ENDDO
@ -855,7 +855,7 @@ END SUBROUTINE test_array_compound_atomic
! --------------------------------
DO i = 1, LENGTH
DO j = 1, ALEN
fld(i)%b(j) = 1.313_sp
fld(i)%b(j) = 1.313
cf(i)%b(j) = fld(i)%b(j)
ENDDO
ENDDO
@ -2930,8 +2930,8 @@ SUBROUTINE test_nbit(total_error )
! dataset datatype (no precision loss during datatype conversion)
!
REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: orig_data = &
RESHAPE( (/188384.00_wp, 19.103516_wp, -1.0831790e9_wp, -84.242188_wp, &
5.2045898_wp, -49140.000_wp, 2350.2500_wp, -3.2110596e-1_wp, 6.4998865e-5_wp, -0.0000000_wp/) , (/2,5/) )
RESHAPE( (/188384.00, 19.103516, -1.0831790e9, -84.242188, &
5.2045898, -49140.000, 2350.2500, -3.2110596e-1, 6.4998865e-5, -0.0000000/) , (/2,5/) )
REAL(kind=wp), DIMENSION(1:2,1:5), TARGET :: new_data
INTEGER(size_t) :: PRECISION, offset
INTEGER :: error

View File

@ -13,15 +13,9 @@
! Tests async Fortran wrappers. It needs an async VOL. It will skip the tests if
! HDF5_VOL_CONNECTOR is not set or is set to a non-supporting async VOL.
!
#include <H5config_f.inc>
MODULE test_async_APIs
#ifdef H5_HAVE_MPI_F08
USE MPI_F08
#else
USE MPI
#endif
USE HDF5
USE TH5_MISC
USE TH5_MISC_GEN
@ -46,8 +40,6 @@ MODULE test_async_APIs
CHARACTER(LEN=10), TARGET :: app_func = "func_name"//C_NULL_CHAR
INTEGER :: app_line = 42
INTEGER :: mpi_ikind = MPI_INTEGER_KIND
CONTAINS
INTEGER(KIND=C_INT) FUNCTION liter_cb(group, name, link_info, op_data) bind(C)
@ -68,7 +60,7 @@ CONTAINS
CASE(0)
liter_cb = 0
CASE(2)
liter_cb = op_data%command*10_C_INT
liter_cb = op_data%command*10
END SELECT
op_data%command = op_data_command
op_data%type = op_data_type
@ -389,14 +381,9 @@ CONTAINS
INTEGER, TARGET :: fillvalue = 99
INTEGER :: error ! Error flags
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
#ifdef H5_HAVE_MPI_F08
TYPE(MPI_COMM) :: comm
TYPE(MPI_INFO) :: info
#else
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
#endif
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
comm = MPI_COMM_WORLD
info = MPI_INFO_NULL
@ -412,7 +399,7 @@ CONTAINS
CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl_id, hdferror)
CALL check("h5pcreate_f", hdferror, total_error)
CALL h5pset_fapl_mpio_f(fapl_id, comm, info, hdferror)
CALL h5pset_fapl_mpio_f(fapl_id, MPI_COMM_WORLD, MPI_INFO_NULL, hdferror)
CALL check("h5pset_fapl_mpio_f", hdferror, total_error)
CALL h5fcreate_async_f(filename, H5F_ACC_TRUNC_F, file_id, es_id, error, access_prp = fapl_id )
@ -594,14 +581,9 @@ CONTAINS
TYPE(H5G_info_t), DIMENSION(1:3) :: ginfo
INTEGER :: error
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
#ifdef H5_HAVE_MPI_F08
TYPE(MPI_COMM) :: comm
TYPE(MPI_INFO) :: info
#else
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
#endif
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
comm = MPI_COMM_WORLD
info = MPI_INFO_NULL
@ -727,14 +709,9 @@ CONTAINS
INTEGER(HID_T) :: ret_file_id
INTEGER :: error ! Error flags
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
#ifdef H5_HAVE_MPI_F08
TYPE(MPI_COMM) :: comm
TYPE(MPI_INFO) :: info
#else
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
#endif
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
comm = MPI_COMM_WORLD
info = MPI_INFO_NULL
@ -835,16 +812,12 @@ CONTAINS
TYPE(iter_info), TARGET :: info
TYPE(C_FUNPTR) :: f1
TYPE(C_PTR) :: f2
INTEGER :: ret_value
INTEGER(C_INT) :: ret_value
INTEGER :: error ! Error flags
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
#ifdef H5_HAVE_MPI_F08
TYPE(MPI_COMM) :: comm
#else
INTEGER(KIND=MPI_INTEGER_KIND) :: comm
#endif
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm
INTEGER :: mpi_size, mpi_rank
INTEGER(SIZE_T) :: count
@ -1238,10 +1211,10 @@ CONTAINS
CALL check("H5Oget_info_by_name_async_f", hdferror, total_error)
ENDIF
atime(1:8) = INT(h5gmtime(oinfo_f%atime),C_INT)
btime(1:8) = INT(h5gmtime(oinfo_f%btime),C_INT)
ctime(1:8) = INT(h5gmtime(oinfo_f%ctime),C_INT)
mtime(1:8) = INT(h5gmtime(oinfo_f%mtime),C_INT)
atime(1:8) = h5gmtime(oinfo_f%atime)
btime(1:8) = h5gmtime(oinfo_f%btime)
ctime(1:8) = h5gmtime(oinfo_f%ctime)
mtime(1:8) = h5gmtime(oinfo_f%mtime)
IF( atime(1) .LT. 2021 .OR. &
btime(1).LT. 2021 .OR. &
@ -1271,15 +1244,10 @@ PROGRAM async_test
IMPLICIT NONE
INTEGER :: total_error = 0 ! sum of the number of errors
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI hdferror flag
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size ! number of processes in the group of communicator
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_rank ! rank of the calling process in the communicator
INTEGER(KIND=MPI_INTEGER_KIND) :: required, provided
#ifdef H5_HAVE_MPI_F08
TYPE(MPI_DATATYPE) :: mpi_int_type
#else
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_int_type
#endif
INTEGER :: mpierror ! MPI hdferror flag
INTEGER :: mpi_size ! number of processes in the group of communicator
INTEGER :: mpi_rank ! rank of the calling process in the communicator
INTEGER :: required, provided
INTEGER(HID_T) :: vol_id
INTEGER :: hdferror
@ -1322,7 +1290,7 @@ PROGRAM async_test
IF(mpi_rank==0) CALL write_test_status(sum, &
'Testing Initializing mpi_init_thread', total_error)
CALL MPI_Barrier(MPI_COMM_WORLD, mpierror)
CALL mpi_abort(MPI_COMM_WORLD, 1_MPI_INTEGER_KIND, mpierror)
CALL mpi_abort(MPI_COMM_WORLD, 1, mpierror)
ENDIF
IF(mpi_rank==0) CALL write_test_header("ASYNC FORTRAN TESTING")
@ -1440,13 +1408,7 @@ PROGRAM async_test
!
CALL h5close_f(hdferror)
IF(h5_sizeof(total_error).EQ.8_size_t)THEN
mpi_int_type=MPI_INTEGER8
ELSE
mpi_int_type=MPI_INTEGER4
ENDIF
CALL MPI_ALLREDUCE(total_error, sum, 1_MPI_INTEGER_KIND, mpi_int_type, MPI_SUM, MPI_COMM_WORLD, mpierror)
CALL MPI_ALLREDUCE(total_error, sum, 1, MPI_INTEGER, MPI_SUM, MPI_COMM_WORLD, mpierror)
IF(mpi_rank==0) CALL write_test_footer()
@ -1460,7 +1422,7 @@ PROGRAM async_test
ENDIF
ELSE
WRITE(*,*) 'Errors detected in process ', mpi_rank
CALL mpi_abort(MPI_COMM_WORLD, 1_MPI_INTEGER_KIND, mpierror)
CALL mpi_abort(MPI_COMM_WORLD, 1, mpierror)
IF (mpierror .NE. MPI_SUCCESS) THEN
WRITE(*,*) "MPI_ABORT *FAILED* Process = ", mpi_rank
ENDIF

View File

@ -25,8 +25,8 @@ SUBROUTINE hyper(length,do_collective,do_chunk, mpi_size, mpi_rank, nerrors)
INTEGER, INTENT(in) :: length ! array length
LOGICAL, INTENT(in) :: do_collective ! use collective I/O
LOGICAL, INTENT(in) :: do_chunk ! use chunking
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(in) :: mpi_size ! number of processes in the group of communicator
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(in) :: mpi_rank ! rank of the calling process in the communicator
INTEGER, INTENT(in) :: mpi_size ! number of processes in the group of communicator
INTEGER, INTENT(in) :: mpi_rank ! rank of the calling process in the communicator
INTEGER, INTENT(inout) :: nerrors ! number of errors
INTEGER :: hdferror ! HDF hdferror flag
INTEGER(hsize_t), DIMENSION(1) :: dims ! dataset dimensions

View File

@ -25,8 +25,8 @@ SUBROUTINE multiple_dset_write(length, do_collective, do_chunk, mpi_size, mpi_ra
INTEGER, INTENT(in) :: length ! array length
LOGICAL, INTENT(in) :: do_collective ! use collective I/O
LOGICAL, INTENT(in) :: do_chunk ! use chunking
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(in) :: mpi_size ! number of processes in the group of communicator
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(in) :: mpi_rank ! rank of the calling process in the communicator
INTEGER, INTENT(in) :: mpi_size ! number of processes in the group of communicator
INTEGER, INTENT(in) :: mpi_rank ! rank of the calling process in the communicator
INTEGER, INTENT(inout) :: nerrors ! number of errors
INTEGER :: hdferror ! HDF hdferror flag
INTEGER(hsize_t), DIMENSION(1) :: dims ! dataset dimensions

View File

@ -24,20 +24,18 @@ SUBROUTINE mpi_param_03(nerrors)
USE TH5_MISC_GEN
IMPLICIT NONE
INTEGER, INTENT(inout) :: nerrors ! number of errors
INTEGER, PARAMETER :: logical_kind = MPI_INTEGER_KIND
INTEGER :: hdferror ! HDF hdferror flag
INTEGER(hid_t) :: fapl_id ! file access identifier
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_size_ret ! number of processes in the group of communicator
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI hdferror flag
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_rank ! rank of the calling process in the communicator
INTEGER :: mpi_size, mpi_size_ret ! number of processes in the group of communicator
INTEGER :: mpierror ! MPI hdferror flag
INTEGER :: mpi_rank ! rank of the calling process in the communicator
INTEGER(KIND=MPI_INTEGER_KIND) :: info, info_ret
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, comm_ret
INTEGER(KIND=MPI_INTEGER_KIND) :: nkeys
LOGICAL(KIND=logical_kind) :: flag
INTEGER :: info, info_ret
INTEGER :: comm, comm_ret
INTEGER :: nkeys
LOGICAL :: flag
INTEGER :: iconfig
CHARACTER(LEN=4) , PARAMETER :: in_key="host"
CHARACTER(LEN=10), PARAMETER :: in_value="myhost.org"
@ -64,13 +62,13 @@ SUBROUTINE mpi_param_03(nerrors)
! Split the communicator
IF(mpi_rank.EQ.0)THEN
CALL MPI_Comm_split(MPI_COMM_WORLD, 1_MPI_INTEGER_KIND, mpi_rank, comm, mpierror)
CALL MPI_Comm_split(MPI_COMM_WORLD, 1, mpi_rank, comm, mpierror)
IF (mpierror .NE. MPI_SUCCESS) THEN
WRITE(*,*) "MPI_COMM_SPLIT *FAILED* Process = ", mpi_rank
nerrors = nerrors + 1
ENDIF
ELSE
CALL MPI_Comm_split(MPI_COMM_WORLD, 0_MPI_INTEGER_KIND, mpi_rank, comm, mpierror)
CALL MPI_Comm_split(MPI_COMM_WORLD, 0, mpi_rank, comm, mpierror)
IF (mpierror .NE. MPI_SUCCESS) THEN
WRITE(*,*) "MPI_COMM_SPLIT *FAILED* Process = ", mpi_rank
nerrors = nerrors + 1
@ -113,9 +111,9 @@ SUBROUTINE mpi_param_03(nerrors)
nerrors = nerrors + 1
ENDIF
IF (mpi_rank.EQ.0)THEN
CALL VERIFY("h5pget_fapl_mpio_f", mpi_size_ret, 1_MPI_INTEGER_KIND, hdferror)
CALL VERIFY("h5pget_fapl_mpio_f", mpi_size_ret, 1, hdferror)
ELSE
CALL VERIFY("h5pget_fapl_mpio_f", mpi_size_ret, INT(mpi_size-1,MPI_INTEGER_KIND), hdferror)
CALL VERIFY("h5pget_fapl_mpio_f", mpi_size_ret, mpi_size-1, hdferror)
ENDIF
! Check info returned
@ -124,9 +122,9 @@ SUBROUTINE mpi_param_03(nerrors)
WRITE(*,*) "MPI_INFO_GET_NKEYS *FAILED* Process = ", mpi_rank
nerrors = nerrors + 1
ENDIF
CALL VERIFY("h5pget_fapl_mpio_f", nkeys, 1_MPI_INTEGER_KIND, hdferror)
CALL VERIFY("h5pget_fapl_mpio_f", nkeys, 1, hdferror)
CALL MPI_Info_get_nthkey(info_ret, 0_MPI_INTEGER_KIND, key, mpierror)
CALL MPI_Info_get_nthkey(info_ret, 0, key, mpierror)
IF (mpierror .NE. MPI_SUCCESS) THEN
WRITE(*,*) "MPI_INFO_GET_NTHKEY *FAILED* Process = ", mpi_rank
nerrors = nerrors + 1
@ -138,7 +136,7 @@ SUBROUTINE mpi_param_03(nerrors)
WRITE(*,*) "MPI_INFO_GET *FAILED* Process = ", mpi_rank
nerrors = nerrors + 1
ENDIF
CALL VERIFY("h5pget_fapl_mpio_f", LOGICAL(flag), .TRUE., hdferror)
CALL VERIFY("h5pget_fapl_mpio_f", flag, .TRUE., hdferror)
CALL VERIFY("h5pget_fapl_mpio_f", TRIM(value), in_value, hdferror)
! Free the MPI resources
@ -181,17 +179,16 @@ SUBROUTINE mpi_param_08(nerrors)
IMPLICIT NONE
INTEGER, INTENT(inout) :: nerrors ! number of errors
INTEGER, PARAMETER :: logical_kind = MPI_INTEGER_KIND
INTEGER :: hdferror ! HDF hdferror flag
INTEGER(hid_t) :: fapl_id ! file access identifier
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_size_ret ! number of processes in the group of communicator
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI hdferror flag
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_rank ! rank of the calling process in the communicator
INTEGER :: mpi_size, mpi_size_ret ! number of processes in the group of communicator
INTEGER :: mpierror ! MPI hdferror flag
INTEGER :: mpi_rank ! rank of the calling process in the communicator
TYPE(MPI_INFO) :: info, info_ret
TYPE(MPI_COMM) :: comm, comm_ret
INTEGER(KIND=MPI_INTEGER_KIND) :: nkeys
LOGICAL(KIND=logical_kind) :: flag
INTEGER :: nkeys
LOGICAL :: flag
INTEGER :: iconfig
CHARACTER(LEN=4) , PARAMETER :: in_key="host"
CHARACTER(LEN=10), PARAMETER :: in_value="myhost.org"
@ -218,13 +215,13 @@ SUBROUTINE mpi_param_08(nerrors)
! Split the communicator
IF(mpi_rank.EQ.0)THEN
CALL MPI_Comm_split(MPI_COMM_WORLD, 1_MPI_INTEGER_KIND, mpi_rank, comm, mpierror)
CALL MPI_Comm_split(MPI_COMM_WORLD, 1, mpi_rank, comm, mpierror)
IF (mpierror .NE. MPI_SUCCESS) THEN
WRITE(*,*) "MPI_COMM_SPLIT *FAILED* Process = ", mpi_rank
nerrors = nerrors + 1
ENDIF
ELSE
CALL MPI_Comm_split(MPI_COMM_WORLD, 0_MPI_INTEGER_KIND, mpi_rank, comm, mpierror)
CALL MPI_Comm_split(MPI_COMM_WORLD, 0, mpi_rank, comm, mpierror)
IF (mpierror .NE. MPI_SUCCESS) THEN
WRITE(*,*) "MPI_COMM_SPLIT *FAILED* Process = ", mpi_rank
nerrors = nerrors + 1
@ -267,9 +264,9 @@ SUBROUTINE mpi_param_08(nerrors)
nerrors = nerrors + 1
ENDIF
IF (mpi_rank.EQ.0)THEN
CALL VERIFY("h5pget_fapl_mpio_f", mpi_size_ret, 1_MPI_INTEGER_KIND, hdferror)
CALL VERIFY("h5pget_fapl_mpio_f", mpi_size_ret, 1, hdferror)
ELSE
CALL VERIFY("h5pget_fapl_mpio_f", mpi_size_ret, INT(mpi_size-1,MPI_INTEGER_KIND), hdferror)
CALL VERIFY("h5pget_fapl_mpio_f", mpi_size_ret, mpi_size-1, hdferror)
ENDIF
! Check info returned
@ -278,9 +275,9 @@ SUBROUTINE mpi_param_08(nerrors)
WRITE(*,*) "MPI_INFO_GET_NKEYS *FAILED* Process = ", mpi_rank
nerrors = nerrors + 1
ENDIF
CALL VERIFY("h5pget_fapl_mpio_f", nkeys, 1_MPI_INTEGER_KIND, hdferror)
CALL VERIFY("h5pget_fapl_mpio_f", nkeys, 1, hdferror)
CALL MPI_Info_get_nthkey(info_ret, 0_MPI_INTEGER_KIND, key, mpierror)
CALL MPI_Info_get_nthkey(info_ret, 0, key, mpierror)
IF (mpierror .NE. MPI_SUCCESS) THEN
WRITE(*,*) "MPI_INFO_GET_NTHKEY *FAILED* Process = ", mpi_rank
nerrors = nerrors + 1
@ -292,7 +289,7 @@ SUBROUTINE mpi_param_08(nerrors)
WRITE(*,*) "MPI_INFO_GET *FAILED* Process = ", mpi_rank
nerrors = nerrors + 1
ENDIF
CALL VERIFY("h5pget_fapl_mpio_f", LOGICAL(flag), .TRUE., hdferror)
CALL VERIFY("h5pget_fapl_mpio_f", flag, .TRUE., hdferror)
CALL VERIFY("h5pget_fapl_mpio_f", TRIM(value), in_value, hdferror)
! Free the MPI resources

View File

@ -25,8 +25,8 @@ SUBROUTINE pmultiple_dset_hyper_rw(do_collective, do_chunk, mpi_size, mpi_rank,
LOGICAL, INTENT(in) :: do_collective ! use collective IO
LOGICAL, INTENT(in) :: do_chunk ! use chunking
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(in) :: mpi_size ! number of processes in the group of communicator
INTEGER(KIND=MPI_INTEGER_KIND), INTENT(in) :: mpi_rank ! rank of the calling process in the communicator
INTEGER, INTENT(in) :: mpi_size ! number of processes in the group of communicator
INTEGER, INTENT(in) :: mpi_rank ! rank of the calling process in the communicator
INTEGER, INTENT(inout) :: nerrors ! number of errors
CHARACTER(LEN=80):: dsetname ! Dataset name
INTEGER(hsize_t), DIMENSION(1:2) :: cdims ! chunk dimensions
@ -156,7 +156,6 @@ SUBROUTINE pmultiple_dset_hyper_rw(do_collective, do_chunk, mpi_size, mpi_rank,
CALL h5dwrite_multi_f(ndsets, dset_id, mem_type_id, mem_space_id, file_space_id, buf_md, error, plist_id)
CALL check("h5dwrite_multi_f", error, nerrors)
return
CALL h5pget_dxpl_mpio_f(plist_id, data_xfer_mode, error)
CALL check("h5pget_dxpl_mpio_f", error, nerrors)

View File

@ -21,12 +21,12 @@ PROGRAM parallel_test
IMPLICIT NONE
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI hdferror flag
INTEGER :: mpierror ! MPI hdferror flag
INTEGER :: hdferror ! HDF hdferror flag
INTEGER :: ret_total_error = 0 ! number of errors in subroutine
INTEGER :: total_error = 0 ! sum of the number of errors
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size ! number of processes in the group of communicator
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_rank ! rank of the calling process in the communicator
INTEGER :: mpi_size ! number of processes in the group of communicator
INTEGER :: mpi_rank ! rank of the calling process in the communicator
INTEGER :: length = 12000 ! length of array
INTEGER :: i,j, sum
! use collective MPI I/O
@ -35,7 +35,6 @@ PROGRAM parallel_test
! use chunking
LOGICAL, DIMENSION(1:2) :: do_chunk = (/.FALSE.,.TRUE./)
CHARACTER(LEN=10), DIMENSION(1:2) :: chr_chunk =(/"contiguous", "chunk "/)
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_int_type
!
! initialize MPI
@ -72,7 +71,6 @@ PROGRAM parallel_test
!
! test write/read dataset by hyperslabs (contiguous/chunk) with independent/collective MPI I/O
!
DO i = 1, 2
DO j = 1, 2
ret_total_error = 0
@ -82,10 +80,10 @@ PROGRAM parallel_test
total_error)
ENDDO
ENDDO
!
! test write/read several datasets (independent MPI I/O)
!
ret_total_error = 0
CALL multiple_dset_write(length, do_collective(1), do_chunk(1), mpi_size, mpi_rank, ret_total_error)
IF(mpi_rank==0) CALL write_test_status(ret_total_error, &
@ -107,13 +105,7 @@ PROGRAM parallel_test
!
CALL h5close_f(hdferror)
IF(h5_sizeof(total_error).EQ.8_size_t)THEN
mpi_int_type=MPI_INTEGER8
ELSE
mpi_int_type=MPI_INTEGER4
ENDIF
CALL MPI_ALLREDUCE(total_error, sum, 1_MPI_INTEGER_KIND, mpi_int_type, MPI_SUM, MPI_COMM_WORLD, mpierror)
CALL MPI_ALLREDUCE(total_error, sum, 1, MPI_INTEGER, MPI_SUM, MPI_COMM_WORLD, mpierror)
IF(mpi_rank==0) CALL write_test_footer()
@ -127,7 +119,7 @@ PROGRAM parallel_test
ENDIF
ELSE
WRITE(*,*) 'Errors detected in process ', mpi_rank
CALL mpi_abort(MPI_COMM_WORLD, 1_MPI_INTEGER_KIND, mpierror)
CALL mpi_abort(MPI_COMM_WORLD, 1, mpierror)
IF (mpierror .NE. MPI_SUCCESS) THEN
WRITE(*,*) "MPI_ABORT *FAILED* Process = ", mpi_rank
ENDIF

View File

@ -25,30 +25,29 @@ PROGRAM subfiling_test
IMPLICIT NONE
INTEGER :: total_error = 0 ! sum of the number of errors
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI hdferror flag
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_rank ! rank of the calling process in the communicator
INTEGER :: mpierror ! MPI hdferror flag
INTEGER :: mpi_rank ! rank of the calling process in the communicator
#ifdef H5_HAVE_SUBFILING_VFD
INTEGER, PARAMETER :: logical_kind = MPI_INTEGER_KIND
CHARACTER(LEN=7), PARAMETER :: filename = "subf.h5"
INTEGER :: hdferror ! HDF hdferror flag
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_size_ret ! number of processes in the group of communicator
INTEGER(KIND=MPI_INTEGER_KIND) :: required, provided
INTEGER :: hdferror ! HDF hdferror flag
INTEGER :: mpi_size, mpi_size_ret ! number of processes in the group of communicator
INTEGER :: required, provided
LOGICAL :: file_exists
INTEGER(HID_T) :: fapl_id
INTEGER(HID_T) :: file_id
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, comm_ret
INTEGER(KIND=MPI_INTEGER_KIND) :: info, info_ret
INTEGER :: comm, comm_ret
INTEGER :: info, info_ret
CHARACTER(LEN=3) :: info_val
CHARACTER(LEN=180) :: subfname
INTEGER :: i, sum
INTEGER(C_INT64_T) inode
TYPE(H5FD_subfiling_config_t) :: vfd_config
TYPE(H5FD_ioc_config_t) :: vfd_config_ioc
LOGICAL(KIND=logical_kind) :: flag
LOGICAL :: flag
INTEGER :: nerrors = 0
@ -57,7 +56,6 @@ PROGRAM subfiling_test
CHARACTER(len=8) :: hex1, hex2
CHARACTER(len=1) :: arg
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_int_type
!
! initialize MPI
!
@ -86,7 +84,7 @@ PROGRAM subfiling_test
IF(mpi_rank==0) CALL write_test_status(sum, &
'Testing Initializing mpi_init_thread', total_error)
CALL MPI_Barrier(MPI_COMM_WORLD, mpierror)
CALL mpi_abort(MPI_COMM_WORLD, 1_MPI_INTEGER_KIND, mpierror)
CALL mpi_abort(MPI_COMM_WORLD, 1, mpierror)
ENDIF
!
@ -103,9 +101,9 @@ PROGRAM subfiling_test
IF(mpi_size.GT.2)THEN
IF (mpi_rank.LE.1)THEN
CALL MPI_Comm_split(MPI_COMM_WORLD, 1_MPI_INTEGER_KIND, mpi_rank, comm, mpierror)
CALL MPI_Comm_split(MPI_COMM_WORLD, 1, mpi_rank, comm, mpierror)
ELSE
CALL MPI_Comm_split(MPI_COMM_WORLD, 0_MPI_INTEGER_KIND, mpi_rank, comm, mpierror)
CALL MPI_Comm_split(MPI_COMM_WORLD, 0, mpi_rank, comm, mpierror)
ENDIF
CALL MPI_Info_create(info, mpierror)
@ -130,7 +128,7 @@ PROGRAM subfiling_test
nerrors = nerrors + 1
ENDIF
CALL mpi_info_get(info_ret,"foo", 3_MPI_INTEGER_KIND, info_val, flag, mpierror)
CALL mpi_info_get(info_ret,"foo", 3, info_val, flag, mpierror)
IF(flag .EQV. .TRUE.)THEN
IF(info_val.NE."bar")THEN
IF(mpi_rank.EQ.0) &
@ -150,13 +148,7 @@ PROGRAM subfiling_test
ENDIF
IF(h5_sizeof(total_error).EQ.8_size_t)THEN
mpi_int_type=MPI_INTEGER8
ELSE
mpi_int_type=MPI_INTEGER4
ENDIF
CALL MPI_REDUCE(nerrors, sum, 1_MPI_INTEGER_KIND, mpi_int_type, MPI_SUM, 0_MPI_INTEGER_KIND, MPI_COMM_WORLD, mpierror)
CALL MPI_REDUCE(nerrors, sum, 1, MPI_INTEGER, MPI_SUM, 0, MPI_COMM_WORLD, mpierror)
IF(mpi_rank==0) CALL write_test_status(sum, &
'Testing H5Pset/get_mpi_params_f', total_error)
@ -275,10 +267,10 @@ PROGRAM subfiling_test
! Testing modifying defaults for subfiling FD
vfd_config%magic = INT(H5FD_SUBFILING_FAPL_MAGIC_F,C_INT32_T)
vfd_config%version = INT(H5FD_SUBFILING_CURR_FAPL_VERSION_F,C_INT32_T)
vfd_config%magic = H5FD_SUBFILING_FAPL_MAGIC_F
vfd_config%version = H5FD_SUBFILING_CURR_FAPL_VERSION_F
vfd_config%require_ioc = .TRUE.
vfd_config%shared_cfg%ioc_selection = INT(SELECT_IOC_ONE_PER_NODE_F,C_INT)
vfd_config%shared_cfg%ioc_selection = SELECT_IOC_ONE_PER_NODE_F
vfd_config%shared_cfg%stripe_size = 16*1024*1024
vfd_config%shared_cfg%stripe_count = 3
@ -307,8 +299,8 @@ PROGRAM subfiling_test
IF(mpi_rank==0) CALL write_test_status(nerrors, &
'Testing H5Pset/get_fapl_subfiling_f with custom settings', total_error)
vfd_config_ioc%magic = INT(H5FD_IOC_FAPL_MAGIC_F,C_INT32_T)
vfd_config_ioc%version = INT(H5FD_IOC_CURR_FAPL_VERSION_F,C_INT32_T)
vfd_config_ioc%magic = H5FD_IOC_FAPL_MAGIC_F
vfd_config_ioc%version = H5FD_IOC_CURR_FAPL_VERSION_F
vfd_config_ioc%thread_pool_size = 2
nerrors = 0
@ -382,13 +374,7 @@ PROGRAM subfiling_test
!
CALL h5close_f(hdferror)
IF(h5_sizeof(total_error).EQ.8_size_t)THEN
mpi_int_type=MPI_INTEGER8
ELSE
mpi_int_type=MPI_INTEGER4
ENDIF
CALL MPI_ALLREDUCE(total_error, sum, 1_MPI_INTEGER_KIND, mpi_int_type, MPI_SUM, MPI_COMM_WORLD, mpierror)
CALL MPI_ALLREDUCE(total_error, sum, 1, MPI_INTEGER, MPI_SUM, MPI_COMM_WORLD, mpierror)
!
! close MPI
@ -400,7 +386,7 @@ PROGRAM subfiling_test
ENDIF
ELSE
WRITE(*,*) 'Errors detected in process ', mpi_rank
CALL mpi_abort(MPI_COMM_WORLD, 1_MPI_INTEGER_KIND, mpierror)
CALL mpi_abort(MPI_COMM_WORLD, 1, mpierror)
IF (mpierror .NE. MPI_SUCCESS) THEN
WRITE(*,*) "MPI_ABORT *FAILED* Process = ", mpi_rank
ENDIF

View File

@ -391,8 +391,6 @@ AC_DEFUN([PAC_FC_NATIVE_INTEGER],[
AC_REQUIRE([PAC_FC_AVAIL_KINDS])
AC_MSG_CHECKING([sizeof of native KINDS])
AC_LANG_PUSH([Fortran])
saved_FCFLAGS=$FCFLAGS
FCFLAGS=$saved_user_FCFLAGS
pack_int_sizeof=""
rm -f pac_fconftest.out
AC_LANG_CONFTEST([
@ -426,7 +424,6 @@ rm -f pac_fconftest.out
pack_int_sizeof="$2"
])
AC_MSG_RESULT([$pack_int_sizeof])
FCFLAGS=$saved_FCFLAGS
AC_LANG_POP([Fortran])
])