diff --git a/cmake/gtest_helper.cmake b/cmake/gtest_helper.cmake index 7daae6ea8cfba241a97a19bb09e4d616524c73c8..0dc050948fa78a7644c275065fce8213c8dbdedc 100644 --- a/cmake/gtest_helper.cmake +++ b/cmake/gtest_helper.cmake @@ -24,7 +24,7 @@ macro(add_icon_c_test test_name file_name) add_executable("CTest_${test_name}" ${file_name}) target_link_libraries( "CTest_${test_name}" PRIVATE fortran-support::fortran-support - GTest::gtest_main stdc++fs) + GTest::gtest_main) add_test(NAME "CTest_${test_name}" COMMAND "CTest_${test_name}") set_property(TEST "CTest_${test_name}" PROPERTY LABELS C) set_target_properties("CTest_${test_name}" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index eb2a21e1ba2fff681a3323b9c0276e0cbf2c4867..18d805455b17878bbd4fccf5e0e5f4ef4d6061ab 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -26,6 +26,7 @@ endif() add_library( fortran-support ${CMAKE_CURRENT_BINARY_DIR}/config.h + fortran_support.F90 mo_exception.F90 mo_expression.F90 mo_fortran_tools.F90 diff --git a/src/fortran_support.F90 b/src/fortran_support.F90 new file mode 100644 index 0000000000000000000000000000000000000000..359c33a0c9a34111366d81abb47189513bd3d589 --- /dev/null +++ b/src/fortran_support.F90 @@ -0,0 +1,173 @@ +! ICON +! +! --------------------------------------------------------------- +! Copyright (C) 2004-2024, DWD, MPI-M, DKRZ, KIT, ETH, MeteoSwiss +! Contact information: icon-model.org +! +! See AUTHORS.TXT for a list of authors +! See LICENSES/ for license information +! SPDX-License-Identifier: BSD-3-Clause +! --------------------------------------------------------------- + +! Public interface for the fortran-support library +MODULE fortran_support + + USE mo_exception, ONLY: init_logger, debug_on, debug_off, & + & set_msg_timestamp, enable_logging, message, warning, finish, & + & print_value, message_to_own_unit, message_text + USE mo_expression, ONLY: expression, parse_expression_string + USE mo_fortran_tools, ONLY: assign_if_present, t_ptr_2d3d, t_ptr_2d3d_vp, & + & assign_if_present_allocatable, if_associated, t_ptr_1d, t_ptr_1d_sp, & + & t_ptr_1d_int, t_ptr_1d_ptr_1d, t_ptr_2d, t_ptr_2d_sp, t_ptr_2d_int, & + & t_ptr_3d, t_ptr_3d_sp, t_ptr_3d_int, t_ptr_i2d3d, t_ptr_4d, t_ptr_4d_sp, & + & t_ptr_4d_int, t_ptr_tracer, copy, init, swap, negative2zero, var_scale, & + & var_add, init_zero_contiguous_dp, init_zero_contiguous_sp, & + & init_contiguous_dp, init_contiguous_sp, init_contiguous_i4, & + & init_contiguous_l, minval_1d, minval_2d, resize_arr_c1d, DO_DEALLOCATE, & + & DO_PTR_DEALLOCATE, insert_dimension, assert_acc_host_only, & + & assert_acc_device_only, assert_lacc_equals_i_am_accel_node, & + & set_acc_host_or_device + USE mo_hash_table, ONLY: t_HashTable, hashTable_make, t_HashIterator + USE mo_io_units, ONLY: filename_max, nerr, nlog, nnml, nstat, ngmt, nin, & + & nout, nnml_output, find_next_free_unit + USE mo_namelist, ONLY: position_nml, open_nml, close_nml, POSITIONED, & + & MISSING, LENGTH_ERROR, READ_ERROR, open_nml_output, close_nml_output + USE mo_octree, ONLY: octree_init, octree_finalize, octree_count_point, & + & octree_query_point, t_range_octree, OCTREE_DEPTH + USE mo_simple_dump, ONLY: dump2text + USE mo_util_backtrace, ONLY: ftn_util_backtrace + USE mo_util_file, ONLY: util_symlink, util_unlink, util_islink, util_rename, & + & util_tmpnam, util_filesize, util_file_is_writable, createSymlink, & + & get_filename, get_filename_noext, get_path + USE mo_util_libc, ONLY: memset_f, memcmp_f, memcpy_f, strerror + USE mo_util_nml, ONLY: util_annotate_nml + USE mo_util_rusage, ONLY: add_rss_list, add_rss_usage, print_rss_usage, & + & close_rss_lists + USE mo_util_sort, ONLY: quicksort, insertion_sort +#ifdef __SX__ + USE mo_util_sort, ONLY: radixsort, radixsort_int +#endif + USE mo_util_stride, ONLY: util_stride_1d, util_stride_2d, util_get_ptrdiff + USE mo_util_string, ONLY: tolower, lowcase, toupper, separator, int2string, & + & real2string, logical2string, split_string, string_contains_word, & + & tocompact, str_replace, t_keyword_list, associate_keyword, & + & with_keywords, remove_duplicates, difference, add_to_list, one_of, & + & insert_group, delete_keyword_list, sort_and_compress_list, tohex, & + & remove_whitespace, pretty_print_string_list, find_trailing_number, & + & toCharArray, toCharacter, c2f_char, charArray_dup, charArray_equal, & + & charArray_toLower, normal, bold, fg_black, fg_red, fg_green, fg_yellow, & + & fg_blue, fg_magenta, fg_cyan, fg_white, fg_default, bg_black, bg_red, & + & bg_green, bg_yellow, bg_blue, bg_magenta, bg_cyan, bg_white, bg_default, & + & new_list + USE mo_util_string_parse, ONLY: util_do_parse_intlist + USE mo_util_system, ONLY: util_exit, util_abort, util_system +#ifdef __XT3__ + USE mo_util_system, ONLY: util_base_iobuf +#endif + USE mo_util_table, ONLY: initialize_table, finalize_table, add_table_column, & + & set_table_entry, print_table, t_table, t_column + USE mo_util_texthash, ONLY: text_hash, text_hash_c, text_isEqual, sel_char + USE mo_util_timer, ONLY: util_cputime, util_walltime, util_gettimeofday, & + & util_init_real_time, util_get_real_time_size, util_read_real_time, & + & util_diff_real_time + + ! From mo_exception + PUBLIC :: init_logger, debug_on, debug_off, set_msg_timestamp, & + & enable_logging, message, warning, finish, print_value, & + & message_to_own_unit, message_text + + ! From mo_expression + PUBLIC :: expression, parse_expression_string + + ! From mo_fortran_tools + PUBLIC :: assign_if_present, t_ptr_2d3d, t_ptr_2d3d_vp, & + & assign_if_present_allocatable, if_associated, t_ptr_1d, t_ptr_1d_sp, & + & t_ptr_1d_int, t_ptr_1d_ptr_1d, t_ptr_2d, t_ptr_2d_sp, t_ptr_2d_int, & + & t_ptr_3d, t_ptr_3d_sp, t_ptr_3d_int, t_ptr_i2d3d, t_ptr_4d, t_ptr_4d_sp, & + & t_ptr_4d_int, t_ptr_tracer, copy, init, swap, negative2zero, var_scale, & + & var_add, init_zero_contiguous_dp, init_zero_contiguous_sp, & + & init_contiguous_dp, init_contiguous_sp, init_contiguous_i4, & + & init_contiguous_l, minval_1d, minval_2d, resize_arr_c1d, DO_DEALLOCATE, & + & DO_PTR_DEALLOCATE, insert_dimension, assert_acc_host_only, & + & assert_acc_device_only, assert_lacc_equals_i_am_accel_node, & + & set_acc_host_or_device + + ! From mo_hash_table + PUBLIC :: t_HashTable, hashTable_make, t_HashIterator + + ! From mo_io_units + PUBLIC :: filename_max, nerr, nlog, nnml, nstat, ngmt, nin, nout, & + & nnml_output, find_next_free_unit + + ! From mo_namelist + PUBLIC :: position_nml, open_nml, close_nml, POSITIONED, MISSING, & + & LENGTH_ERROR, READ_ERROR, open_nml_output, close_nml_output + + ! From mo_octree + PUBLIC :: octree_init, octree_finalize, octree_count_point, & + & octree_query_point, t_range_octree, OCTREE_DEPTH + + ! From mo_simple_dump + PUBLIC :: dump2text + + ! From mo_util_backtrace + PUBLIC :: ftn_util_backtrace + + ! From mo_util_file + PUBLIC :: util_symlink, util_unlink, util_islink, util_rename, util_tmpnam, & + & util_filesize, util_file_is_writable, createSymlink, get_filename, & + & get_filename_noext, get_path + + ! From mo_util_libc + PUBLIC :: memset_f, memcmp_f, memcpy_f, strerror + + ! From mo_util_nml + PUBLIC :: util_annotate_nml + + ! From mo_util_rusage + PUBLIC :: add_rss_list, add_rss_usage, print_rss_usage, close_rss_lists + + ! From mo_util_sort + PUBLIC :: quicksort, insertion_sort +#ifdef __SX__ + PUBLIC :: radixsort, radixsort_int +#endif + + ! From mo_util_stride + PUBLIC :: util_stride_1d, util_stride_2d, util_get_ptrdiff + + ! From mo_util_string + PUBLIC :: tolower, lowcase, toupper, separator, int2string, real2string, & + & logical2string, split_string, string_contains_word, tocompact, & + & str_replace, t_keyword_list, associate_keyword, with_keywords, & + & remove_duplicates, difference, add_to_list, one_of, insert_group, & + & delete_keyword_list, sort_and_compress_list, tohex, remove_whitespace, & + & pretty_print_string_list, find_trailing_number, toCharArray, & + & toCharacter, c2f_char, charArray_dup, charArray_equal, & + & charArray_toLower, normal, bold, fg_black, fg_red, fg_green, fg_yellow, & + & fg_blue, fg_magenta, fg_cyan, fg_white, fg_default, bg_black, bg_red, & + & bg_green, bg_yellow, bg_blue, bg_magenta, bg_cyan, bg_white, bg_default, & + & new_list + + ! From mo_util_string_parse + PUBLIC :: util_do_parse_intlist + + ! From mo_util_system + PUBLIC :: util_exit, util_abort, util_system +#ifdef __XT3__ + PUBLIC :: util_base_iobuf +#endif + + ! From mo_util_table + PUBLIC :: initialize_table, finalize_table, add_table_column, & + & set_table_entry, print_table, t_table, t_column + + ! From mo_util_texthash + PUBLIC :: text_hash, text_hash_c, text_isEqual, sel_char + + ! From mo_util_timer + PUBLIC :: util_cputime, util_walltime, util_gettimeofday, & + & util_init_real_time, util_get_real_time_size, util_read_real_time, & + & util_diff_real_time + +END MODULE diff --git a/src/mo_namelist.F90 b/src/mo_namelist.F90 index 914e81f041c2c6b13bbd7c1d672103e05abac2a9..32522a3d10f4476fced6be9e6a3c39bebd68e924 100644 --- a/src/mo_namelist.F90 +++ b/src/mo_namelist.F90 @@ -37,7 +37,6 @@ MODULE mo_namelist PUBLIC :: open_nml_output PUBLIC :: close_nml_output - PUBLIC :: nnml ! return values of function 'position_nml': diff --git a/test/fortran/helpers.f90 b/test/fortran/helpers.f90 index c30ead76b568b328f16ed64f0ce01be35b234adc..602f26231fe7a776694d1c84a6f26f88e4a58a29 100644 --- a/test/fortran/helpers.f90 +++ b/test/fortran/helpers.f90 @@ -11,8 +11,7 @@ MODULE helpers USE ISO_C_BINDING, ONLY: c_double - USE mo_io_units, ONLY: find_next_free_unit - USE mo_exception, ONLY: message + USE fortran_support, ONLY: find_next_free_unit, message USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: wp => real64 CONTAINS diff --git a/test/fortran/test_backtrace.f90 b/test/fortran/test_backtrace.f90 index ef4e94a05b4565b4b78afdb01e26ce7e967179f9..c5e507b0c71ed58c16827d06953b817543f37be2 100644 --- a/test/fortran/test_backtrace.f90 +++ b/test/fortran/test_backtrace.f90 @@ -11,10 +11,13 @@ MODULE TEST_mo_util_backtrace USE FORTUTF + USE fortran_support, ONLY: ftn_util_backtrace + CONTAINS + SUBROUTINE TEST_ftn_util_backtrace - USE mo_util_backtrace, ONLY: ftn_util_backtrace CALL TAG_TEST("TEST_ftn_util_backtrace") CALL ftn_util_backtrace() END SUBROUTINE + END MODULE TEST_mo_util_backtrace diff --git a/test/fortran/test_exception.f90 b/test/fortran/test_exception.f90 index 58b5316d3d2055919788da74e1a957b8af0f44e6..ebb99fb949dfecf55f8789dfb2a7dab88a1dc207 100644 --- a/test/fortran/test_exception.f90 +++ b/test/fortran/test_exception.f90 @@ -12,9 +12,13 @@ MODULE test_mo_exception USE FORTUTF USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: wp => real64, & - i8 => int64 - USE mo_exception - USE mo_io_units, ONLY: find_next_free_unit + & i8 => int64 + ! From mo_exception + USE fortran_support, ONLY: init_logger, message, message_to_own_unit, & + & debug_on, debug_off, warning, print_value, finish, set_msg_timestamp, & + & enable_logging + ! From other modules + USE fortran_support, ONLY: find_next_free_unit USE helpers, ONLY: custom_exit, open_logfile, open_new_logfile, custom_exit_dummy CONTAINS diff --git a/test/fortran/test_expression.f90 b/test/fortran/test_expression.f90 index 4920693ef7363ac8500a845b1b4570ca8202944a..1b0d76fc9a42e9f0f1864459263530596b9500c8 100644 --- a/test/fortran/test_expression.f90 +++ b/test/fortran/test_expression.f90 @@ -11,7 +11,7 @@ MODULE test_mo_expression USE FORTUTF - USE mo_expression + USE fortran_support, ONLY: expression USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: wp => real64 CONTAINS diff --git a/test/fortran/test_fortran_tools.f90 b/test/fortran/test_fortran_tools.f90 index 19f9dfa5aca5f6d74f81f036d699c67a8cf11b79..5ed6d3537df4dade8b80f4ee086030bb29bb2cb3 100644 --- a/test/fortran/test_fortran_tools.f90 +++ b/test/fortran/test_fortran_tools.f90 @@ -14,8 +14,15 @@ MODULE test_fortran_tools USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: dp => real64, & & sp => real32, & & i4 => int32 - USE mo_fortran_tools - USE mo_exception, ONLY: init_logger, finish + ! From mo_fortran_tools + USE fortran_support, ONLY: assign_if_present, assign_if_present_allocatable, & + & if_associated, copy, init, swap, negative2zero, var_scale, var_add, & + & init_zero_contiguous_dp, init_zero_contiguous_sp, init_contiguous_dp, & + & init_contiguous_sp, init_contiguous_i4, init_contiguous_l, minval_1d, & + & minval_2d, resize_arr_c1d, DO_DEALLOCATE, DO_PTR_DEALLOCATE, & + & insert_dimension + ! From other modules + USE fortran_support, ONLY: init_logger, finish USE helpers, ONLY: open_logfile, open_new_logfile, custom_exit_dummy CONTAINS diff --git a/test/fortran/test_hash_table.f90 b/test/fortran/test_hash_table.f90 index 5d5ba0d99525883bc858a3ac2d12c049875891fd..2ba2377259a6f5a6a28a2ecd689e1b67c5a897b2 100644 --- a/test/fortran/test_hash_table.f90 +++ b/test/fortran/test_hash_table.f90 @@ -11,7 +11,10 @@ MODULE TEST_mo_hash_table USE FORTUTF - USE mo_util_texthash, ONLY: text_hash_c + ! From mo_hash_table + USE fortran_support, ONLY: t_HashTable, hashTable_make, t_HashIterator + ! From other modules + USE fortran_support, ONLY: text_hash, text_isEqual TYPE :: t_Key INTEGER :: val @@ -24,8 +27,6 @@ MODULE TEST_mo_hash_table CONTAINS SUBROUTINE TEST_hash_table_int - USE mo_hash_table - USE mo_util_texthash, ONLY: text_hash, text_isEqual TYPE(t_HashTable), POINTER :: hashTable TYPE(t_HashIterator) :: iterator diff --git a/test/fortran/test_octree.f90 b/test/fortran/test_octree.f90 index 87e940318d4fa68fcdbca523197a4596f2899c66..ffd52ce4e459837f9e575ca941e344079e47c515 100644 --- a/test/fortran/test_octree.f90 +++ b/test/fortran/test_octree.f90 @@ -12,14 +12,14 @@ MODULE test_mo_octree USE FORTUTF USE ISO_C_BINDING, ONLY: c_double + USE fortran_support, ONLY: t_range_octree, octree_init, octree_finalize, & + & octree_count_point, octree_query_point + USE helpers, ONLY: rrand CONTAINS SUBROUTINE TEST_octree_1 - USE mo_octree, ONLY: t_range_octree, octree_init, octree_finalize, & - & octree_count_point, octree_query_point - USE helpers, ONLY: rrand IMPLICIT NONE INTEGER, PARAMETER :: SUCCESS = 0 diff --git a/test/fortran/test_sort.f90 b/test/fortran/test_sort.f90 index 89048e4c86f75624da1fd1f2442dcda6378f521f..1f3462cb9b168eb68be292c97f40183d60ab5cb5 100644 --- a/test/fortran/test_sort.f90 +++ b/test/fortran/test_sort.f90 @@ -12,10 +12,10 @@ MODULE TEST_mo_util_sort USE FORTUTF USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: wp => real64 + USE fortran_support, ONLY: quicksort, insertion_sort CONTAINS SUBROUTINE TEST_quicksort_real - USE mo_util_sort, ONLY: quicksort REAL(wp) :: to_sort(6) = (/144.4, 58.6, 4.3, 7.8, 10.0, 11.0/) CALL TAG_TEST("TEST_quicksort_real_before") CALL ASSERT_EQUAL(is_sorted_real(to_sort), .FALSE.) @@ -27,7 +27,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_quicksort_real2 - USE mo_util_sort, ONLY: quicksort REAL(wp) :: to_sort(6) = (/144.4, 11.0, 4.3, 58.6, 10.0, 7.8/) CALL TAG_TEST("TEST_quicksort_real2_before") CALL ASSERT_EQUAL(is_sorted_real(to_sort), .FALSE.) @@ -39,7 +38,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_quicksort_real_random - USE mo_util_sort, ONLY: quicksort REAL(wp) :: to_sort(6) ! Generate random numbers geq 0.0 and < 256.0 CALL RANDOM_NUMBER(to_sort) @@ -52,7 +50,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_quicksort_permutation_real - USE mo_util_sort, ONLY: quicksort REAL(wp) :: to_sort(6) = (/144.4, 58.6, 4.3, 7.8, 10.0, 11.0/) INTEGER :: idx_permutation(6) = (/1, 2, 3, 4, 5, 6/) CALL TAG_TEST("TEST_quicksort_permutation_real_before") @@ -67,7 +64,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_quicksort_int - USE mo_util_sort, ONLY: quicksort INTEGER :: to_sort(6) = (/144, 58, 4, 7, 10, 11/) CALL TAG_TEST("TEST_quicksort_int_before") CALL ASSERT_EQUAL(is_sorted_int(to_sort), .FALSE.) @@ -79,7 +75,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_quicksort_int2 - USE mo_util_sort, ONLY: quicksort INTEGER :: to_sort(6) = (/58, 4, 144, 10, 7, 11/) CALL TAG_TEST("TEST_quicksort_int2_before") CALL ASSERT_EQUAL(is_sorted_int(to_sort), .FALSE.) @@ -91,7 +86,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_quicksort_int_random - USE mo_util_sort, ONLY: quicksort INTEGER :: to_sort(6) REAL(wp) :: random_wp(6) ! Generate random numbers between 0 and 255 @@ -105,7 +99,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_quicksort_permutation_int - USE mo_util_sort, ONLY: quicksort INTEGER :: to_sort(6) = (/144, 58, 4, 7, 10, 11/) INTEGER :: idx_permutation(6) = (/1, 2, 3, 4, 5, 6/) CALL TAG_TEST("TEST_quicksort_permutation_int_before") @@ -120,7 +113,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_quicksort_string - USE mo_util_sort, ONLY: quicksort CHARACTER :: to_sort(6) = (/'A', 'C', 'Y', 'E', 'S', 'H'/) CALL TAG_TEST("TEST_quicksort_string_before") CALL ASSERT_EQUAL(is_sorted_string(to_sort), .FALSE.) @@ -132,7 +124,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_quicksort_string2 - USE mo_util_sort, ONLY: quicksort CHARACTER :: to_sort(6) = (/'Y', 'H', 'A', 'S', 'E', 'C'/) CALL TAG_TEST("TEST_quicksort_string2_before") CALL ASSERT_EQUAL(is_sorted_string(to_sort), .FALSE.) @@ -144,7 +135,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_quicksort_string3 - USE mo_util_sort, ONLY: quicksort CHARACTER :: to_sort(6) = (/'P', 'M', 'W', 'G', 'K', 'D'/) CALL TAG_TEST("TEST_quicksort_string3_before") CALL ASSERT_EQUAL(is_sorted_string(to_sort), .FALSE.) @@ -156,7 +146,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_quicksort_string4 - USE mo_util_sort, ONLY: quicksort CHARACTER :: to_sort(6) = (/'B', 'L', 'Q', 'S', 'Z', 'T'/) CALL TAG_TEST("TEST_quicksort_string4_before") CALL ASSERT_EQUAL(is_sorted_string(to_sort), .FALSE.) @@ -168,7 +157,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_insertion_sort_int - USE mo_util_sort, ONLY: insertion_sort INTEGER :: to_sort(6) = (/144, 58, 4, 7, 10, 11/) CALL TAG_TEST("TEST_insertion_sort_int_before") CALL ASSERT_EQUAL(is_sorted_int(to_sort), .FALSE.) @@ -180,7 +168,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_insertion_sort_int_random - USE mo_util_sort, ONLY: insertion_sort INTEGER :: to_sort(6) REAL(wp) :: random_wp(6) ! Generate random numbers between 0 and 255 diff --git a/test/fortran/test_text_hash.f90 b/test/fortran/test_text_hash.f90 index c3e333856e4cf58f11fc84ebc112487de30a493c..b9b30a2a81878491cdd8ecf51e248bc472848418 100644 --- a/test/fortran/test_text_hash.f90 +++ b/test/fortran/test_text_hash.f90 @@ -11,22 +11,20 @@ MODULE TEST_mo_util_texthash USE FORTUTF + USE fortran_support, ONLY: text_hash_c, text_hash, text_isEqual, sel_char CONTAINS SUBROUTINE TEST_text_hash_c_short - USE mo_util_texthash CALL TAG_TEST("TEST_text_c_hash") CALL ASSERT_EQUAL(text_hash_c('Unittest'), 345061529) END SUBROUTINE SUBROUTINE TEST_text_hash_c_long - USE mo_util_texthash CALL TAG_TEST("TEST_text_hash_c_long") CALL ASSERT_EQUAL(text_hash_c('UnittestFrameworkFortran'), 1314345762) END SUBROUTINE SUBROUTINE TEST_text_hash_short - USE mo_util_texthash CLASS(*), POINTER :: ptr_word CHARACTER(8), TARGET :: word CALL TAG_TEST("TEST_text_hash") @@ -37,7 +35,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_text_hash_long - USE mo_util_texthash CLASS(*), POINTER :: ptr_word CHARACTER(24), TARGET :: word CALL TAG_TEST("TEST_text_hash_long") @@ -48,7 +45,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_text_isEqual - USE mo_util_texthash CLASS(*), POINTER :: ptr_word_1, ptr_word_2 CHARACTER(17), TARGET :: word_1, word_2, word_3 word_1 = 'UnittestFramework' @@ -66,7 +62,6 @@ CONTAINS END SUBROUTINE SUBROUTINE TEST_sel_char - USE mo_util_texthash CLASS(*), POINTER :: ptr_word_1 CHARACTER(17), TARGET :: word_1, word_2 word_1 = 'UnittestFramework' diff --git a/test/fortran/test_util_string.f90 b/test/fortran/test_util_string.f90 index 3839e9a6aed7645bbd6ad5f612977986056fe75d..9b93a6e33948b8d4fd9b547957f1524c9d883556 100644 --- a/test/fortran/test_util_string.f90 +++ b/test/fortran/test_util_string.f90 @@ -11,7 +11,12 @@ MODULE TEST_STRING USE FORTUTF - USE mo_util_string + USE fortran_support, ONLY: tolower, lowcase, tocompact, int2string, & + & real2string, logical2string, str_replace, remove_duplicates, difference, & + & new_list, add_to_list, remove_whitespace, c2f_char, charArray_equal, & + & charArray_toLower, pretty_print_string_list, find_trailing_number, & + & tohex, sort_and_compress_list, insert_group, t_keyword_list, & + & associate_keyword, with_keywords USE ISO_C_BINDING, ONLY: c_char USE helpers, ONLY: open_logfile, open_new_logfile diff --git a/test/fortran/test_util_table.f90 b/test/fortran/test_util_table.f90 index 8f957656afdb25687037062c0b6a3b321f3e6755..03f0ef19d7767401a5c5a9144e613e5cee785f2a 100644 --- a/test/fortran/test_util_table.f90 +++ b/test/fortran/test_util_table.f90 @@ -11,7 +11,8 @@ MODULE test_mo_util_table USE FORTUTF - USE mo_util_table, ONLY: t_table, initialize_table, add_table_column, set_table_entry, print_table + USE fortran_support, ONLY: t_table, initialize_table, add_table_column, & + & set_table_entry, print_table USE helpers, ONLY: open_logfile, open_new_logfile CONTAINS diff --git a/test/fortran/test_util_timer.f90 b/test/fortran/test_util_timer.f90 index 5b51be8f9f771ea3a9f948e0277e2af095f158fc..ad59ed93bb321cb119269b31296f77b9a86a3ea2 100644 --- a/test/fortran/test_util_timer.f90 +++ b/test/fortran/test_util_timer.f90 @@ -11,12 +11,12 @@ MODULE test_mo_util_timer USE FORTUTF + USE fortran_support, ONLY: util_gettimeofday CONTAINS SUBROUTINE TEST_cputime USE ISO_C_BINDING, ONLY: c_ptr, c_double, c_int - USE mo_util_timer REAL(c_double) :: time1, time2 CALL TAG_TEST("TEST_gettimeofday")