diff --git a/tests/Makefile.subdir b/tests/Makefile.subdir index 72f1788..cc203dd 100644 --- a/tests/Makefile.subdir +++ b/tests/Makefile.subdir @@ -5,12 +5,15 @@ TESTS_ENVIRONMENT += \ check_PROGRAMS += TESTS += \ - tests/basic.sh + tests/basic.sh\ + tests/multi.sh EXTRA_DIST += \ tests/basic.sh \ tests/mochi-quintain-provider.json\ - tests/quintain-benchmark-example.json + tests/quintain-benchmark-example.json\ + tests/mochi-quintain-provider-2svr-A.json\ + tests/mochi-quintain-provider-2svr-B.json DISTCLEANFILES += \ test-output.gz \ diff --git a/tests/mochi-quintain-provider-2svr-A.json b/tests/mochi-quintain-provider-2svr-A.json new file mode 100644 index 0000000..ab6b33b --- /dev/null +++ b/tests/mochi-quintain-provider-2svr-A.json @@ -0,0 +1,34 @@ +{ + "margo" : { + }, + "libraries" : [ + "libquintain-bedrock.so", + "libflock-bedrock-module.so" + ], + "providers" : [ + { + "name" : "my_quintain_provider", + "type" : "quintain", + "provider_id" : 1, + "dependencies": { + "pool" : "__primary__" + }, + "config" : {} + }, + { + "name" : "quintain_group", + "type" : "flock", + "provider_id" : 2, + "dependencies": { + "pool" : "__primary__" + }, + "config": { + "bootstrap": "self", + "file": "./quintain.flock.json", + "group": { + "type": "centralized" + } + } + } + ] +} diff --git a/tests/mochi-quintain-provider-2svr-B.json b/tests/mochi-quintain-provider-2svr-B.json new file mode 100644 index 0000000..cd0bf6c --- /dev/null +++ b/tests/mochi-quintain-provider-2svr-B.json @@ -0,0 +1,34 @@ +{ + "margo" : { + }, + "libraries" : [ + "libquintain-bedrock.so", + "libflock-bedrock-module.so" + ], + "providers" : [ + { + "name" : "my_quintain_provider", + "type" : "quintain", + "provider_id" : 1, + "dependencies": { + "pool" : "__primary__" + }, + "config" : {} + }, + { + "name" : "quintain_group", + "type" : "flock", + "provider_id" : 2, + "dependencies": { + "pool" : "__primary__" + }, + "config": { + "bootstrap": "join", + "file": "./quintain.flock.json", + "group": { + "type": "centralized" + } + } + } + ] +} diff --git a/tests/multi.sh b/tests/multi.sh new file mode 100755 index 0000000..1ca709c --- /dev/null +++ b/tests/multi.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e +set -o pipefail + +if [ -z $srcdir ]; then + echo srcdir variable not set. + exit 1 +fi + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/src/.libs" + +bedrock -c $srcdir/tests/mochi-quintain-provider-2svr-A.json na+sm:// & +sleep 2 +bedrock -c $srcdir/tests/mochi-quintain-provider-2svr-B.json na+sm:// & +sleep 2 + +mpiexec -n 2 src/quintain-benchmark -g quintain.flock.json -j $srcdir/tests/quintain-benchmark-example.json -o test-output + +bedrock-shutdown -f quintain.flock.json na+sm://