-
Notifications
You must be signed in to change notification settings - Fork 2
/
run_beast.sh
executable file
·27 lines (23 loc) · 925 Bytes
/
run_beast.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# This script is intended to invoke beast within a Docker container
# running on the Google Cloud Platform via the Pipelines API / dsub
IN_DIR=$(dirname "${INPUT_FILE}")
OUT_DIR=$(dirname "${OUTPUT_FILES}")
OUTPUT_PREFIX=$(basename "${INPUT_FILE}" .xml)
if [ -z "${BEAGLE_ORDER}" ]; then
BEAGLE_ORDER=1 # run on first GPU only if BEAGLE_ORDER is not set
fi
if [ -z "${INPUT_FILE}" ]; then
echo "Usage: $(basename $0) [beagle_order]"
echo ' The input xml must be passed via INPUT_FILE=/path/to/beauti_generated_input.xml'
exit 1
fi
pwd
cd $OUT_DIR
# report beagle info including number of GPUs
beast -beagle_info > "${OUTPUT_PREFIX}.out"
# report CPU info
lscpu | tee -a "${OUTPUT_PREFIX}.out"
pwd
beast -beagle_multipartition off -beagle_GPU -beagle_cuda -beagle_double -beagle_scaling always -beagle_order ${BEAGLE_ORDER} ${BEAST_EXTRA_ARGS} ${INPUT_FILE} >> "${OUTPUT_PREFIX}.out"
ls