我正在尝试在集群中运行 matlab 脚本(ga_opt_main.m)。我必须编写一个作业提交文件,它本质上只是一个 shell 脚本。但我从来没有写过shell脚本,这就是我写的
  #!/bin/bash
  #PBS -q *queuename*
  #PBS -l nodes=1:ppn=20
  #PBS -l walltime=02:00:00
  #PBS -N ga_opt_main
  module load matlab/R2011b
  module list
  unset DISPLAY
  matlab -nodisplay -nodesktop -r *directory path/ga_opt_main.m*
MATLAB 在后台打开,但我的工作没有运行。相反,我收到一个错误文件说
  bash: -c: line 0: syntax error in conditional expression
  bash: -c: line 0: syntax error near `fraction'
关于为什么会发生这种情况以及如何避免这种情况的任何想法?谢谢!