Skip to content

Commit a17eec2

Browse files
committed
Deploy julienne usher workaround
1 parent fdc5acd commit a17eec2

11 files changed

+54
-331
lines changed

test/prif_co_broadcast_test.F90

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
module prif_co_broadcast_test_m
44
use prif, only : prif_co_broadcast, prif_num_images, prif_this_image_no_coarray
55
use julienne_m, only : &
6-
test_description_t &
6+
usher &
7+
,test_description_t &
78
,test_diagnosis_t &
89
,test_result_t &
910
,test_t &
1011
,operator(//) &
1112
,operator(.expect.) &
1213
,operator(.equalsExpected.)
13-
#if ! HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
14-
use julienne_m, only : diagnosis_function_i
15-
#endif
1614

1715
implicit none
1816
private
@@ -42,35 +40,16 @@ pure function subject() result(test_subject)
4240
test_subject = "The prif_co_broadcast subroutine"
4341
end function
4442

45-
#if HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
46-
4743
function results() result(test_results)
4844
type(test_result_t), allocatable :: test_results(:)
4945
type(prif_co_broadcast_test_t) prif_co_broadcast_test
5046

5147
test_results = prif_co_broadcast_test%run([ &
52-
test_description_t("broadcasting a default integer scalar with no optional arguments present", broadcast_default_integer_scalar) &
53-
,test_description_t("broadcasting a derived type scalar with no allocatable components", broadcast_derived_type) &
48+
test_description_t("broadcasting a default integer scalar with no optional arguments present", usher(broadcast_default_integer_scalar)) &
49+
,test_description_t("broadcasting a derived type scalar with no allocatable components", usher(broadcast_derived_type)) &
5450
])
5551
end function
5652

57-
#else
58-
59-
function results() result(test_results)
60-
type(test_result_t), allocatable :: test_results(:)
61-
type(prif_co_broadcast_test_t) prif_co_broadcast_test
62-
procedure(diagnosis_function_i), pointer :: &
63-
broadcast_default_integer_scalar_ptr => broadcast_default_integer_scalar &
64-
,broadcast_derived_type_ptr => broadcast_derived_type
65-
66-
test_results = prif_co_broadcast_test%run([ &
67-
test_description_t("broadcasting a default integer scalar with no optional arguments present", broadcast_default_integer_scalar_ptr) &
68-
,test_description_t("broadcasting a derived type scalar with no allocatable components", broadcast_derived_type_ptr) &
69-
])
70-
end function
71-
72-
#endif
73-
7453
logical pure function equals(lhs, rhs)
7554
type(object_t), intent(in) :: lhs, rhs
7655
equals = all([ &

test/prif_co_max_test.F90

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ module prif_co_max_test_m
88
,operator(.approximates.) &
99
,operator(.within.) &
1010
,operator(.equalsExpected.) &
11+
,usher &
1112
,test_description_t &
1213
,test_diagnosis_t &
1314
,test_result_t &
1415
,test_t
15-
#if ! HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
16-
use julienne_m, only : diagnosis_function_i
17-
#endif
1816
implicit none
1917

2018

@@ -34,52 +32,22 @@ pure function subject() result(test_subject)
3432
test_subject = "The prif_co_max subroutine"
3533
end function
3634

37-
#if HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
38-
39-
function results() result(test_results)
40-
type(test_result_t), allocatable :: test_results(:)
41-
type(prif_co_max_test_t) prif_co_max_test
42-
43-
test_results = prif_co_max_test%run([ &
44-
test_description_t("computing element-wise maxima for integer(c_int32_t) scalars", check_32_bit_integer) &
45-
,test_description_t("computing element-wise maxima for a 1D default integer array", check_default_integer) &
46-
,test_description_t("computing element-wise maxima for a 1D integer(c_int8_t) array", check_8_bit_integer) &
47-
,test_description_t("computing element-wise maxima for a 1D integer(c_int16_t) array", check_16_bit_integer) &
48-
,test_description_t("computing element-wise maxima for a 1D integer(c_int64_t array", check_64_bit_integer) &
49-
,test_description_t("computing element-wise maxima for a 2D real(c_float) array", check_32_bit_real) &
50-
,test_description_t("computing element-wise maxima for a 1D real(c_double array", check_64_bit_real) &
51-
,test_description_t("computing element-wise maxima for character scalars", check_character) &
52-
])
53-
end function
54-
55-
#else
56-
5735
function results() result(test_results)
5836
type(test_result_t), allocatable :: test_results(:)
5937
type(prif_co_max_test_t) prif_co_max_test
60-
procedure(diagnosis_function_i), pointer :: &
61-
check_32_bit_integer_ptr => check_32_bit_integer &
62-
,check_default_integer_ptr => check_default_integer &
63-
,check_8_bit_integer_ptr => check_8_bit_integer &
64-
,check_16_bit_integer_ptr => check_16_bit_integer &
65-
,check_64_bit_integer_ptr => check_64_bit_integer &
66-
,check_32_bit_real_ptr => check_32_bit_real &
67-
,check_64_bit_real_ptr => check_64_bit_real &
68-
,check_character_ptr => check_character
6938

7039
test_results = prif_co_max_test%run([ &
71-
test_description_t("computing element-wise maxima for integer(c_int32_t) scalars", check_32_bit_integer_ptr) &
72-
,test_description_t("computing element-wise maxima for a 1D default integer array", check_default_integer_ptr) &
73-
,test_description_t("computing element-wise maxima for a 1D integer(c_int8_t) array", check_8_bit_integer_ptr) &
74-
,test_description_t("computing element-wise maxima for a 1D integer(c_int16_t) array", check_16_bit_integer_ptr) &
75-
,test_description_t("computing element-wise maxima for a 1D integer(c_int64_t array", check_64_bit_integer_ptr) &
76-
,test_description_t("computing element-wise maxima for a 2D real(c_float) array", check_32_bit_real_ptr) &
77-
,test_description_t("computing element-wise maxima for a 1D real(c_double array", check_64_bit_real_ptr) &
78-
,test_description_t("computing element-wise maxima for character scalars", check_character_ptr) &
40+
test_description_t("computing element-wise maxima for integer(c_int32_t) scalars", usher(check_32_bit_integer)) &
41+
,test_description_t("computing element-wise maxima for a 1D default integer array", usher(check_default_integer)) &
42+
,test_description_t("computing element-wise maxima for a 1D integer(c_int8_t) array", usher(check_8_bit_integer)) &
43+
,test_description_t("computing element-wise maxima for a 1D integer(c_int16_t) array", usher(check_16_bit_integer)) &
44+
,test_description_t("computing element-wise maxima for a 1D integer(c_int64_t array", usher(check_64_bit_integer)) &
45+
,test_description_t("computing element-wise maxima for a 2D real(c_float) array", usher(check_32_bit_real)) &
46+
,test_description_t("computing element-wise maxima for a 1D real(c_double array", usher(check_64_bit_real)) &
47+
,test_description_t("computing element-wise maxima for character scalars", usher(check_character)) &
7948
])
8049
end function
8150

82-
#endif
8351
function check_default_integer() result(test_diagnosis)
8452
type(test_diagnosis_t) :: test_diagnosis
8553

test/prif_co_min_test.F90

Lines changed: 9 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ module prif_co_min_test_m
88
,operator(.approximates.) &
99
,operator(.within.) &
1010
,operator(.equalsExpected.) &
11+
,usher &
1112
,test_description_t &
1213
,test_diagnosis_t &
1314
,test_result_t &
1415
,test_t
15-
#if ! HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
16-
use julienne_m, only : diagnosis_function_i
17-
#endif
1816
implicit none
1917

2018
private
@@ -32,53 +30,22 @@ pure function subject() result(test_subject)
3230
test_subject = "The prif_co_min subroutine"
3331
end function
3432

35-
#if HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
36-
3733
function results() result(test_results)
3834
type(test_result_t), allocatable :: test_results(:)
3935
type(prif_co_min_test_t) prif_co_min_test
4036

4137
test_results = prif_co_min_test%run([ &
42-
test_description_t("computing element-wise minima for integer(c_int32_t) scalars", check_32_bit_integer) &
43-
,test_description_t("computing element-wise minima for a 1D default integer array", check_default_integer) &
44-
,test_description_t("computing element-wise minima for a 1D integer(c_int8t) array", check_8_bit_integer) &
45-
,test_description_t("computing element-wise minima for a 1D integer(c_int16_t) array", check_16_bit_integer) &
46-
,test_description_t("computing element-wise minima for a 1D integer(c_int64_t) array", check_64_bit_integer) &
47-
,test_description_t("computing element-wise minima for a 2D real(c_float) array", check_32_bit_real) &
48-
,test_description_t("computing element-wise minima for a 1D real(c_double) array", check_64_bit_real) &
49-
,test_description_t("computing element-wise minima for a character scalar", check_character) &
38+
test_description_t("computing element-wise minima for integer(c_int32_t) scalars", usher(check_32_bit_integer)) &
39+
,test_description_t("computing element-wise minima for a 1D default integer array", usher(check_default_integer)) &
40+
,test_description_t("computing element-wise minima for a 1D integer(c_int8t) array", usher(check_8_bit_integer)) &
41+
,test_description_t("computing element-wise minima for a 1D integer(c_int16_t) array", usher(check_16_bit_integer)) &
42+
,test_description_t("computing element-wise minima for a 1D integer(c_int64_t) array", usher(check_64_bit_integer)) &
43+
,test_description_t("computing element-wise minima for a 2D real(c_float) array", usher(check_32_bit_real)) &
44+
,test_description_t("computing element-wise minima for a 1D real(c_double) array", usher(check_64_bit_real)) &
45+
,test_description_t("computing element-wise minima for a character scalar", usher(check_character)) &
5046
])
5147
end function
5248

53-
#else
54-
55-
function results() result(test_results)
56-
type(test_result_t), allocatable :: test_results(:)
57-
type(prif_co_min_test_t) prif_co_min_test
58-
procedure(diagnosis_function_i), pointer :: &
59-
check_32_bit_integer_ptr => check_32_bit_integer &
60-
,check_default_integer_ptr => check_default_integer &
61-
,check_8_bit_integer_ptr => check_8_bit_integer &
62-
,check_16_bit_integer_ptr => check_16_bit_integer &
63-
,check_64_bit_integer_ptr => check_64_bit_integer &
64-
,check_32_bit_real_ptr => check_32_bit_real &
65-
,check_64_bit_real_ptr => check_64_bit_real &
66-
,check_character_ptr => check_character
67-
68-
test_results = prif_co_min_test%run([ &
69-
test_description_t("computing element-wise minima for integer(c_int32_t) scalars", check_32_bit_integer_ptr) &
70-
,test_description_t("computing element-wise minima for a 1D default integer array", check_default_integer_ptr) &
71-
,test_description_t("computing element-wise minima for a 1D integer(c_int8t) array", check_8_bit_integer_ptr) &
72-
,test_description_t("computing element-wise minima for a 1D integer(c_int16_t) array", check_16_bit_integer_ptr) &
73-
,test_description_t("computing element-wise minima for a 1D integer(c_int64_t) array", check_64_bit_integer_ptr) &
74-
,test_description_t("computing element-wise minima for a 2D real(c_float) array", check_32_bit_real_ptr) &
75-
,test_description_t("computing element-wise minima for a 1D real(c_double) array", check_64_bit_real_ptr) &
76-
,test_description_t("computing element-wise minima for a character scalar", check_character_ptr) &
77-
])
78-
end function
79-
80-
#endif
81-
8249
function check_default_integer() result(test_diagnosis)
8350
type(test_diagnosis_t) test_diagnosis
8451

test/prif_co_reduce_test.F90

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ module prif_co_reduce_test_m
1010
,operator(.equalsExpected.) &
1111
,operator(.expect.) &
1212
,operator(.within.) &
13+
,usher &
1314
,test_description_t &
1415
,test_diagnosis_t &
1516
,test_result_t &
1617
,test_t
17-
#if ! HAVE_PROCEDURAL_ACTUAL_FOR_POINTER_DUMMY
18-
use julienne_m, only : diagnosis_function_i
19-
#endif
2018
implicit none
2119

2220
private
@@ -52,46 +50,19 @@ pure function subject() result(test_subject)
5250
test_subject = "The prif_co_reduce subroutine"
5351
end function
5452

55-
#if HAVE_PROCEDURAL_ACTUAL_FOR_POINTER_DUMMY
56-
57-
function results() result(test_results)
58-
type(test_result_t), allocatable :: test_results(:)
59-
type(prif_co_reduce_test_t) prif_co_reduce_test
60-
61-
test_results = prif_co_reduce_test%run([ &
62-
test_description_t("performing a logical .and. reduction", check_logical) &
63-
,test_description_t("performing a derived type reduction", check_derived_type_reduction) &
64-
#if HAVE_PARAM_DERIVED
65-
,test_description_t("performing a parameterized derived type reduction", check_type_parameter_reduction) &
66-
#endif
67-
])
68-
end function
69-
70-
#else
71-
7253
function results() result(test_results)
7354
type(test_result_t), allocatable :: test_results(:)
7455
type(prif_co_reduce_test_t) prif_co_reduce_test
75-
procedure(diagnosis_function_i), pointer :: &
76-
check_logical_ptr => check_logical &
77-
,check_derived_type_reduction_ptr => check_derived_type_reduction
78-
#if HAVE_PARAM_DERIVED
79-
procedure(diagnosis_function_i), pointer :: check_type_parameter_reduction_ptr => check_type_parameter_reduction
80-
#endif
8156

8257
test_results = prif_co_reduce_test%run([ &
83-
test_description_t("performing a logical .and. reduction", check_logical_ptr) &
84-
,test_description_t("performing a derived type reduction", check_derived_type_reduction_ptr) &
58+
test_description_t("performing a logical .and. reduction", usher(check_logical)) &
59+
,test_description_t("performing a derived type reduction", usher(check_derived_type_reduction)) &
8560
#if HAVE_PARAM_DERIVED
86-
,test_description_t("performing a parameterized derived type reduction", check_type_parameter_reduction_ptr) &
61+
,test_description_t("performing a parameterized derived type reduction", usher(check_type_parameter_reduction)) &
8762
#endif
8863
])
8964
end function
9065

91-
92-
#endif
93-
94-
9566
function check_logical() result(test_diagnosis)
9667
type(test_diagnosis_t) test_diagnosis
9768
logical :: val

test/prif_co_sum_test.F90

Lines changed: 10 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ module prif_co_sum_test_m
99
,operator(.approximates.) &
1010
,operator(.equalsExpected.) &
1111
,operator(.within.) &
12+
,usher &
1213
,test_description_t &
1314
,test_diagnosis_t &
1415
,test_result_t &
1516
,test_t
16-
#if ! HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
17-
use julienne_m, only : diagnosis_function_i
18-
#endif
1917

2018
implicit none
2119
private
@@ -34,56 +32,23 @@ pure function subject() result(test_subject)
3432
test_subject = "The prif_co_sum subroutine"
3533
end function
3634

37-
#if HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
38-
3935
function results() result(test_results)
4036
type(test_result_t), allocatable :: test_results(:)
4137
type(prif_co_sum_test_t) prif_co_sum_test
4238

4339
test_results = prif_co_sum_test%run([ &
44-
test_description_t("computing the element-wise sum of a 1D default integer array", check_default_integer) &
45-
,test_description_t("computing the element-wise sum of a 1D 8-bit integer(c_int8_t) array", check_8_bit_integer) &
46-
,test_description_t("computing the element-wise sum of a 1D 16-bit integer(c_int16_t) array", check_16_bit_integer) &
47-
,test_description_t("computing the element-wise sum of integer(c_int32_t) scalars", check_32_bit_integer) &
48-
,test_description_t("computing the element-wise sum of a 1D 64-bit integer(c_int64_t) array", check_64_bit_integer) &
49-
,test_description_t("computing the element-wise sum of a 2D 32-bit real(c_float) array", check_32_bit_real) &
50-
,test_description_t("computing the element-wise sum of a 1D 64-bit real(c_double) array", check_64_bit_real) &
51-
,test_description_t("computing the element-wise sum of a 2D complex(c_float) array", check_32_bit_complex) &
52-
,test_description_t("computing the element-wise sum of a 1D complex(c_double) array", check_64_bit_complex) &
40+
test_description_t("computing the element-wise sum of a 1D default integer array", usher(check_default_integer)) &
41+
,test_description_t("computing the element-wise sum of a 1D 8-bit integer(c_int8_t) array", usher(check_8_bit_integer)) &
42+
,test_description_t("computing the element-wise sum of a 1D 16-bit integer(c_int16_t) array", usher(check_16_bit_integer)) &
43+
,test_description_t("computing the element-wise sum of integer(c_int32_t) scalars", usher(check_32_bit_integer)) &
44+
,test_description_t("computing the element-wise sum of a 1D 64-bit integer(c_int64_t) array", usher(check_64_bit_integer)) &
45+
,test_description_t("computing the element-wise sum of a 2D 32-bit real(c_float) array", usher(check_32_bit_real)) &
46+
,test_description_t("computing the element-wise sum of a 1D 64-bit real(c_double) array", usher(check_64_bit_real)) &
47+
,test_description_t("computing the element-wise sum of a 2D complex(c_float) array", usher(check_32_bit_complex)) &
48+
,test_description_t("computing the element-wise sum of a 1D complex(c_double) array", usher(check_64_bit_complex)) &
5349
])
5450
end function
5551

56-
#else
57-
58-
function results() result(test_results)
59-
type(test_result_t), allocatable :: test_results(:)
60-
type(prif_co_sum_test_t) prif_co_sum_test
61-
procedure(diagnosis_function_i), pointer :: &
62-
check_default_integer_ptr => check_default_integer &
63-
,check_8_bit_integer_ptr => check_8_bit_integer &
64-
,check_16_bit_integer_ptr => check_16_bit_integer &
65-
,check_32_bit_integer_ptr => check_32_bit_integer &
66-
,check_64_bit_integer_ptr => check_64_bit_integer &
67-
,check_32_bit_real_ptr => check_32_bit_real &
68-
,check_64_bit_real_ptr => check_64_bit_real &
69-
,check_32_bit_complex_ptr => check_32_bit_complex &
70-
,check_64_bit_complex_ptr => check_64_bit_complex
71-
72-
test_results = prif_co_sum_test%run([ &
73-
test_description_t("computing the element-wise sum of a 1D default integer array", check_default_integer_ptr) &
74-
,test_description_t("computing the element-wise sum of a 1D 8-bit integer(c_int8_t) array", check_8_bit_integer_ptr) &
75-
,test_description_t("computing the element-wise sum of a 1D 16-bit integer(c_int16_t) array", check_16_bit_integer_ptr) &
76-
,test_description_t("computing the element-wise sum of integer(c_int32_t) scalars", check_32_bit_integer_ptr) &
77-
,test_description_t("computing the element-wise sum of a 1D 64-bit integer(c_int64_t) array", check_64_bit_integer_ptr) &
78-
,test_description_t("computing the element-wise sum of a 2D 32-bit real(c_float) array", check_32_bit_real_ptr) &
79-
,test_description_t("computing the element-wise sum of a 1D 64-bit real(c_double) array", check_64_bit_real_ptr) &
80-
,test_description_t("computing the element-wise sum of a 2D complex(c_float) array", check_32_bit_complex_ptr) &
81-
,test_description_t("computing the element-wise sum of a 1D complex(c_double) array", check_64_bit_complex_ptr) &
82-
])
83-
end function
84-
85-
#endif
86-
8752
function check_default_integer() result(test_diagnosis)
8853
type(test_diagnosis_t) test_diagnosis
8954

0 commit comments

Comments
 (0)