Thank you! I found this answer very useful, especially adding the second directive
!$acc routine(BESS)
That resolved my problem.
One thing is puzzling me though, this directive resolves the error even in the absence of the first directive!$acc routine inside the routine (BESS here) 's implementation. Any comments on this?