openmp: base code for dynamic and static scheduling