cpp: #include<stdio.h>\n#include<stdlib.h>\n\nint* counter; \n//#pragma omp threadprivate(counter)\n\nint main()\n{ \n  counter = (int*) malloc(sizeof(int));\n  if (counter== NULL)\n  {\n    fprintf(stderr, "malloc() fails\n");\n    exit(1);\n  }\n  *counter = 0; \n #pragma omp parallel \n  {\n    (*counter)++; \n  }\n  printf("%d \n", *counter);\n  free (counter);\n  return 0;   \n}\n\n
fortran: program DRB088_dynamic_storage_orig_yes\n    use omp_lib\n    implicit none\n    integer, pointer :: counter\n\n    allocate(counter)\n\n    counter = 0\n\n    !$omp parallel\n    counter = counter+1\n    !$omp end parallel\n\n    print*,counter\n\n    deallocate(counter)\n\nend program