ACC008 timer-without-acc-wait
warning enabled by defaultA timer is read while asynchronous OpenACC work may still be running.
Why
async compute and data constructs return immediately: reading the clock right after them measures only the launch, not the work. Put !$acc wait (or call acc_wait(...)) before every stop-time read.
Reported
fortran
!$acc parallel loop async(1)
...
call system_clock(t1)Preferred
fortran
!$acc parallel loop async(1)
...
!$acc wait
call system_clock(t1)Suppressing
For one occurrence, with the reason on the same line (or alone on the line before the statement):
fortran
! fobis: ignore[ACC008] <why this occurrence is fine>For the whole project, ignore = ACC008 in the fobos [lint] section.
References
Sections of the shipped knowledge packs behind this rule:
hpc-practice:gpu-practice#gpu-benchmark-timing(fobis kb show hpc-practice:gpu-practice#gpu-benchmark-timing)openacc:ch07-procedures-async-fortran#anti-patterns(fobis kb show openacc:ch07-procedures-async-fortran#anti-patterns)