Commit a8e3fb54 authored by Robert Dietrich's avatar Robert Dietrich

fixed check for PIKA python3 availability

parent 7b787116
......@@ -86,15 +86,16 @@ BATCHSYSTEM_ENV_FILE=${LOCAL_STORE}/pika_batchsystem_env_${PIKA_JOB_ID}
source ${PIKA_ROOT}/job_control/slurm/taurus/pika_slurm_env.sh >> $DEBUG_PATH 2>&1
# check for Python installation
echo -e "\nCheck python3 path:" >> $DEBUG_PATH 2>&1
if [ -x "$(command -v python3)" ]; then
which python3 >> $DEBUG_PATH 2>&1
echo -e "\nCheck PIKA python3:" >> $DEBUG_PATH 2>&1
pika_python_bin=${PYTHON_ROOT}/bin/python3
if [ -x "$(command -v ${pika_python_bin})" ]; then
echo -e Using ${pika_python_bin} >> $DEBUG_PATH 2>&1
else
# sleep until we have a python (at most 5 seconds)
for i in 1 2 3 4 5 ; do
sleep 1
if [ -x "$(command -v python3)" ]; then
echo -e "python3 is now available!" >> $DEBUG_PATH 2>&1
if [ -x "$(command -v ${pika_python_bin})" ]; then
echo -e "PIKA python3 is now available (${pika_python_bin})" >> $DEBUG_PATH 2>&1
break
fi
done
......@@ -102,10 +103,11 @@ fi
##### (7) get additional job metadata from redis
PIKA_MONITORING=1
if [ -x "$(command -v python3)" ]; then
if [ -x "$(command -v ${pika_python_bin})" ]; then
which python3 >> $DEBUG_PATH 2>&1
source ${PIKA_ROOT}/job_control/slurm/taurus/pika_get_metadata_prolog_include.sh >> $DEBUG_PATH 2>&1
else
echo -e "Error: python3 is NOT available!" >> $DEBUG_PATH 2>&1
echo -e "Error: PIKA python3 is NOT available!" >> $DEBUG_PATH 2>&1
fi
##### (8) based on the PIKA_MONITORING value, start or stop collectd
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment