diff --git a/bin/slurm_calibrate.sh b/bin/slurm_calibrate.sh index 2d8dfccbf3a596ab23c8fa329b14c05bd224f88f..14e6d96d6cb1a2ce719fac2cf8c4521d6c909c6e 100755 --- a/bin/slurm_calibrate.sh +++ b/bin/slurm_calibrate.sh @@ -43,10 +43,26 @@ then sleep 15 fi +# Launch CalParrot to repeat calibration constant queries +if [ "$caltype" == "CORRECT" ] +then + port_file=$(mktemp) + ${python_path} -m calparrot --port-file $port_file + calparrot_port=$(cat $port_file) + rm $port_file + export CAL_CAL_TOOLS_CALCAT__base-api-url="http://127.0.0.1:${calparrot_port}" + export CAL_CAL_TOOLS_CALCAT__use-oauth2=false +fi echo "Running notebook" ${python_path} -m princess ${nb_path} --save +# Stop CalParrot +if [ "$caltype" == "CORRECT" ] +then + ${python_path} -m calparrot.stop $calparrot_port +fi + # stop the cluster if requested if [ "${ipcluster_profile}" != "NO_CLUSTER" ] then