36 lines
869 B
Bash
Executable File
36 lines
869 B
Bash
Executable File
#!/bin/bash
|
|
# Connect all lanes to cryosparc
|
|
|
|
: "${CRYOSPARCM:=/data/user/$USER/cryosparc/cryosparc2_master/bin/cryosparcm}"
|
|
|
|
if [[ ! -x "$CRYOSPARCM" ]]; then
|
|
echo "ERROR: Unable to find cryosparcm at $CRYOSPARCM" >&2
|
|
exit 1
|
|
fi
|
|
|
|
LANES=("merlin6" "merlin6-big" "merlin6-short" "merlin6-rtx2080ti")
|
|
|
|
success=1
|
|
for lane in "${LANES[@]}"; do
|
|
cd "$lane"
|
|
WORKER=$(sed -nE 's/.*"worker_bin_path" *: *"([^"]*)".*/\1/p' cluster_info.json)
|
|
if [[ ! -x "$WORKER" ]]; then
|
|
echo "ERROR: Worker $WORKER from lane $lane not found." >&2
|
|
else
|
|
echo "$CRYOSPARCM" cluster connect >&2
|
|
"$CRYOSPARCM" cluster connect
|
|
|
|
if [[ $? != 0 ]]; then
|
|
echo "ERROR connecting $lane" >&2
|
|
success=0
|
|
fi
|
|
echo >&2
|
|
|
|
fi
|
|
cd ..
|
|
done
|
|
|
|
if [[ $success == 0 ]]; then
|
|
echo "Errors occured. See above." >&2
|
|
fi
|