Add subroutine for OpenMP