From 02f9a1c0104592a3764e84e74dca64618ea6cb82 Mon Sep 17 00:00:00 2001 From: linqingke Date: Wed, 28 Oct 2020 15:24:33 +0800 Subject: [PATCH] fix mass gpu run script bug. --- model_zoo/official/nlp/mass/scripts/run_gpu.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/model_zoo/official/nlp/mass/scripts/run_gpu.sh b/model_zoo/official/nlp/mass/scripts/run_gpu.sh index 053b2d9b65..0b459989e4 100644 --- a/model_zoo/official/nlp/mass/scripts/run_gpu.sh +++ b/model_zoo/official/nlp/mass/scripts/run_gpu.sh @@ -145,11 +145,12 @@ echo $task if [ "$task" == "train" ] then if [ $RANK_SIZE -gt 1 ] - then - mpirun -n $RANK_SIZE --allow-run-as-root --output-filename log_output --merge-stderr-to-stdout \ - python train.py --config ${configurations##*/} --platform GPU >>log.log 2>&1 & - fi - python train.py --config ${configurations##*/} --platform GPU >>log.log 2>&1 & + then + mpirun -n $RANK_SIZE --allow-run-as-root --output-filename log_output --merge-stderr-to-stdout \ + python train.py --config ${configurations##*/} --platform GPU >>log.log 2>&1 & + else + python train.py --config ${configurations##*/} --platform GPU >>log.log 2>&1 & + fi elif [ "$task" == "infer" ] then python eval.py --config ${configurations##*/} --output ${output} --vocab ${vocab##*/} --metric ${metric} --platform GPU >>log_infer.log 2>&1 &