source: lmdz_wrf/trunk/tools/run_script.pbs @ 2318

Last change on this file since 2318 was 968, checked in by lfita, 8 years ago

Changing queue name

File size: 947 bytes
Line 
1#!/bin/sh
2
3## Job Name
4#PBS -N r_script
5
6## Script to run a script in camelot, IPSL
7#PBS -m ae
8#PBS -M lluis.fita@lmd.jussieu.fr
9
10## Joins standard and Error outputs in a single file
11#PBS -j oe
12
13## Queue
14#PBS -q day
15
16### Max run time
17#PBS -l walltime=24:00:00
18
19### Max memory
20#PBS -l vmem=20gb
21#PBS -l mem=20gb
22
23## resources
24#PBS -l nodes=1:ppn=1
25
26cd $PBS_O_WORKDIR
27
28Lscriptname=`expr length ${scriptname}0`
29if test ${Lscriptname} -le 1; then
30  echo "ERROR -- error -- ERROR -- error"
31  echo "  No script name provided!!"
32  exit
33fi
34
35echo "running '"${scriptname}"' ..."
36
37dateval=`date "+%Y%m%d%H%M%S"`
38
39rm -f ${PBS_JOBNAME}.o*
40rm -f run_${scriptname}_*.log
41
42date > run_${scriptname}_${dateval}.log
43bash ${scriptname} >& r_script0_${dateval}.log
44cat r_script0_${dateval}.log >> run_${scriptname}_${dateval}.log
45rm -f r_script0_${dateval}.log
46date >> run_${scriptname}_${dateval}.log
47
48## e.g. # qsub -v scriptname='WRF_graphics.bash' run_script.pbs
Note: See TracBrowser for help on using the repository browser.