Skip to content

Commit 12d97d6

Browse files
committed
Update worker entrypoints for local data.
Updating main entrypoint scripts for ngen and calibration worker images for local data handling.
1 parent d947869 commit 12d97d6

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docker/main/ngen/ngen_cal_entrypoint.sh

+8
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ while [ ${#} -gt 0 ]; do
3939
declare -x CALIBRATION_CONFIG_BASENAME="${2:?}"
4040
shift
4141
;;
42+
--primary-workers)
43+
declare -x PRIMARY_WORKERS="${2:?}"
44+
shift
45+
;;
4246
esac
4347
shift
4448
done
@@ -101,6 +105,10 @@ start_calibration() {
101105
return ${NGEN_RETURN}
102106
}
103107

108+
# Run make_data_local Python functions to make necessary data local
109+
# Called for every worker, but Python code will make sure only one worker per node makes a call that has effect
110+
py_funcs make_data_local ${WORKER_INDEX:-0} ${PRIMARY_WORKERS:-0}
111+
104112
# We can allow worker index to not be supplied when executing serially
105113
if [ "${WORKER_INDEX:-0}" = "0" ]; then
106114
if [ "$(whoami)" = "${MPI_USER:?MPI user not defined}" ]; then

docker/main/ngen/ngen_entrypoint.sh

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ while [ ${#} -gt 0 ]; do
3535
declare -x WORKER_INDEX="${2:?}"
3636
shift
3737
;;
38+
--primary-workers)
39+
declare -x PRIMARY_WORKERS="${2:?}"
40+
shift
41+
;;
3842
esac
3943
shift
4044
done
@@ -60,6 +64,10 @@ if [ ! -e /dmod/datasets/linked_job_output ]; then
6064
ln -s ${JOB_OUTPUT_WRITE_DIR} /dmod/datasets/linked_job_output
6165
fi
6266

67+
# Run make_data_local Python functions to make necessary data local
68+
# Called for every worker, but Python code will make sure only one worker per node makes a call that has effect
69+
py_funcs make_data_local ${WORKER_INDEX:-0} ${PRIMARY_WORKERS:-0}
70+
6371
# We can allow worker index to not be supplied when executing serially
6472
if [ "${WORKER_INDEX:-0}" = "0" ]; then
6573
if [ "$(whoami)" = "${MPI_USER:?MPI user not defined}" ]; then

0 commit comments

Comments
 (0)