Skip to content

Commit 006b402

Browse files
committed
ProvDB integration test scripts now query fi_info for ofi_rxm and fallback to sockets, allowing running with default spack install of libfabric, which does not include ofi_rxm
1 parent ebb2e65 commit 006b402

4 files changed

Lines changed: 54 additions & 9 deletions

File tree

test/run_ad_with_provdb.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,21 @@ set -o pipefail
66
if [ -f "../bin/provdb_admin" ]; then
77
rm -f provdb.*.unqlite* provider.address
88

9+
#Find a protocol supported by libfabric
10+
protocol=
11+
if [ $(fi_info -l | grep ofi_rxm | wc -l) == "1" ]; then
12+
protocol="ofi+tcp"
13+
elif [ $(fi_info -l | grep sockets | wc -l) == "1" ]; then
14+
protocol="sockets"
15+
else
16+
"Neither tcp;ofi_rxm or sockets fabrics are supported by the install of libfabrics"
17+
exit 1
18+
fi
19+
920
ip=$(hostname -i)
1021
port=1234
1122

12-
../bin/provdb_admin ${ip}:${port} &
23+
../bin/provdb_admin ${ip}:${port} -engine "$protocol" &
1324
admin=$!
1425
while [ ! -f provider.address ]; do
1526
echo "Waiting for provider address"

test/run_provdb_autoshutdown_test.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@ set -e
44
set -o pipefail
55

66
if [ -f "../bin/provdb_admin" ]; then
7-
#Connect via tcp
87
rm -f provdb.*.unqlite* provider.address
98

9+
#Find a protocol supported by libfabric
10+
protocol=
11+
if [ $(fi_info -l | grep ofi_rxm | wc -l) == "1" ]; then
12+
protocol="ofi+tcp"
13+
elif [ $(fi_info -l | grep sockets | wc -l) == "1" ]; then
14+
protocol="sockets"
15+
else
16+
"Neither tcp;ofi_rxm or sockets fabrics are supported by the install of libfabrics"
17+
exit 1
18+
fi
19+
1020
ip=$(hostname -i)
1121
port=1234
1222
shards=2
1323

14-
../bin/provdb_admin ${ip}:${port} -autoshutdown true -nshards ${shards} &
24+
../bin/provdb_admin ${ip}:${port} -autoshutdown true -nshards ${shards} -engine "${protocol}" &
1525
admin=$!
1626
while [ ! -f provider.address ]; do
1727
echo "Waiting for provider address"

test/run_provdb_client_test.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,26 @@ set -e
44
set -o pipefail
55

66
if [ -f "../bin/provdb_admin" ]; then
7+
#Find a protocol supported by libfabric
8+
protocol=
9+
if [ $(fi_info -l | grep ofi_rxm | wc -l) == "1" ]; then
10+
protocol="ofi+tcp"
11+
elif [ $(fi_info -l | grep sockets | wc -l) == "1" ]; then
12+
protocol="sockets"
13+
else
14+
"Neither tcp;ofi_rxm or sockets fabrics are supported by the install of libfabrics"
15+
exit 1
16+
fi
17+
718
#Connect via tcp
8-
echo "Test 4 clients 1 shard TCP"
19+
echo "Test 4 clients 1 shard ${protocol}"
920
rm -f provdb.*.unqlite* provider.address margo_dump*.state
1021

1122
ip=$(hostname -i)
1223
port=1234
1324
shards=1
1425

15-
../bin/provdb_admin ${ip}:${port} -autoshutdown false -nshards ${shards} &
26+
../bin/provdb_admin ${ip}:${port} -engine "${protocol}" -autoshutdown false -nshards ${shards} &
1627
admin=$!
1728
while [ ! -f provider.address ]; do
1829
echo "Waiting for provider address"
@@ -29,11 +40,11 @@ if [ -f "../bin/provdb_admin" ]; then
2940

3041
#Repeat with multiple clients and multiple shards
3142
#sleep 3
32-
echo "Test 4 clients 2 shards TCP"
43+
echo "Test 4 clients 2 shards ${protocol}"
3344
rm -f provdb.*.unqlite* provider.address margo_dump*.state
3445
shards=2
3546

36-
../bin/provdb_admin ${ip}:${port} -autoshutdown false -nshards ${shards} &
47+
../bin/provdb_admin ${ip}:${port} -engine "${protocol}" -autoshutdown false -nshards ${shards} &
3748
admin=$!
3849
while [ ! -f provider.address ]; do
3950
echo "Waiting for provider address"

test/run_provdb_pserver_client_test.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,27 @@ set -e
44
set -o pipefail
55

66
if [ -f "../bin/provdb_admin" ]; then
7-
echo "Test 1 clients 1 pserver TCP"
87
rm -f provdb.*.unqlite* provider.address
98

9+
#Find a protocol supported by libfabric
10+
protocol=
11+
if [ $(fi_info -l | grep ofi_rxm | wc -l) == "1" ]; then
12+
protocol="ofi+tcp"
13+
elif [ $(fi_info -l | grep sockets | wc -l) == "1" ]; then
14+
protocol="sockets"
15+
else
16+
"Neither tcp;ofi_rxm or sockets fabrics are supported by the install of libfabrics"
17+
exit 1
18+
fi
19+
20+
echo "Test 1 clients 1 pserver ${protocol}"
21+
22+
1023
ip=$(hostname -i)
1124
port=1234
1225
shards=1
1326

14-
../bin/provdb_admin ${ip}:${port} -autoshutdown true -nshards 1 &
27+
../bin/provdb_admin ${ip}:${port} -autoshutdown true -nshards 1 -engine "${protocol}" &
1528
admin=$!
1629
while [ ! -f provider.address ]; do
1730
echo "Waiting for provider address"

0 commit comments

Comments
 (0)