From 8b103979a2f0374b3ef4d6807c4539a7ca9b2e2e Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Sat, 23 Mar 2024 09:16:43 -0500 Subject: [PATCH] =?UTF-8?q?Revert=20"Addressed=20Fortran=20=20issues=20wit?= =?UTF-8?q?h=20promoted=20integers=20and=20reals=20via=20compil=E2=80=A6"?= =?UTF-8?q?=20(#4220)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 06c42ff0385b34317ecdc06b6aaf6e435fbc07ca. --- HDF5Examples/FORTRAN/H5G/h5ex_g_traverse.F90 | 5 +- .../FORTRAN/H5PAR/ph5_f90_dataset.F90 | 7 +- .../FORTRAN/H5PAR/ph5_f90_file_create.F90 | 6 +- .../H5PAR/ph5_f90_filtered_writes_no_sel.F90 | 18 ++-- .../H5PAR/ph5_f90_hyperslab_by_chunk.F90 | 6 +- .../H5PAR/ph5_f90_hyperslab_by_col.F90 | 6 +- .../H5PAR/ph5_f90_hyperslab_by_pattern.F90 | 6 +- .../H5PAR/ph5_f90_hyperslab_by_row.F90 | 6 +- .../FORTRAN/H5PAR/ph5_f90_subfiling.F90 | 38 ++++---- HDF5Examples/FORTRAN/H5T/h5ex_t_enum_F03.F90 | 8 +- .../FORTRAN/H5T/h5ex_t_enumatt_F03.F90 | 7 +- config/cmake/HDF5UseFortran.cmake | 6 -- fortran/src/H5Fff.F90 | 6 +- fortran/src/H5Lff.F90 | 4 +- fortran/src/H5Pf.c | 26 ++--- fortran/src/H5Pff.F90 | 95 ++++++------------- fortran/src/H5Sf.c | 2 +- fortran/src/H5f90proto.h | 8 +- fortran/test/tH5A.F90 | 5 +- fortran/test/tH5L_F03.F90 | 2 +- fortran/test/tH5O_F03.F90 | 8 +- fortran/test/tH5T_F03.F90 | 10 +- fortran/testpar/async.F90 | 90 +++++------------- fortran/testpar/hyper.F90 | 4 +- fortran/testpar/mdset.F90 | 4 +- fortran/testpar/mpi_param.F90 | 57 ++++++----- fortran/testpar/multidsetrw.F90 | 5 +- fortran/testpar/ptest.F90 | 20 ++-- fortran/testpar/subfiling.F90 | 54 ++++------- m4/aclocal_fc.m4 | 3 - 30 files changed, 206 insertions(+), 316 deletions(-) diff --git a/HDF5Examples/FORTRAN/H5G/h5ex_g_traverse.F90 b/HDF5Examples/FORTRAN/H5G/h5ex_g_traverse.F90 index 169a0044f74..198d437003a 100644 --- a/HDF5Examples/FORTRAN/H5G/h5ex_g_traverse.F90 +++ b/HDF5Examples/FORTRAN/H5G/h5ex_g_traverse.F90 @@ -84,9 +84,8 @@ RECURSIVE INTEGER(KIND=C_INT) FUNCTION op_func(loc_id, name, info, operator_data 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 @@ RECURSIVE INTEGER(KIND=C_INT) FUNCTION op_func(loc_id, name, info, operator_data 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)//"}" diff --git a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_dataset.F90 b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_dataset.F90 index b5c43a88fa5..f7e4185411a 100644 --- a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_dataset.F90 +++ b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_dataset.F90 @@ -25,10 +25,9 @@ PROGRAM DATASET ! ! 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) diff --git a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_file_create.F90 b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_file_create.F90 index a6965a1f2a1..b5aa090e643 100644 --- a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_file_create.F90 +++ b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_file_create.F90 @@ -18,9 +18,9 @@ PROGRAM FILE_CREATE ! ! 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 diff --git a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_filtered_writes_no_sel.F90 b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_filtered_writes_no_sel.F90 index 4a34d1f2ed0..ffec2fb54b2 100644 --- a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_filtered_writes_no_sel.F90 +++ b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_filtered_writes_no_sel.F90 @@ -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 @@ SUBROUTINE cleanup(filename) 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 @@ PROGRAM main 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 @@ PROGRAM main ! ------------------------------------ CALL cleanup(filename) - CALL MPI_Finalize(mpierror) + CALL MPI_Finalize(status) END PROGRAM main diff --git a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_chunk.F90 b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_chunk.F90 index c4f67fee60c..7be9389e77d 100644 --- a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_chunk.F90 +++ b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_chunk.F90 @@ -34,9 +34,9 @@ PROGRAM DATASET_BY_CHUNK ! ! 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 diff --git a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_col.F90 b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_col.F90 index b7e0b25de16..c439d63829f 100644 --- a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_col.F90 +++ b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_col.F90 @@ -30,9 +30,9 @@ PROGRAM DATASET_BY_COL ! ! 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) diff --git a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_pattern.F90 b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_pattern.F90 index f94c8192d0c..c7e8da13a7a 100644 --- a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_pattern.F90 +++ b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_pattern.F90 @@ -36,9 +36,9 @@ PROGRAM DATASET_BY_PATTERN ! ! 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 diff --git a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_row.F90 b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_row.F90 index f607b482561..66d5b250258 100644 --- a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_row.F90 +++ b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_row.F90 @@ -35,9 +35,9 @@ PROGRAM DATASET_BY_ROW ! ! 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 diff --git a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_subfiling.F90 b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_subfiling.F90 index 866200f3658..fc30717e1b9 100644 --- a/HDF5Examples/FORTRAN/H5PAR/ph5_f90_subfiling.F90 +++ b/HDF5Examples/FORTRAN/H5PAR/ph5_f90_subfiling.F90 @@ -60,8 +60,8 @@ SUBROUTINE subfiling_write_default(fapl_id, mpi_size, mpi_rank) 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 @@ SUBROUTINE subfiling_write_custom(fapl_id, mpi_size, mpi_rank) 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 @@ SUBROUTINE subfiling_write_precreate(fapl_id, mpi_size, mpi_rank) 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 @@ SUBROUTINE subfiling_write_precreate(fapl_id, mpi_size, mpi_rank) 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 @@ SUBROUTINE subfiling_write_precreate(fapl_id, mpi_size, mpi_rank) 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 diff --git a/HDF5Examples/FORTRAN/H5T/h5ex_t_enum_F03.F90 b/HDF5Examples/FORTRAN/H5T/h5ex_t_enum_F03.F90 index dd480738f4d..b0ba276dfb9 100644 --- a/HDF5Examples/FORTRAN/H5T/h5ex_t_enum_F03.F90 +++ b/HDF5Examples/FORTRAN/H5T/h5ex_t_enum_F03.F90 @@ -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(*,'("]")') diff --git a/HDF5Examples/FORTRAN/H5T/h5ex_t_enumatt_F03.F90 b/HDF5Examples/FORTRAN/H5T/h5ex_t_enumatt_F03.F90 index 13a289bd786..ec641b3ede6 100644 --- a/HDF5Examples/FORTRAN/H5T/h5ex_t_enumatt_F03.F90 +++ b/HDF5Examples/FORTRAN/H5T/h5ex_t_enumatt_F03.F90 @@ -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(*,'("]")') diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 743da3d3560..73b4f742b48 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -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 ) diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 index 0c8b1d84099..e8b765b7696 100644 --- a/fortran/src/H5Fff.F90 +++ b/fortran/src/H5Fff.F90 @@ -120,10 +120,10 @@ SUBROUTINE h5fcreate_f(name, access_flags, file_id, hdferr, & 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 @@ END FUNCTION H5Fcreate 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 diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90 index 50a605a67db..004e5b23fdd 100644 --- a/fortran/src/H5Lff.F90 +++ b/fortran/src/H5Lff.F90 @@ -1555,7 +1555,7 @@ INTEGER(C_INT) FUNCTION H5Lvisit(grp_id, idx_type, order, op, op_data) BIND(C, N 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 @@ END FUNCTION H5Lvisit_by_name 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 diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 17045a25570..87e6bfbebe6 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -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; } diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index f5e50c90383..ab6765a8874 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -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 @@ END SUBROUTINE h5pget_file_image_f 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 @@ END SUBROUTINE h5pset_fapl_mpio_f 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_fapl_mpio_f08(prp_id, comm, info, 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 @@ SUBROUTINE h5pget_fapl_mpio_f08(prp_id, comm, info, hdferr) 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_mpio_no_collective_cause_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 H5Pset_mpi_params_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 H5Pset_mpi_params_f08 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_mpi_params_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 @@ SUBROUTINE H5Pget_mpi_params_f08(prp_id, comm, info, hdferr) 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 diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index 22130fc9bd8..41616f81dff 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -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); diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 71d914c1d26..0da371f5e17 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -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 diff --git a/fortran/test/tH5A.F90 b/fortran/test/tH5A.F90 index ff7ee60053e..23b1addd3ce 100644 --- a/fortran/test/tH5A.F90 +++ b/fortran/test/tH5A.F90 @@ -100,11 +100,12 @@ SUBROUTINE attribute_test(cleanup, total_error) 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 @@ SUBROUTINE attribute_test(cleanup, total_error) 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) diff --git a/fortran/test/tH5L_F03.F90 b/fortran/test/tH5L_F03.F90 index a4ece4d7fe4..a8345c3ca58 100644 --- a/fortran/test/tH5L_F03.F90 +++ b/fortran/test/tH5L_F03.F90 @@ -162,7 +162,7 @@ INTEGER(KIND=C_INT) FUNCTION lvisit_cb(group, name, link_info, op_data) bind(C) 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 diff --git a/fortran/test/tH5O_F03.F90 b/fortran/test/tH5O_F03.F90 index f9cad325f3b..a4cf282ecca 100644 --- a/fortran/test/tH5O_F03.F90 +++ b/fortran/test/tH5O_F03.F90 @@ -118,10 +118,10 @@ INTEGER FUNCTION compare_h5o_info_t( loc_id, oinfo_f, oinfo_c, field, full_f_fie 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 diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90 index a59cd73f751..65804d0d091 100644 --- a/fortran/test/tH5T_F03.F90 +++ b/fortran/test/tH5T_F03.F90 @@ -709,8 +709,8 @@ SUBROUTINE test_array_bkg(total_error) 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 @@ SUBROUTINE test_array_bkg(total_error) ! -------------------------------- 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 diff --git a/fortran/testpar/async.F90 b/fortran/testpar/async.F90 index aa2416fd24d..5c7411f6ddb 100644 --- a/fortran/testpar/async.F90 +++ b/fortran/testpar/async.F90 @@ -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 - 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 @@ INTEGER(KIND=C_INT) FUNCTION liter_cb(group, name, link_info, op_data) bind(C) 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 @@ SUBROUTINE H5D_async_tests(cleanup, total_error) 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 @@ SUBROUTINE H5D_async_tests(cleanup, total_error) 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 @@ SUBROUTINE H5G_async_tests(cleanup, total_error) 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 @@ SUBROUTINE H5F_async_tests(cleanup, total_error) 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 @@ SUBROUTINE H5L_async_tests(cleanup, total_error) 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 @@ SUBROUTINE H5O_async_tests(cleanup, total_error) 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 diff --git a/fortran/testpar/hyper.F90 b/fortran/testpar/hyper.F90 index 61a3e260797..ec3a657afbb 100644 --- a/fortran/testpar/hyper.F90 +++ b/fortran/testpar/hyper.F90 @@ -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 diff --git a/fortran/testpar/mdset.F90 b/fortran/testpar/mdset.F90 index 95e401137e6..6757f4d7491 100644 --- a/fortran/testpar/mdset.F90 +++ b/fortran/testpar/mdset.F90 @@ -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 diff --git a/fortran/testpar/mpi_param.F90 b/fortran/testpar/mpi_param.F90 index a57a4c57edd..ba4eaaae963 100644 --- a/fortran/testpar/mpi_param.F90 +++ b/fortran/testpar/mpi_param.F90 @@ -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(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 :: 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 :: 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 diff --git a/fortran/testpar/multidsetrw.F90 b/fortran/testpar/multidsetrw.F90 index 62eb5d1e8bb..e39900c9158 100644 --- a/fortran/testpar/multidsetrw.F90 +++ b/fortran/testpar/multidsetrw.F90 @@ -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) diff --git a/fortran/testpar/ptest.F90 b/fortran/testpar/ptest.F90 index 3d7280bbcf8..d2e9d105703 100644 --- a/fortran/testpar/ptest.F90 +++ b/fortran/testpar/ptest.F90 @@ -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 diff --git a/fortran/testpar/subfiling.F90 b/fortran/testpar/subfiling.F90 index 876c1ccf822..a677bea6121 100644 --- a/fortran/testpar/subfiling.F90 +++ b/fortran/testpar/subfiling.F90 @@ -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 diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index f8f4fa123b1..f7427924ee2 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -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]) ])