cpp: #include <omp.h>\n#include <stdio.h>\n\nint main(){\n  int section_count = 0;\n  omp_set_dynamic(0);\n  \n  omp_set_num_threads(1);\n\n  #pragma omp parallel\n  #pragma omp sections firstprivate( section_count )\n  {\n    #pragma omp section\n    {\n      section_count++;\n      printf("%d\n",section_count);\n    }\n    #pragma omp section\n    {\n      section_count++;\n      printf("%d\n",section_count);\n    }\n  }\n  return 0;\n}\n
fortran: program DRB126_firstprivatesections_orig_no\n    use omp_lib\n    implicit none\n\n    integer :: section_count\n\n    section_count = 0\n\n    call omp_set_dynamic(.FALSE.)\n    call omp_set_num_threads(1)\n\n    !$omp parallel\n    !$omp sections firstprivate( section_count )\n        !$omp section\n        section_count = section_count+1\n        print 100, section_count\n        100 format ('section_count =',3i8)\n\n        !$omp section\n        section_count = section_count+1\n        print 101, section_count\n        101 format ('section_count =',3i8)\n    !$omp end sections\n    !$omp end parallel\nend program