sbatch作用詳解:掌握Slurm調度內存檢查與GPU資源驗證技巧
!/bin/bash
SBATCH --job-name=data_clean
SBATCH --output=clean.log
python data_preprocessing.py
!/bin/bash
AVAIL_MEM=$(sinfo -p ${PARTITION} -h -o "%m") if [ $REQUEST_MEM -gt $AVAIL_MEM ]; then
echo "錯誤:請求內存超過分區(qū)最大值 ${AVAIL_MEM}MB"
fi
scontrol show node ${NODE} | grep Gres=gpu