Mcf has been tested on Ubuntu 18.04 / 20.04 with the following package dependencies:
- googletest v1.11.0
- libzmq v4.3.4
- cppzmq v4.8.1
- msgpack-c v4.0.3
- CLI11 v2.1.2
- spdlog v1.9.2
- jsoncpp v1.9.5
- python >= 3.8 (Only needed if using mcf_py or building / running tests)
For building MCF with CUDA support:
Dependencies can be installed in any of the following ways:
-
(Option 1) Install dependencies with automated install script: Run the install script to automatically install all dependencies. Dependency packages will downloaded to
mcf/deps/<package_name>
and installed to a user defined directory (note: install_dir must be an absolute path, for example "$HOME/flux-mcf"):bash install_deps.sh <install_dir> <number_of_cores>
(Optional) To install dependencies required to build MCF with CUDA support:
bash install_cuda_deps.sh <install_dir> <number_of_cores>
-
(Option 2) Manually install the dependencies: Ensure that the headers and libraries (where applicable) are either installed to system paths or add the paths to the cmake search path using the CMAKE_PREFIX_PATH cmake argument.
-
(Option 3) Install dependencies within Docker container: Follow the instructions in the Docker README.
-
The path to the installed dependencies can either be added to the MCF cmake command in
-DCMAKE_INSTALL_PREFIX
or can be added to$PATH
:export PATH=$PATH:/path/to/install_dir
-
Install MCF:
mkdir build cd build cmake .. \ -DCMAKE_INSTALL_PREFIX=/path/to/install/dir \ # Directory where mcf will be installed -DCMAKE_PREFIX_PATH="/path/to/deps/install;/path/to/other/dir" \ # Directories in which dependencies are installed. -DBUILD_CUDA=TRUE \ -DBUILD_REMOTE=TRUE \ -DBUILD_TESTS=TRUE make -j<number_of_cores> make install
Note. If you get an error
fatal error: unable to parse version script file /path/to/libexports.txt
, make sure you are using the ld.bfd linker (as opposed to the gold linker for example). -
Ensure that the install directory is on the LD_LIBRARY_PATH (to make the change persist, add the command to your
.bashrc
file):export LD_LIBRARY_PATH:$LD_LIBRARY_PATH:/path/to/install/dir
Follow instructions in the README.md
Follow instructions in README.md
MCF must be compiled with `-BUILD_REMOTE=TRUE`, `-BUILD_TESTS=TRUE` to run tests.
-
To run gtests:
cd build ctest
-
To run pytests:
# Ensure MCF Python and MCF Value Type Generator have been installed pip install pytest PYTHONPATH=mcf_tools/types_generator:$PYTHONPATH pytest mcf_tools/types_generator/test/manual_tests mcf_remote
-
To run generated value type tests:
cd mcf_tools/types_generator/test/generated_tests/example_value_types_test && bash run_test.sh
-
To clean entire cmake build:
rm -r build
-
To clean data generated by MCF (e.g. generated value types):
make McfCleaner