This system crate provides Rust language bindings (via the use of Bindgen) for Minos Computing Library (MCL). It is highly recommended that instead of using libmcl-sys directly your instead use the higer level (and safer) mcl-rs crate
cargo install mcl_sched
)Set the OCL_PATH_INC
and OCL_PATH_LIB
environmental variables with the path to OpenCL include
and lib
(or lib64
) directories respectively.
Note: this may not be needed if OpenCL is in the system directories
install mcl_sched:
bash
cargo install mcl_sched
Build using Cargo
bash
cargo build --release
set the MCL_PATH
environmental variable with the path to MCL installation directory. For example in bash use:
bash
export MCL_PATH=/path/to/mcl/install/
Cargo will try to find the lib/
and include/
directories based on that.
Set the OCL_PATH_INC
and OCL_PATH_LIB
environmental variables with the path to OpenCL include
and lib
(or lib64
) directories respectively.
Note: this may not be needed if OpenCL is in the system directories
Build using Cargo
bash
cargo build --release
This should produce an .rlib
file in target/release/
directory.
libmcl-sys comes with a set of unit tests that can be executed by running:
bash
cargo test --release
Reminder: The MCL scheduler should be running when executing the tests.
if you installed mclsched via cargo then you should be able to invoke directly:
bash
mcl_sched
If you built mcl manually you may need to specify the path to the mclsched binary
We expose three feauture flags, losely corresponding to configuration options of the underlying MCL c-library 1. mcldebug - enables debug logging output from the underlying c-libary 2. sharedmem - enables interprocess host shared memory buffers 3. pocl_extensions - enables interprocess device based shared memory buffers, requires a patched version of POCL 1.8 to have been succesfully installed (please see https://github.com/pnnl/mcl/tree/dev#using-custom-pocl-extensions for more information)
MCL (and libmcl-sys) is a research prototype and still under development, thus not all intended features are yet implemented.
Please, contact Roberto Gioiosa at PNNL (roberto.gioiosa@pnnl.gov) if you have any MCL questions. For Rust related questions please contact Ryan Friese at PNNL (ryan.friese@pnnl.gov)
Roberto Gioiosa
Ryan Friese
Polykarpos Thomadakis
This project is licensed under the BSD License - see the LICENSE file for details.
IF you wish to cite MCL, please, use the following reference:
Other work that leverage or describe additional MCL features: