Full build log of your posted program after I fixed the compiler related errors.
-------------- Clean: default in test omp thread (compiler: GNU GCC Compiler)---------------
Cleaned "test omp thread - default"
-------------- Build: default in test omp thread (compiler: GNU GCC Compiler)---------------
gcc -Wall -fopenmp -g -std=c11 -Wno-unused-local-typedefs -c "/home/stahta01/devel/open_source_code/no_version_control/CB_wizard_testing/test omp thread/main.c" -o obj/main.o
/home/stahta01/devel/open_source_code/no_version_control/CB_wizard_testing/test omp thread/main.c: In function ‘main’:
/home/stahta01/devel/open_source_code/no_version_control/CB_wizard_testing/test omp thread/main.c:13:9: warning: unused variable ‘i’ [-Wunused-variable]
int i,nthreads; double pi, sum[NUM_THREADS+PAD];
^
g++ -o "bin/test omp thread" obj/main.o -lgomp
Output file is bin/test omp thread with size 11.94 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 1 warning(s) (0 minute(s), 0 second(s))
Edit: The program only used one thread for me; but, I think that was because of the old hardware it is running on. Single CPU system.
gcc version info on my system
gcc (Debian 6.3.0-18) 6.3.0 20170516
Tim S.