File1: #include <omp.h>\n#include <assert.h> \nint main()\n{\n  omp_lock_t lck;\n  int i=0;\n  omp_init_lock(&lck);\n#pragma omp parallel sections\n  {\n#pragma omp section\n    {\n      omp_set_lock(&lck);\n      i += 1;    \n      omp_unset_lock(&lck);\n    }\n#pragma omp section\n    {\n      omp_set_lock(&lck);\n      i += 2;    \n      omp_unset_lock(&lck);\n    }\n  }\n\n  omp_destroy_lock(&lck);\n  assert (i==3);\n  return 0;\n} \n
File2: program DRB069_sectionslock1_orig_no\n    use omp_lib\n    implicit none\n\n    integer (kind=omp_lock_kind) lock\n    integer :: i\n    i = 0\n    call omp_init_lock(lock)\n\n    !$omp parallel sections\n        !$omp section\n        call omp_set_lock(lock)\n        i = i + 1\n        call omp_unset_lock(lock)\n        !$omp section\n        call omp_set_lock(lock)\n        i = i + 2\n        call omp_unset_lock(lock)\n    !$omp end parallel sections\n\n    call omp_destroy_lock(lock)\n\n    print 100, i\n    100 format ('I =',i3)\nend program