starpu_conf

Struct starpu_conf 

Source
#[repr(C)]
pub struct starpu_conf {
Show 51 fields pub magic: c_int, pub will_use_mpi: c_int, pub sched_policy_name: *const c_char, pub sched_policy: *mut starpu_sched_policy, pub sched_policy_callback: Option<unsafe extern "C" fn(arg1: c_uint)>, pub precedence_over_environment_variables: c_int, pub ncpus: c_int, pub reserve_ncpus: c_int, pub ncuda: c_int, pub nhip: c_int, pub nopencl: c_int, pub nmax_fpga: c_int, pub nmpi_ms: c_int, pub ntcpip_ms: c_int, pub use_explicit_workers_bindid: c_uint, pub workers_bindid: [c_uint; 48], pub use_explicit_workers_cuda_gpuid: c_uint, pub workers_cuda_gpuid: [c_uint; 48], pub use_explicit_workers_hip_gpuid: c_uint, pub workers_hip_gpuid: [c_uint; 48], pub use_explicit_workers_opencl_gpuid: c_uint, pub workers_opencl_gpuid: [c_uint; 48], pub use_explicit_workers_max_fpga_deviceid: c_uint, pub workers_max_fpga_deviceid: [c_uint; 48], pub max_fpga_load: *mut c_void, pub use_explicit_workers_mpi_ms_deviceid: c_uint, pub workers_mpi_ms_deviceid: [c_uint; 48], pub bus_calibrate: c_int, pub calibrate: c_int, pub data_locality_enforce: c_int, pub single_combined_worker: c_int, pub disable_asynchronous_copy: c_int, pub disable_asynchronous_cuda_copy: c_int, pub disable_asynchronous_hip_copy: c_int, pub disable_asynchronous_opencl_copy: c_int, pub disable_asynchronous_mpi_ms_copy: c_int, pub disable_asynchronous_tcpip_ms_copy: c_int, pub disable_asynchronous_max_fpga_copy: c_int, pub enable_map: c_int, pub cuda_opengl_interoperability: *mut c_uint, pub n_cuda_opengl_interoperability: c_uint, pub not_launched_drivers: *mut starpu_driver, pub n_not_launched_drivers: c_uint, pub trace_buffer_size: u64, pub global_sched_ctx_min_priority: c_int, pub global_sched_ctx_max_priority: c_int, pub catch_signals: c_int, pub start_perf_counter_collection: c_uint, pub driver_spinning_backoff_min: c_uint, pub driver_spinning_backoff_max: c_uint, pub cuda_only_fast_alloc_other_memnodes: c_int,
}
Expand description

Structure passed to the starpu_init() function to configure StarPU. It has to be initialized with starpu_conf_init(). When the default value is used, StarPU automatically selects the number of processing units and takes the default scheduling policy. The environment variables overwrite the equivalent parameters unless starpu_conf::precedence_over_environment_variables is set.

Fields§

§magic: c_int

@private Will be initialized by starpu_conf_init(). Should not be set by hand.

§will_use_mpi: c_int

@private Tell starpu_init() if MPI will be initialized later.

§sched_policy_name: *const c_char

Name of the scheduling policy. This can also be specified with the environment variable \ref STARPU_SCHED. (default = NULL).

§sched_policy: *mut starpu_sched_policy

Definition of the scheduling policy. This field is ignored if starpu_conf::sched_policy_name is set. (default = NULL)

§sched_policy_callback: Option<unsafe extern "C" fn(arg1: c_uint)>

Callback function that can later be used by the scheduler. The scheduler can retrieve this function by calling starpu_sched_ctx_get_sched_policy_callback()

§precedence_over_environment_variables: c_int

For all parameters specified in this structure that can also be set with environment variables, by default, StarPU chooses the value of the environment variable against the value set in starpu_conf. Setting the parameter starpu_conf::precedence_over_environment_variables to 1 allows to give precedence to the value set in the structure over the environment variable.

§ncpus: c_int

Number of CPU cores that StarPU can use. This can also be specified with the environment variable \ref STARPU_NCPU. (default = \c -1)

§reserve_ncpus: c_int

Number of CPU cores to that StarPU should leave aside. They can then be used by application threads, by calling starpu_get_next_bindid() to get their ID, and starpu_bind_thread_on() to bind the current thread to them.

§ncuda: c_int

Number of CUDA devices that StarPU can use. This can also be specified with the environment variable \ref STARPU_NCUDA. (default = \c -1)

§nhip: c_int

Number of HIP devices that StarPU can use. This can also be specified with the environment variable \ref STARPU_NHIP. (default = \c -1)

§nopencl: c_int

Number of OpenCL devices that StarPU can use. This can also be specified with the environment variable \ref STARPU_NOPENCL. (default = \c -1)

§nmax_fpga: c_int

Number of Maxeler FPGA devices that StarPU can use. This can also be specified with the environment variable \ref STARPU_NMAX_FPGA. (default = -1)

§nmpi_ms: c_int

Number of MPI Master Slave devices that StarPU can use. This can also be specified with the environment variable \ref STARPU_NMPI_MS. (default = \c -1)

§ntcpip_ms: c_int

Number of TCP/IP Master Slave devices that StarPU can use. This can also be specified with the environment variable \ref STARPU_NTCPIP_MS. (default = \c -1)

§use_explicit_workers_bindid: c_uint

If this flag is set, the starpu_conf::workers_bindid array indicates where the different workers are bound, otherwise StarPU automatically selects where to bind the different workers. This can also be specified with the environment variable \ref STARPU_WORKERS_CPUID. (default = \c 0)

§workers_bindid: [c_uint; 48]

If the starpu_conf::use_explicit_workers_bindid flag is set, this array indicates where to bind the different workers. The i-th entry of the starpu_conf::workers_bindid indicates the logical identifier of the processor which should execute the i-th worker. Note that the logical ordering of the CPUs is either determined by the OS, or provided by the \c hwloc library in case it is available.

§use_explicit_workers_cuda_gpuid: c_uint

If this flag is set, the CUDA workers will be attached to the CUDA devices specified in the starpu_conf::workers_cuda_gpuid array. Otherwise, StarPU affects the CUDA devices in a round-robin fashion. This can also be specified with the environment variable \ref STARPU_WORKERS_CUDAID. (default = \c 0)

§workers_cuda_gpuid: [c_uint; 48]

If the starpu_conf::use_explicit_workers_cuda_gpuid flag is set, this array contains the logical identifiers of the CUDA devices (as used by \c cudaGetDevice()).

§use_explicit_workers_hip_gpuid: c_uint

If this flag is set, the HIP workers will be attached to the HIP devices specified in the starpu_conf::workers_hip_gpuid array. Otherwise, StarPU affects the HIP devices in a round-robin fashion. This can also be specified with the environment variable \ref STARPU_WORKERS_HIPID. (default = \c 0)

§workers_hip_gpuid: [c_uint; 48]

If the starpu_conf::use_explicit_workers_hip_gpuid flag is set, this array contains the logical identifiers of the HIP devices (as used by \c hipGetDevice()).

§use_explicit_workers_opencl_gpuid: c_uint

If this flag is set, the OpenCL workers will be attached to the OpenCL devices specified in the starpu_conf::workers_opencl_gpuid array. Otherwise, StarPU affects the OpenCL devices in a round-robin fashion. This can also be specified with the environment variable \ref STARPU_WORKERS_OPENCLID. (default = \c 0)

§workers_opencl_gpuid: [c_uint; 48]

If the starpu_conf::use_explicit_workers_opencl_gpuid flag is set, this array contains the logical identifiers of the OpenCL devices to be used.

§use_explicit_workers_max_fpga_deviceid: c_uint

If this flag is set, the Maxeler FPGA workers will be attached to the Maxeler FPGA devices specified in the starpu_conf::workers_max_fpga_deviceid array. Otherwise, StarPU affects the Maxeler FPGA devices in a round-robin fashion. This can also be specified with the environment variable \ref STARPU_WORKERS_MAX_FPGAID. (default = 0)

§workers_max_fpga_deviceid: [c_uint; 48]

If the starpu_conf::use_explicit_workers_max_fpga_deviceid flag is set, this array contains the logical identifiers of the Maxeler FPGA devices to be used.

§max_fpga_load: *mut c_void§use_explicit_workers_mpi_ms_deviceid: c_uint

If this flag is set, the MPI Master Slave workers will be attached to the MPI Master Slave devices specified in the array starpu_conf::workers_mpi_ms_deviceid. Otherwise, StarPU affects the MPI Master Slave devices in a round-robin fashion. (default = \c 0)

§workers_mpi_ms_deviceid: [c_uint; 48]

If the flag starpu_conf::use_explicit_workers_mpi_ms_deviceid is set, the array contains the logical identifiers of the MPI Master Slave devices to be used.

§bus_calibrate: c_int

If this flag is set, StarPU will recalibrate the bus. If this value is equal to -1, the default value is used. This can also be specified with the environment variable \ref STARPU_BUS_CALIBRATE. (default = \c 0)

§calibrate: c_int

If this flag is set, StarPU will calibrate the performance models when executing tasks. If this value is equal to -1, the default value is used. If the value is equal to 1, it will force continuing calibration. If the value is equal to 2, the existing performance models will be overwritten. This can also be specified with the environment variable \ref STARPU_CALIBRATE. (default = \c 0)

§data_locality_enforce: c_int

This flag should be set to 1 to enforce data locality when choosing a worker to execute a task. This can also be specified with the environment variable \ref STARPU_DATA_LOCALITY_ENFORCE. This can also be specified at compilation time by giving to the configure script the option \ref enable-data-locality-enforce “–enable-data-locality-enforce”. (default = \c 0)

§single_combined_worker: c_int

By default, StarPU executes parallel tasks concurrently. Some parallel libraries (e.g. most OpenMP implementations) however do not support concurrent calls to parallel code. In such case, setting this flag makes StarPU only start one parallel task at a time (but other CPU and GPU tasks are not affected and can be run concurrently). The parallel task scheduler will however still try varying combined worker sizes to look for the most efficient ones. This can also be specified with the environment variable \ref STARPU_SINGLE_COMBINED_WORKER. (default = \c 0)

§disable_asynchronous_copy: c_int

This flag should be set to 1 to disable asynchronous copies between CPUs and all accelerators. The AMD implementation of OpenCL is known to fail when copying data asynchronously. When using this implementation, it is therefore necessary to disable asynchronous data transfers. This can also be specified with the environment variable \ref STARPU_DISABLE_ASYNCHRONOUS_COPY. This can also be specified at compilation time by giving to the configure script the option \ref disable-asynchronous-copy “–disable-asynchronous-copy”. (default = \c 0)

§disable_asynchronous_cuda_copy: c_int

This flag should be set to 1 to disable asynchronous copies between CPUs and CUDA accelerators. This can also be specified with the environment variable \ref STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY. This can also be specified at compilation time by giving to the configure script the option \ref disable-asynchronous-cuda-copy “–disable-asynchronous-cuda-copy”. (default = \c 0)

§disable_asynchronous_hip_copy: c_int

This flag should be set to 1 to disable asynchronous copies between CPUs and HIP accelerators. This can also be specified with the environment variable \ref STARPU_DISABLE_ASYNCHRONOUS_HIP_COPY. This can also be specified at compilation time by giving to the configure script the option \ref disable-asynchronous-hip-copy “–disable-asynchronous-hip-copy”. (default = \c 0)

§disable_asynchronous_opencl_copy: c_int

This flag should be set to 1 to disable asynchronous copies between CPUs and OpenCL accelerators. The AMD implementation of OpenCL is known to fail when copying data asynchronously. When using this implementation, it is therefore necessary to disable asynchronous data transfers. This can also be specified with the environment variable \ref STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY. This can also be specified at compilation time by giving to the configure script the option \ref disable-asynchronous-opencl-copy “–disable-asynchronous-opencl-copy”. (default = \c 0)

§disable_asynchronous_mpi_ms_copy: c_int

This flag should be set to 1 to disable asynchronous copies between CPUs and MPI Master Slave devices. This can also be specified with the environment variable \ref STARPU_DISABLE_ASYNCHRONOUS_MPI_MS_COPY. This can also be specified at compilation time by giving to the configure script the option \ref disable-asynchronous-mpi-master-slave-copy “–disable-asynchronous-mpi-master-slave-copy”. (default = \c 0).

§disable_asynchronous_tcpip_ms_copy: c_int

This flag should be set to 1 to disable asynchronous copies between CPUs and TCP/IP Master Slave devices. This can also be specified with the environment variable \ref STARPU_DISABLE_ASYNCHRONOUS_TCPIP_MS_COPY. This can also be specified at compilation time by giving to the configure script the option \ref disable-asynchronous-tcpip-master-slave-copy “–disable-asynchronous-tcpip-master-slave-copy”. (default = \c 0).

§disable_asynchronous_max_fpga_copy: c_int

This flag should be set to 1 to disable asynchronous copies between CPUs and Maxeler FPGA devices. This can also be specified with the environment variable \ref STARPU_DISABLE_ASYNCHRONOUS_MAX_FPGA_COPY. This can also be specified at compilation time by giving to the configure script the option \ref disable-asynchronous-fpga-copy “–disable-asynchronous-fpga-copy”. (default = 0).

§enable_map: c_int

This flag should be set to 1 to disable memory mapping support between memory nodes. This can also be specified with the environment variable \ref STARPU_ENABLE_MAP.

§cuda_opengl_interoperability: *mut c_uint

Enable CUDA/OpenGL interoperation on these CUDA devices. This can be set to an array of CUDA device identifiers for which \c cudaGLSetGLDevice() should be called instead of \c cudaSetDevice(). Its size is specified by the starpu_conf::n_cuda_opengl_interoperability field below (default = NULL)

§n_cuda_opengl_interoperability: c_uint

Size of the array starpu_conf::cuda_opengl_interoperability

§not_launched_drivers: *mut starpu_driver

Array of drivers that should not be launched by StarPU. The application will run in one of its own threads. (default = NULL)

§n_not_launched_drivers: c_uint

The number of StarPU drivers that should not be launched by StarPU, i.e number of elements of the array starpu_conf::not_launched_drivers. (default = \c 0)

§trace_buffer_size: u64

Specify the buffer size used for FxT tracing. Starting from FxT version 0.2.12, the buffer will automatically be flushed when it fills in, but it may still be interesting to specify a bigger value to avoid any flushing (which would disturb the trace).

§global_sched_ctx_min_priority: c_int

Set the minimum priority used by priorities-aware schedulers. This also can be specified with the environment variable \ref STARPU_MIN_PRIO

§global_sched_ctx_max_priority: c_int

Set the maximum priority used by priorities-aware schedulers. This also can be specified with the environment variable \ref STARPU_MAX_PRIO

§catch_signals: c_int

Specify if StarPU should catch \c SIGINT, \c SIGSEGV and \c SIGTRAP signals to make sure final actions (e.g dumping FxT trace files) are done even though the application has crashed. By default (value = \c 1), signals are caught. It should be disabled on systems which already catch these signals for their own needs (e.g JVM) This can also be specified with the environment variable \ref STARPU_CATCH_SIGNALS.

§start_perf_counter_collection: c_uint

Specify whether StarPU should automatically start to collect performance counters after initialization

§driver_spinning_backoff_min: c_uint

Minimum spinning backoff of drivers (default = \c 1)

§driver_spinning_backoff_max: c_uint

Maximum spinning backoff of drivers. (default = \c 32)

§cuda_only_fast_alloc_other_memnodes: c_int

Specify if CUDA workers should do only fast allocations when running the datawizard progress of other memory nodes. This will pass the interval value _STARPU_DATAWIZARD_ONLY_FAST_ALLOC to the allocation method. Default value is 0, allowing CUDA workers to do slow allocations. This can also be specified with the environment variable \ref STARPU_CUDA_ONLY_FAST_ALLOC_OTHER_MEMNODES.

Trait Implementations§

Source§

impl Clone for starpu_conf

Source§

fn clone(&self) -> starpu_conf

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for starpu_conf

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for starpu_conf

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for starpu_conf

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.