build_threads Function

public function build_threads(jobs)

Number of threads that build targets: jobs if positive, else the OpenMP default (OMP_NUM_THREADS if set, otherwise all cores). 1 without OpenMP.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: jobs

Requested number of build jobs (–jobs); 0 selects the default

Return Value integer


Source Code

    integer function build_threads(jobs)
        !> Requested number of build jobs (--jobs); 0 selects the default
        integer, intent(in) :: jobs
        build_threads = 1
        !$ build_threads = omp_get_max_threads()
        !$ if (jobs > 0) build_threads = jobs
    end function build_threads