Collect profiler information only for a do-loop using NVTX

Could you tell me how to collect profiler information only for a DO-LOOP in a source code written in Fortran and OpenACC ?

Here is the source code. When I would like to collect profiler information using “Nsight system” between “nvtxRangeStart” and “nvtxRangeEnd”, is the following correct ? or not ?

And at the time, I think I am going to run the following command, in order to collect profiler information using “Nsight system” between “nvtxRangeStart” and “nvtxRangeEnd”, is the following correct ? or not ?

% nsys profiler --capture-range=nvtx --trace=cuda,openacc …

do while

error =0.d0

call nvtxRangeStart
!$acc kernels
do j = 2, m-1
do i = 2, n-1
Anew(i,j) = 0.25 * ( A(i,j+1) + A(i,j-1) &

  • A(i-1,j) + A(i+1,j) )
    error = max(error, abs(Anew(i,j) - A(i,j)))
    end do
    end do
    !$acc end kernels
    call nvtxRangeEnd

!$acc kernels
do j = 2, m-1
do i = 2, n-1
A(i,j) = Anew(i,j)
end do
end do
!$acc end kernels

Move to “Nsight System”

Move to “Nsight System”
Could you tell me what you mean ?

As you are asking about the Nsight System, so I move the topic to “Nsight System” forum already.

1 Like