On Fri, Apr 01, 2022 at 05:34:50PM +0200, Tom de Vries wrote: > Do you perhaps have an idea why it's failing?
Because you call on_device_arch_nvptx () outside of !$omp target region, so unless the host device is NVPTX, it will not be true. > +program e_53_1 > + use e_53_1_mod, only : fib, fib_wrapper > + integer :: REC_DEPTH = 25 > + > + interface > + integer function on_device_arch_nvptx() bind(C) > + end function on_device_arch_nvptx > + end interface > + > + if (on_device_arch_nvptx () /= 0) then > + ! Reduced from 25 to 23, otherwise execution runs out of thread stack on > + ! Nvidia Titan V. > + ! Reduced from 23 to 22, otherwise execution runs out of thread stack on > + ! Nvidia T400 (2GB variant), when run with GOMP_NVPTX_JIT=-O0. > + ! Reduced from 22 to 20, otherwise execution runs out of thread stack on > + ! Nvidia RTX A2000 (6GB variant), when run with GOMP_NVPTX_JIT=-O0. > + REC_DEPTH = 20 > + end if > + > + if (fib (15) /= fib_wrapper (15)) stop 1 > + if (fib (REC_DEPTH) /= fib_wrapper (REC_DEPTH)) stop 2 > +end program Jakub