parquet_set_string_threads Subroutine

public subroutine parquet_set_string_threads(n)

Sets the cap on how many threads one parquet_string_column bulk operation may use -- a reindex, gather, compaction or materialization of a single column's packed payload.

This is the within-one-column axis, and it is the only one of the thread caps that is: parquet_set_table_threads splits a table's work by COLUMN, this splits one column's work by ROW RANGE. The two are mutually exclusive in practice, because a string operation reached from inside the table's own parallel region stands down (see below), so setting both does not multiply.

Read per operation, so it takes effect immediately. 0 restores automatic behaviour. The value is a cap: never more threads than OpenMP offers, so setting it above OMP_NUM_THREADS changes nothing, and 1 forces every string operation serial.

A cap never overrides the rule that a string operation inside an OpenMP parallel region runs serially. A caller who capped string work at 8 said nothing about what should happen inside someone else's region, and lifting the serial answer back to 8 there is exactly the T*T oversubscription that rule exists to prevent.

Arguments

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

thread cap, or 0 for automatic; must be >= 0.


Source Code

    subroutine parquet_set_string_threads(n)
        integer, intent(in) :: n !! thread cap, or 0 for automatic; must be >= 0.

        if (n < 0) error stop "parquet_set_string_threads: n must be >= 0 (0 means automatic)"
        cfg_string_threads = n
    end subroutine parquet_set_string_threads