diff --git a/README.md b/README.md index 294560e12..0c1a45125 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/ci/test-cuda.sh b/ci/test-cuda.sh index 53aedac5e..ae05406bb 100755 --- a/ci/test-cuda.sh +++ b/ci/test-cuda.sh @@ -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 +export LD_LIBRARY_PATH=/usr/local/cuda/lib64 +export PATH=$PATH:/usr/local/cuda/bin # shellcheck disable=SC1090 # <-- shellcheck can't follow ~ source ~/.cargo/env diff --git a/ci/test-erasure.sh b/ci/test-erasure.sh index c99333408..979057829 100755 --- a/ci/test-erasure.sh +++ b/ci/test-erasure.sh @@ -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 ~ diff --git a/fetch-perf-libs.sh b/fetch-perf-libs.sh new file mode 100755 index 000000000..0b92f50e8 --- /dev/null +++ b/fetch-perf-libs.sh @@ -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