在使用學校HPC集群時,發現win10寫的batch任務報錯,用dos2unix可解決。
bugs與解決
這個問題是由於unix和dos的空行格式有區別,用代碼轉換一下就可以了。
報錯如下:
sbatch: error: Batch script contains DOS line breaks (\r\n)
sbatch: error: instead of expected UNIX line breaks (\n).
輸入dos2unix即可:
dos2unix yourfilename