-
Notifications
You must be signed in to change notification settings - Fork 76
Build Instructions
- C++ Compiler (C++14-compatible)
- GCC 4.9 or newer.
- Intel Compiler 2014 or newer.
- Clang 3.4 or newer.
- Python 3
- CMake 2.8.10 or newer.
- Boost 1.57.0 or newer.
- pytest
- pybind 2.2+
- Blaze
- Blaze Tensor
- BLAS and LAPACK: CLAPACK/OpenBLAS, Intel MKL, ATLAS, etc
- HPX
Before installing other dependencies please make sure the following packages are installed:
sudo apt-get install wget python3 python3-dev python3-pip libblas-dev liblapack-dev
pip3 install pytest
You can find more details in HPX Build Recipes.
Note: Avoid using jemalloc If you are installing Phylanx with its Python frontend.
git clone --depth 1 https://github.com/STEllAR-GROUP/hpx.git
cd hpx
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE={Release,Debug} \
-DCMAKE_INSTALL_PREFIX=/hpx/install/path \
-DHPX_WITH_MALLOC=tcmalloc \
-DTCMALLOC_ROOT=/path/to/gperftools \
[-DHPX_WITH_DEPRECATION_WARNINGS=Off -DHPX_WITH_EXAMPLES=Off] ..
make
make install
git clone --depth=1 https://bitbucket.org/blaze-lib/blaze.git
cd blaze
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE={Release,Debug} -DCMAKE_INSTALL_PREFIX=/blaze/install/path -DBLAZE_SMP_THREADS=HPX -DHPX_DIR=/path/to/hpx ..
make install
git clone --depth=1 https://github.com/STEllAR-GROUP/blaze_tensor.git
cd blaze_tensor
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE={Release,Debug} -DCMAKE_INSTALL_PREFIX=/blaze_tensor/install/path -DBLAZE_DIR=/path/to/blaze -DBLAZE_SMP_THREADS=HPX -DHPX_DIR=/path/to/hpx ..
make
make install
git clone --depth=1 https://github.com/pybind/pybind11.git
cd pybind11
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE={Release,Debug} -DCMAKE_INSTALL_PREFIX=/pybind11/install_path/ ..
make install
git clone --depth=1 https://github.com/STEllAR-GROUP/phylanx.git
cd phylanx
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE={Release,Debug} -DCMAKE_INSTALL_PREFIX=/phylanx/install/path/ -DHPX_DIR=/hpx/install/path/lib/cmake/HPX/ -Dblaze_DIR=/blaze/install/path/share/blaze/cmake/ -Dpybind11_DIR=/pybind11/install/path/share/cmake/pybind11/ ..
make
make install
You can find more details in CircleCi config.
- Install Vcpkg
- Install the prerequisites via Vcpkg
e.g.
vcpkg install boost:x64-windows
vcpkg install hwloc:x64-windows
vcpkg install pybind11:x64-windows
vcpkg install clapack:x64-windows
vcpkg install blaze:x64-windows --head
Note: If you want to use a different BLAS library instead of OpenBLAS consult CMake documentation https://github.com/Kitware/CMake/blob/master/Modules/FindBLAS.cmake and elsewhere
-
Build HPX according to instructions from HPX documentation
-
Install BlazeTensor
Open a PowerShell window at the location you want to install BlazeTensor, e.g. C:/Repos/
, and enter
git clone https://github.com/STEllAR-GROUP/blaze_tensor.git
Create two files in the location you will install BlazeTensor called "blaze_tensor.bat" and "blaze_tensor.cmake". The .bat file will contain the following
cd blaze_tensor
rd /s /q cmake-build-debug
git pull
cmake -C ../blaze_tensor.cmake -H. -Bcmake-build-debug -G"Visual Studio 16 2019" -A"x64"
cmake --build cmake-build-debug
Note: Ensure that the line starting with "cmake -C" is modified to match your version of Windows and Visual Studio. Also, you may choose to omit the line beginning with "rd" as this removes any previous build of BlazeTensor if it exists.
Then the .cmake file will contain
set(CMAKE_BUILD_TYPE Debug CACHE STRING "")
set(CMAKE_TOOLCHAIN_FILE "C:/Repos/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE FILEPATH "")
set(HPX_DIR "C:/Repos/hpx/cmake-build-debug/lib/cmake/HPX" CACHE PATH "")
Note: You may need to change the file path of the toolchain file to the location of vcpkg.cmake and change the HPX_DIR to the file path of HPXConfig.cmake
Now run the "blaze_tensor.bat" file by double-clicking it.
- Build Phylanx
- Set
CMAKE_TOOLCHAIN_FILE
to the location of the Vcpkg CMake script- e.g. If Vcpkg was set up in
C:/local/vcpkg
then the script file may be located inC:/local/vcpkg/scripts/buildsystems/vcpkg.cmake
- e.g. If Vcpkg was set up in
- Set
HPX_DIR
to the location of your HPX build- e.g. If you built HPX in
C:/local/hpx-debug
the path would beC:/local/hpx-debug/lib/cmake/HPX
- e.g. If you built HPX in
- Provide the same
CMAKE_BUILD_TYPE
you used for building HPX
- Set