问题:
一般VASP计算时采用MPI多进程并行计算,而LOBSTER只能进行多线程并行计算,如何提交?
解决方法:
export OMP_NUM_THREADS=8
lobster-3.2.0 > lobster.log &
注意:
这里的GPU服务器有两个CPU,每个CPU有4个核,以上提交方法是在没有任务排队的情况下运行。
当有别人已有计算任务在算时,占用了CPU0,这时自己再提交任务则提交到CPU1,可以设置线程数为4,进行加速。
当正在计算的任务是自己的时候,占用了CPU0,再计算时线程数最多只能是CPU0上剩余的核数。
附件:
提交LOBSTER时的pbs脚本。
#!/bin/bash
#PBS -N jobname
#PBS -q batch
#PBS -l walltime=100:00:00
#PBS -l nodes=1:pq:ppn=8
#PBS -r n
#PBS -j oe
#PBS -o /home/shsun/feedback
#PBS -m bea
export NPROCS=`wc -l < $PBS_NODEFILE`
echo ------------------------------------------------------
echo 'This job is allocated on '${NPROCS}' cpu(s)'
echo 'Job is running on node(s): '
cat $PBS_NODEFILE
echo ------------------------------------------------------
echo PBS: qsub is running on $PBS_O_HOST
echo PBS: originating queue is $PBS_O_QUEUE
echo PBS: executing queue is $PBS_QUEUE
echo PBS: working directory is $PBS_O_WORKDIR
echo PBS: execution mode is $PBS_ENVIRONMENT
echo PBS: this script pid is $$
echo PBS: job identifier is $PBS_JOBID
echo PBS: job name is $PBS_JOBNAME
echo PBS: node file is $PBS_NODEFILE
echo PBS: current home directory is $PBS_O_HOME
echo PBS: PATH = $PBS_O_PATH
echo ------------------------------------------------------
cd $PBS_O_WORKDIR
export OMP_NUM_THREADS=8
date
lobster-3.2.0 > lobster.log
#MPIRUN=/home/pub/MPI/openmpi/1.6.4/bin/mpirun
#VVASP=vasp-gpu-vtst5.4.x
#VASP=/home/pub/bin/$VVASP
#$MPIRUN -np 3 $VASP > vasp.log
#tar czvf chg.tgz CHG
#rm CHGCAR WAVECAR
#rm CHG* WAVE*
date