diff --git a/downloads-generation/models_class1_pan/GENERATE.sh b/downloads-generation/models_class1_pan/GENERATE.sh index e8164043f79367382a0b62f4928e927fab072b31..f0699f52ab3364f2ecca8ac973d5bb5a88f8ca66 100755 --- a/downloads-generation/models_class1_pan/GENERATE.sh +++ b/downloads-generation/models_class1_pan/GENERATE.sh @@ -32,9 +32,10 @@ echo "Detected GPUS: $GPUS" PROCESSORS=$(getconf _NPROCESSORS_ONLN) echo "Detected processors: $PROCESSORS" -NUM_JOBS=$GPUS -if [ "$NUM_JOBS" -eq "0" ]; then - NUM_JOBS=1 +if [ "$GPUS" -eq "0" ]; then + NUM_JOBS=${NUM_JOBS-1} +else + NUM_JOBS=${NUM_JOBS-$GPUS} fi echo "Num jobs: $NUM_JOBS"