https://github.com/pingu-73/hpx-sys
HPX's hpx-sys crate, assumes that user has installed hpx along with tcmalloc.
https://github.com/pingu-73/hpx-sys
Last synced: about 2 months ago
JSON representation
HPX's hpx-sys crate, assumes that user has installed hpx along with tcmalloc.
- Host: GitHub
- URL: https://github.com/pingu-73/hpx-sys
- Owner: pingu-73
- License: bsl-1.0
- Created: 2024-06-30T09:29:21.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-30T11:02:44.000Z (11 months ago)
- Last Synced: 2024-07-02T11:54:39.650Z (11 months ago)
- Language: Rust
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hpx-sys
Rust bindings to hpx, a Concurrency and Parallelism library.
# Building on Linux
## Dependencies
- boost
- openmpi (optional)## Prerequisites
Install [Portable Hardware Locality (hwloc)](https://www.open-mpi.org/software/hwloc/v2.11/)
```
tar -xf hwloc-2.11.0.tar.gz && cd hwloc-2.11.0/
mkdir build && cd build
../configure --prefix=/home/pingu/opt/hwloc
make -j
make install
```Install [gpreftools](https://github.com/gperftools/gperftools)
```
git clone https://github.com/gperftools/gperftools.git
cd gperftools
./autogen.sh
mkdir build && cd build
../configure --enable-minimal --prefix=/home/pingu/opt/gperftools
make
make install
```## Building HPX
Get the [hpx](https://github.com/STEllAR-GROUP/hpx/) development branch.
```
git clone https://github.com/STEllAR-GROUP/hpx.git
```
Configure it with CMake
```
cd hpx
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/hpx -DBOOST_ROOT= \
-DTCMALLOC_INCLUDE_DIR=/home/pingu/opt/gperftools/include/ \
-DTCMALLOC_LIBRARY=/home/pingu/opt/gperftools/lib/libtcmalloc_minimal_debug.so \
-DHWLOC_LIBRARY=/home/pingu/opt/hwloc/lib/libhwloc.so \
-DHWLOC_INCLUDE_DIR=/home/pingu/opt/hwloc/include/ ..
make -j8
make install
```Add the library path of HPX to ldconfig
```
sudo echo /opt/hpx/lib > /etc/ld.so.conf.d/hpx.conf
sudo ldconfig
```## Building hpx-sys
To build the bindings run
```
cargo b --verbose
```## Remaining Things
- [ ] Build script is currently finding for hpx at specified location. But
since hpx uses
[pkg-config](https://hpx-docs.stellar-group.org/branches/master/html/manual/creating_hpx_projects.html#using-hpx-with-pkg-config)
and rust already has a [pkg-config](https://crates.io/crates/pkg-config)
wrapper.
- [ ] Add hpx-sys crate to hpx-rs crate.
- [ ] Convert the hpx-rs crate structure to something like [ssh2-rs](https://github.com/alexcrichton/ssh2-rs), [git2-rs](https://github.com/rust-lang/git2-rs).