Some hints for running OpenMP programs 1) Just to remind you all of what I said in class To get multiple threads using OpenMP, you also need to give the -fopenmp flag to the compiler, so you need both -lgomp and -fopenmp Otherwise it links in the libraries but assigns one thread so it is a sequential program and avoids any parallel issues. So using only -lgomp is a good way of checking that the sequential program works, but then to actually get multiple threads you need -lgomp -fopenmp 2) The easy way to do the timings for the OpenMP programs in bash e.g prog1 is similar to gcc -oprog1 prog1.c -lgomp -fopenmp export OMP_NUM_THREADS=1 ; time ./prog1 export OMP_NUM_THREADS=2 ; time ./prog1 export OMP_NUM_THREADS=4 ; time ./prog1 export OMP_NUM_THREADS=8 ; time ./prog1 Note that it is important to use export not set, so the environment variable is exported to the subshell running the program. You can also embed time commands such as gettimeofday in the program. Note that you want to report the wall clock time (real from time), not the total CPU time which would add up the time for each thread, and should stay approximately the same irrespective of the number of threads for a perfectly parallel program. If you are using the C shell the equivalent is setenv OMP_NUM_THREADS 1 ; time ./prog1 etc Also it might be interesting to report the time for gcc -oprog1s prog1.c -lgomp time ./prog1s which is the version without the OpenMP enabled.