|
我也分享个ORCA-4.0运行的PBS脚本,亲测可用,需要按照自己的安装情况进行修改:
#!/bin/bash
#PBS -S /bin/bash
#PBS -j oe
#PBS -l nodes=1:ppn=8
#PBS -l walltime=2400:00:00
#PBS -V
#PBS -q batch
# User defined variables
# Add any files here which are needed by ORCA.
# At a minimum, you need the .inp file, which must be first.
files=( "test.inp" )
cwd=$PBS_O_WORKDIR
export RSH_COMMAND="ssh"
source /etc/profile.d/modules.sh
# Load Orca and included openmpi modules
export PATH=/opt/orca_4_0_0_linux_x86-64:$PATH
export PATH=/opt/openmpi202/bin:$PATH
export LD_LIBRARY_PATH=/opt/openmpi202/lib:$LD_LIBRARY_PATH
export MANPATH=/opt/openmpi202/share/man:$MANPATH
# Get the full path to orca (helps with mpi problems)
export ORCA_EXEC=/opt/orca_4_0_0_linux_x86-64/orca
# Internal variables for creating scratch dir
input=${files[0]}
NodeList=( $(cat "$PBS_NODEFILE" | sort | uniq -c) )
ExecHost=$(hostname -s)
JobID=$(echo -n "$PBS_JOBID"|cut -d'.' -f1)
SCRDIR="/tmp/orcajob/$input"
# Create scratch dir
for (( i=0 ; i < ${#NodeList[@]} ; i++ ))
do
((i++))
if [[ ${NodeList[$i]} == "$ExecHost" ]] ; then
mkdir -p "$SCRDIR"
else
ssh -x -n "${NodeList[$i]}" "mkdir -p $SCRDIR"
fi
done
echo Starting job: "$(date)"
echo Job number: "$(echo "$JobID")"
# Create .nodes file and copy to SCRDIR
cp "$PBS_NODEFILE" "$cwd/${input:0:${#input}-4}.nodes"
cp "$cwd/${input:0:${#input}-4}.nodes" "$SCRDIR"
for file in "${files[@]}"
do
cp "$cwd/$file" "$SCRDIR/"
done
# cd to scratch dir and start orca
cd "$SCRDIR"
$ORCA_EXEC "$input" > "$cwd/${input:0:${#input}-4}.out"
# orca finished, copy output to user dir
cp "$SCRDIR"/*.* "$cwd"
# remove scratch dir
for (( i=0 ; i < ${#NodeList[@]} ; i++ ))
do
((i++))
if [[ ${NodeList[$i]} == "$ExecHost" ]] ; then
rm -rf "$SCRDIR"
else
ssh -x -n "${NodeList[$i]}" "rm -rf $SCRDIR"
fi
done
# All done
echo Finish: "$(date)"
|
评分 Rate
-
查看全部评分 View all ratings
|