File tree Expand file tree Collapse file tree 1 file changed +5
-19
lines changed
Expand file tree Collapse file tree 1 file changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -32,32 +32,18 @@ program designed_to_error_terminate
3232
3333contains
3434
35- pure function both (lhs ,rhs ) result(lhs_or_rhs )
36- logical , intent (in ) :: lhs,rhs
37- logical lhs_or_rhs
35+ pure function and (lhs ,rhs ) result(lhs_and_rhs )
36+ logical , intent (in ) :: lhs, rhs
37+ logical lhs_and_rhs
3838
39- lhs_or_rhs = lhs .and. rhs
39+ lhs_and_rhs = lhs .and. rhs
4040
4141 end function
4242
4343 subroutine co_all (boolean )
4444 logical , intent (inout ) :: boolean
4545
46- #ifndef NAGFOR
47- call co_reduce(boolean, both)
48- #else
49- ! Because parallel NAG runs happen in shared memory and because this function is called only once in
50- ! one test, a simplistic, non-scalable reduction algorithm suffices until co_reduce is supported.
51- block
52- logical , save :: my_boolean[* ]
53- integer i
54-
55- my_boolean = boolean
56- do i= 1 ,num_images()
57- my_boolean = my_boolean .and. my_boolean[i]
58- end do
59- end block
60- #endif
46+ call co_reduce(boolean, and)
6147
6248 end subroutine
6349
You can’t perform that action at this time.
0 commit comments