|
1 | 1 | submodule(test_m) test_s |
| 2 | + use user_defined_collectives_m, only : co_all |
2 | 3 | implicit none |
3 | 4 |
|
4 | 5 | contains |
5 | 6 |
|
6 | 7 | module procedure report |
7 | 8 | integer i |
8 | 9 |
|
9 | | - print * |
10 | | - print *, test%subject() |
11 | | - associate(test_results => test%results()) |
12 | | - associate(num_tests => size(test_results)) |
13 | | - tests = tests + num_tests |
14 | | - do i=1,num_tests |
15 | | - print *," ",test_results(i)%characterize() |
16 | | - end do |
17 | | - associate(num_passes => count(test_results%passed())) |
18 | | - print '(a,2(i0,a))'," ",num_passes," of ", num_tests," tests pass." |
19 | | - passes = passes + num_passes |
| 10 | + associate(me => this_image()) |
| 11 | + if (me==1) print *, new_line('a'), test%subject() |
| 12 | + associate(test_results => test%results()) |
| 13 | + associate(num_tests => size(test_results)) |
| 14 | + tests = tests + num_tests |
| 15 | + if (me==1) then |
| 16 | + do i=1,num_tests |
| 17 | + if (me==1) print *," ",test_results(i)%characterize() |
| 18 | + end do |
| 19 | + end if |
| 20 | + block |
| 21 | + logical, allocatable :: passing_tests(:) |
| 22 | + passing_tests = test_results%passed() |
| 23 | + call co_all(passing_tests) |
| 24 | + associate(num_passes => count(passing_tests)) |
| 25 | + if (me==1) print '(a,2(i0,a))'," ",num_passes," of ", num_tests," tests pass." |
| 26 | + passes = passes + num_passes |
| 27 | + end associate |
| 28 | + end block |
20 | 29 | end associate |
21 | 30 | end associate |
22 | 31 | end associate |
|
0 commit comments