These calls should be enclosed with the C$ conditional compilation directive, or in a #ifdef _OPENMP, in order to avoid link errors when compiling on a non-OpenMP compiler. eg
myid = 0 C$ myid = mp_get_thread_num()