Consider the following program:
PROGRAM Test
use declare_variables
implicit none
call CPU_TIME(start_time)
call ALLOCATE_VARIABLES()
! ------------------------------
DO WHILE (time < t_end)
call Compute_Prims()
call Compute_Conservs()
time = time + time_step
call CPU_TIME(end_time)
print*, time, end_time-start_time
ENDDO
! ------------------------------
call CPU_TIME(end_time)
print*, 'Total wall clock time taken = ', end_time-start_time, 'secs'
END
Is it possible to launch the subroutines “Compute_Prims” and “Compute_Conservs” in parallel. I have tried something like this but it dint work (showed errors).
!$acc async(1)
call Compute_Prims()
!$acc async(2)
call Compute_Conservs()
!$acc wait