get_num_threads Function

public function get_num_threads() result(num_threads)

Arguments

None

Return Value integer


Source Code

    integer function get_num_threads() result(num_threads)
        num_threads = 1  ! default if OpenMP is not used
        !$ num_threads = omp_get_max_threads() ! get the actual number of threads if OpenMP is used
    end function get_num_threads