I'm trying to run a matlab script (ga_opt_main.m) in a cluster. I have to write a job submission file, which is essentially just a shell script. But I have never written a shell script and this is what I wrote
#!/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 opens in the background but my job is not run. Instead I get an error file saying
bash: -c: line 0: syntax error in conditional expression
bash: -c: line 0: syntax error near `fraction'
Any ideas on why this occurs and how it can be avoided? Thanks!