Message ID | a6367053-6f15-0466-cbad-460d88b2d720@mentor.com |
---|---|
State | New |
Headers | show |
Series | [nvptx,libgomp,testsuite,PR85519] Reduce recursion depth in declare_target-{1,2}.f90 | expand |
On Wed, Apr 25, 2018 at 12:58:47PM +0200, Tom de Vries wrote: > Concluding, these tests run out thread stack on Nvidia Titan V because the > recursive functions have a larger frame size than we've seen for the Nvidia > architecture flavours that we've tested before. > > The patch fixes this by reducing the recursion depth. > > OK for stage4 trunk? Ok for trunk (i.e. 9.x) and 8.2 after 8.1 is released. > [nvptx, libgomp, testsuite] Reduce recursion depth in declare_target-{1,2}.f90 > > 2018-04-25 Tom de Vries <tom@codesourcery.com> > > PR target/85519 > * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Reduce > recursion depth from 25 to 23. > * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Same. Jakub
[nvptx, libgomp, testsuite] Reduce recursion depth in declare_target-{1,2}.f90 2018-04-25 Tom de Vries <tom@codesourcery.com> PR target/85519 * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Reduce recursion depth from 25 to 23. * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Same. --- libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90 | 4 +++- libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90 | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90 index df941ee..51de6b2 100644 --- a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90 +++ b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90 @@ -27,5 +27,7 @@ end module program e_53_1 use e_53_1_mod, only : fib, fib_wrapper if (fib (15) /= fib_wrapper (15)) STOP 1 - if (fib (25) /= fib_wrapper (25)) STOP 2 + ! Reduced from 25 to 23, otherwise execution runs out of thread stack on + ! Nvidia Titan V. + if (fib (23) /= fib_wrapper (23)) STOP 2 end program diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90 index 9c31569..76cce01 100644 --- a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90 +++ b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90 @@ -4,9 +4,11 @@ program e_53_2 !$omp declare target (fib) integer :: x, fib !$omp target map(from: x) - x = fib (25) + ! Reduced from 25 to 23, otherwise execution runs out of thread stack on + ! Nvidia Titan V. + x = fib (23) !$omp end target - if (x /= fib (25)) STOP 1 + if (x /= fib (23)) STOP 1 end program integer recursive function fib (n) result (f)