https://www2.mrc-lmb.cam.ac.uk/relion/index.php?title=TORQUE_template_script_example
紹介されているqsub.shは下記になります。

#!/bin/bash
### Inherit all current environment variables
#PBS -V
### Job name
#PBS -N XXXnameXXX
### Keep Output and Error
#PBS -k eo
### Queue name
#PBS -q XXXqueueXXX
### Specify the number of nodes and thread (ppn) for your job.
#PBS -l nodes=XXXmpinodesXXX:ppn=XXXthreadsXXX
### Tell PBS the anticipated run-time for your job, where walltime=HH:MM:SS
###PBS -l walltime=XXXextra1XXX:00:00
#################################
### Switch to the working directory;
cd $PBS_O_WORKDIR
### Run:
mpirun --bynode -np XXXmpinodesXXX XXXcommandXXX
echo "done"

Relion/qsubで示したコード修正を加えないのなら、このqsub.shで構いません。

ただ、進捗状況の確認とgpu計算時の+npを自動的に行うのなら下記にしたほうがいいのかも。

#!/bin/bash
### Inherit all current environment variables
#PBS -V
### Job name
#PBS -N XXXnameXXX
### Keep Output and Error
#PBS -k eo
### Queue name
#PBS -q XXXqueueXXX
### Specify the number of nodes and thread (ppn) for your job.
#PBS -l nodes=XXXmpinodesXXX:ppn=XXXthreadsXXX
### Tell PBS the anticipated run-time for your job, where walltime=HH:MM:SS
###PBS -l walltime=XXXextra1XXX:00:00
#################################
### Switch to the working directory;
cd $PBS_O_WORKDIR
### Run:
cmd_=$(/bin/cat <<_EOF_
XXXcommandXXX
_EOF_
)
cmd=$(echo "$cmd_" | sed -z 's/\n/\&\&/g')
run=$(echo $cmd|awk '{print $1}')
np=XXXmpiprocXXX
localnodefile=1
if [ ${run##*/} =  "relion_refine_mpi" ]; then
   if [[ $cmd = *--gpu* ]]; then
      np=$(expr $np + 1)
      nodeCount=$(wc -l $PBS_NODEFILE|awk '{print $1}')
      if [ $np -gt $nodeCount ]; then
         /bin/cp $PBS_NODEFILE .
         /usr/bin/tail -1 $PBS_NODEFILE >> $(basename $PBS_NODEFILE)
         localnodefile=2
      fi
   fi
fi
if [ $localnodefile -eq 1 ]; then
   command="{ { mpirun $opt -machinefile $PBS_NODEFILE -np $np ${cmd:0:-2} | tee -a XXXoutfileXXX ; } 3>&2 2>&1 1>&3 | tee -a XXXerrfileXXX ; } 3>&2 2>&1 1>&3"
else
   command="{ { mpirun $opt -machinefile $(basename $PBS_NODEFILE) -np $np ${cmd:0:-2} | tee -a XXXoutfileXXX ; } 3>&2 2>&1 1>&3 | tee -a XXXerrfileXXX ; } 3>&2 2>&1 1>&3"
fi
 
 
eval $command
 
if [ -f $(basename $PBS_NODEFILE) ]; then
  /bin/rm -f $(basename $PBS_NODEFILE)
fi
 
echo "done"

トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2018-12-17 (月) 00:35:56 (183d)