nvlink error : Undefined reference

I have specified the Subroutine. But the compiler remaind me that the Subroutine is Undefined.

      subroutine check_indomain_particles
!$acc routine seq ......



      subroutine step
!$acc routine seq
      !include 'common.2D'
      use common2D

        interface

        subroutine ac
!$acc routine seq
        use common2D
        end subroutine ac

        subroutine check_limits_2D
!$acc routine seq
        use common2D
        end subroutine check_limits_2D

        subroutine check_indomain_particles
!$acc routine seq
        use common2D
        end subroutine check_indomain_particles.......

Error: nvlink error : Undefined reference to ‘check_indomain_particles_’ in ‘obj\Release\sourcefile\step_symplectic_2D.o’

Hi Kingpo,

Not entirely sure, but I think that you might need to add !$acc routine(check_indomain_particles) seq to the calling procedure to make it explicit that you want to invoke the device routine.