Add convenience script to download performance libraries

This commit is contained in:
Michael Vines 2018-06-20 15:11:59 -07:00
parent 410272ee1d
commit 89fc0ad7a9
4 changed files with 27 additions and 26 deletions

View File

@ -95,7 +95,7 @@ To run a performance-enhanced fullnode on Linux, download `libcuda_verify_ed2551
it by adding `--features=cuda` to the line that runs `solana-fullnode` in `leader.sh`.
```bash
$ wget https://solana-build-artifacts.s3.amazonaws.com/v0.5.0/libcuda_verify_ed25519.a
$ ./fetch-perf-libs.sh
$ cargo run --release --features=cuda --bin solana-fullnode -- -l leader.json < genesis.log
```

View File

@ -2,17 +2,10 @@
cd "$(dirname "$0")/.."
LIB=libcuda_verify_ed25519.a
if [[ ! -r $LIB ]]; then
if [[ -z "${libcuda_verify_ed25519_URL:-}" ]]; then
echo "$0 skipped. Unable to locate $LIB"
exit 0
fi
./fetch-perf-libs.sh
export LD_LIBRARY_PATH=/usr/local/cuda/lib64
export PATH=$PATH:/usr/local/cuda/bin
curl -X GET -o $LIB "$libcuda_verify_ed25519_URL"
fi
# shellcheck disable=SC1090 # <-- shellcheck can't follow ~
source ~/.cargo/env

View File

@ -4,22 +4,8 @@ set -o xtrace
cd "$(dirname "$0")/.."
if [[ -z "${libgf_complete_URL:-}" ]]; then
echo libgf_complete_URL undefined
exit 1
fi
./fetch-perf-libs.sh
if [[ -z "${libJerasure_URL:-}" ]]; then
echo libJerasure_URL undefined
exit 1
fi
curl -X GET -o libJerasure.so "$libJerasure_URL"
curl -X GET -o libgf_complete.so "$libgf_complete_URL"
ln -s libJerasure.so libJerasure.so.2
ln -s libJerasure.so libJerasure.so.2.0.0
ln -s libgf_complete.so libgf_complete.so.1.0.0
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
# shellcheck disable=SC1090 # <-- shellcheck can't follow ~

22
fetch-perf-libs.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash -e
if [[ $(uname) != Linux ]]; then
echo Performance libraries are only available for Linux
exit 1
fi
if [[ $(uname -m) != x86_64 ]]; then
echo Performance libraries are only available for x86_64 architecture
exit 1
fi
(
set -x
curl -o solana-perf.tgz \
https://solana-perf.s3.amazonaws.com/master/x86_64-unknown-linux-gnu/solana-perf.tgz
tar zxvf solana-perf.tgz
)
echo "Downloaded solana-perf version: $(cat solana-perf-HEAD.txt)"
exit 0