Build - UB-Quantic/qflex GitHub Wiki
Build
NOTE: Make sure you cloned the repo with the submodules by running
git submodule init
git submodule update
Prerequisites
- C++17 compiler
- BLAS library (
openblas
or if compiled withicpc
, MKL may be used) - Python 3
- autoconf
CTE-POWER
This module configuration works:
module load gcc/9.2.0 openblas python
The CTE-POWER has no outgoing connections so pip cannot download the required packages. The solution is to download the packages in your current computer, upload them and install them locally.
- Download the packages on your host:
pip download -r scripts/requirements.txt -d .pip
- Upload them to the cluster.
- Offline install the packages on the cluster:
conda create --name qflex --offline
conda activate qflex
pip install -r scripts/requirements.txt --no-index -f .pip
(You may delete the .pip
folder and all its content now)
Finally, build the project running the following:
python setup.py build
If you want to run the tests,
make run-tests
qflex only
If you are interested only in qflex and want to avoid the Python interface, you have to build it in the following way:
autoreconf -i
autoconf
./configure --disable-python_checks --disable-python_tests --disable-pybind11
make
Troubleshooting
ERROR: Could not find a version that satisfies the requirement clang-format==9.0.0
In macOS, you will encounter the following error when downloading the Python packages:
ERROR: Could not find a version that satisfies the requirement clang-format==9.0.0 (from -r scripts/requirements.txt (line 6)) (from versions: none)
ERROR: No matching distribution found for clang-format==9.0.0 (from -r scripts/requirements.txt (line 6))
The reason for this error is that clang-format
through Pip is only available for Linux platforms. Just comment the package in scripts/requirements.txt
and run it again. clang-format
is available through Homebrew on macOS.
brew install clang-format