FUNCTIONS_OPENMP Demonstrate a few of OpenMP's library functions. While NOT in a parallel region: omp_get_max_threads ( ) = 8 omp_get_num_threads ( ) = 1 omp_get_thread_num ( ) = 0 omp_get_num_procs ( ) = 8 omp_get_wtime ( ) = 13216.8 While NOT in a parallel region, after calling omp_set_num_threads ( 5 ): omp_get_max_threads ( ) = 5 omp_get_num_threads ( ) = 1 omp_get_thread_num ( ) = 0 omp_get_num_procs ( ) = 8 omp_get_wtime ( ) = 13216.8 Enter a parallel region. after calling omp_set_num_threads ( 3 ): Enter a parallel region. Enter a parallel region. after calling omp_set_num_threads ( 3 ): omp_get_thread_num ( ) = 2 While in a parallel region, printing from a single thread: omp_get_max_threads ( ) = 3 omp_get_num_threads ( ) = 3 omp_get_thread_num ( ) = 2 after calling omp_set_num_threads ( 3 ): omp_get_thread_num ( ) = 1 omp_get_thread_num ( ) = 0 omp_get_num_procs ( ) = 8 omp_get_wtime ( ) = 13216.8 omp_get_wtime estimates duration of sleep(5) as 5.00022 seconds. FUNCTIONS_OPENMP Normal end of execution.