Matlab

x.pbs,

#!/bin/sh

#PBS -l nodes=1:ppn=1
#PBS -N test
#PBS -q q_zhq_bnulongr

cd $PBS_O_WORKDIR

NPROCS=$PBS_NP

source /home/export/parastor/clussoft/profile.d/intelmpi.sh
time matlab <test.m>log

job.sh,

#!/bin/sh
#$ -S /bin/sh
#$ -N test
#$ -j y
#$ -o ./
#$ -e ./
#$ -cwd
#$ -pe mpi 4
#$ -q vasp2013.q

source ~/.bashrc

time matlab -nojvm -nodisplay -nosplash <test.m>log

test.m,

unifrnd(1,10,1000,1000)

matlab可以自动多线程计算。