File1: #include <omp.h>\n#include <stdio.h>\nint main()\n{\n  int numThreads=0 ; \n#pragma omp parallel\n  {\n    if ( omp_get_thread_num()==0 ) {\n      numThreads = omp_get_num_threads();\n    }\n    else\n    {\n      printf("numThreads=%d\n", numThreads);\n    }\n  }\n  return 0;\n}\n
File2: program DRB075_getthreadnum_orig_yes\n    use omp_lib\n    implicit none\n\n    integer :: numThreads\n    numThreads = 0\n\n    !$omp parallel\n    if ( omp_get_thread_num()==0 ) then\n        numThreads = omp_get_num_threads();\n    else\n        print*,'numThreads =',numThreads\n    end if\n    !$omp endparallel\nend program