From 45b0823023025a6e3b0d61c538d81dd7e5fb98f3 Mon Sep 17 00:00:00 2001 From: Damian Rouson Date: Fri, 14 Jul 2023 19:13:22 -0700 Subject: [PATCH 1/3] feat(formats_m): rm nagfor workaround Now that the NAG compiler supports assumed-rank dummy objects, the C preprocessor macros that guarded against the feature are no longer needed. --- src/sourcery/{formats_m.F90 => formats_m.f90} | 4 ---- src/sourcery/{formats_s.F90 => formats_s.f90} | 4 ---- 2 files changed, 8 deletions(-) rename src/sourcery/{formats_m.F90 => formats_m.f90} (89%) rename src/sourcery/{formats_s.F90 => formats_s.f90} (95%) diff --git a/src/sourcery/formats_m.F90 b/src/sourcery/formats_m.f90 similarity index 89% rename from src/sourcery/formats_m.F90 rename to src/sourcery/formats_m.f90 index f6d89011..0a82f35c 100644 --- a/src/sourcery/formats_m.F90 +++ b/src/sourcery/formats_m.f90 @@ -9,11 +9,7 @@ module formats_m pure module function separated_values(separator, mold) result(format_string) character(len=*), intent(in) :: separator -#ifndef NAGFOR class(*), intent(in) :: mold(..) -#else - class(*), intent(in) :: mold(:) -#endif character(len=:), allocatable :: format_string end function diff --git a/src/sourcery/formats_s.F90 b/src/sourcery/formats_s.f90 similarity index 95% rename from src/sourcery/formats_s.F90 rename to src/sourcery/formats_s.f90 index d17d355f..1da31d53 100644 --- a/src/sourcery/formats_s.F90 +++ b/src/sourcery/formats_s.f90 @@ -9,10 +9,8 @@ character(len=*), parameter :: suffix = "'))" character(len=*), parameter :: complex_prefix = "(*('(',G0,',',G0,')',:,'" -#ifndef NAGFOR select rank(mold) rank(1) -#endif select type(mold) type is(complex) format_string = complex_prefix // separator // suffix @@ -25,11 +23,9 @@ class default error stop "format_s separated_values: unsupported type" end select -#ifndef NAGFOR rank default error stop "formats_s separated_values: unsupported rank" end select -#endif end procedure end submodule formats_s From d2ed0052aa34e5d9d608ac386d47288f906b75b8 Mon Sep 17 00:00:00 2001 From: Damian Rouson Date: Fri, 14 Jul 2023 19:14:39 -0700 Subject: [PATCH 2/3] fix(sourcery_m): entity names --- src/sourcery_m.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sourcery_m.f90 b/src/sourcery_m.f90 index d176acf2..6b13a499 100644 --- a/src/sourcery_m.f90 +++ b/src/sourcery_m.f90 @@ -2,7 +2,7 @@ module sourcery_m !! export all public entities from every other sourcery module use command_line_m, only : command_line_t use data_partition_m, only : data_partition_t - use formats_m, only : formats_t + use formats_m, only : csv, cscv, separated_values use file_m, only : file_t use string_m, only : string_t use test_result_m, only : test_result_t @@ -11,7 +11,7 @@ module sourcery_m !! legacy modules (likely to be removed in a future release): use object_m, only : object_t - use co_object_m, only : co_object_t + use co_object_m, only : co_object use oracle_m, only : oracle_t use units_m From 761c2fe3ebae615780d3c87deec0a90fd2e7c527 Mon Sep 17 00:00:00 2001 From: Damian Rouson Date: Fri, 14 Jul 2023 19:15:03 -0700 Subject: [PATCH 3/3] test: dogfooding - use sourcery_m public interface --- test/command_line_test.f90 | 3 +-- test/data_partition_test.f90 | 3 +-- test/formats_test.f90 | 3 +-- test/object_m_test.f90 | 3 +-- test/string_test.f90 | 3 +-- test/test_result_test.f90 | 1 - test/user_defined_collectives_test.f90 | 3 +-- 7 files changed, 6 insertions(+), 13 deletions(-) diff --git a/test/command_line_test.f90 b/test/command_line_test.f90 index 0eb85ff4..195a6dce 100644 --- a/test/command_line_test.f90 +++ b/test/command_line_test.f90 @@ -1,7 +1,6 @@ module command_line_test !! Verify object pattern asbtract parent - use test_m, only : test_t, test_result_t - use command_line_m, only : command_line_t + use sourcery_m, only : test_t, test_result_t, command_line_t implicit none private diff --git a/test/data_partition_test.f90 b/test/data_partition_test.f90 index a8c2136c..43fc811f 100644 --- a/test/data_partition_test.f90 +++ b/test/data_partition_test.f90 @@ -1,7 +1,6 @@ module data_partition_test !! verify data partitioning across images and data gathering - use data_partition_m, only : data_partition_t - use test_m, only : test_t, test_result_t + use sourcery_m, only : data_partition_t, test_t, test_result_t use iso_fortran_env, only : real64 implicit none diff --git a/test/formats_test.f90 b/test/formats_test.f90 index d6216f02..18c9f72d 100644 --- a/test/formats_test.f90 +++ b/test/formats_test.f90 @@ -1,7 +1,6 @@ module formats_test !! Verify that format strings provide the desired formatting - use formats_m, only : separated_values - use test_m, only : test_t, test_result_t + use sourcery_m, only : separated_values, test_t, test_result_t implicit none private diff --git a/test/object_m_test.f90 b/test/object_m_test.f90 index 0fa5f188..b5939adc 100644 --- a/test/object_m_test.f90 +++ b/test/object_m_test.f90 @@ -1,7 +1,6 @@ module object_m_test !! Verify object pattern asbtract parent - use test_m, only : test_t, test_result_t - use object_m, only : object_t + use sourcery_m, only : test_t, test_result_t, object_t implicit none private diff --git a/test/string_test.f90 b/test/string_test.f90 index 9d9c0633..95b92047 100644 --- a/test/string_test.f90 +++ b/test/string_test.f90 @@ -1,6 +1,5 @@ module string_test - use test_m, only : test_t, test_result_t - use string_m, only : string_t + use sourcery_m, only : test_t, test_result_t, string_t implicit none private diff --git a/test/test_result_test.f90 b/test/test_result_test.f90 index e79fa452..833faa42 100644 --- a/test/test_result_test.f90 +++ b/test/test_result_test.f90 @@ -1,7 +1,6 @@ module test_result_test !! Verify object pattern asbtract parent use test_m, only : test_t, test_result_t - use test_result_m, only : test_result_t implicit none private diff --git a/test/user_defined_collectives_test.f90 b/test/user_defined_collectives_test.f90 index 9adad57b..ceb1ec58 100644 --- a/test/user_defined_collectives_test.f90 +++ b/test/user_defined_collectives_test.f90 @@ -1,6 +1,5 @@ module user_defined_collectives_test - use user_defined_collectives_m, only : co_all - use test_m, only : test_t, test_result_t + use sourcery_m, only : co_all, test_t, test_result_t implicit none private