1 |
heimbach |
1.1 |
#!/bin/csh |
2 |
|
|
# Example PBS script to run a job on the myrinet-3 cluster. |
3 |
|
|
# The lines beginning #PBS set various queuing parameters. |
4 |
|
|
# |
5 |
|
|
# o -N Job Name |
6 |
|
|
#PBS -N global2x2 |
7 |
|
|
# |
8 |
|
|
# o -l resource lists that control where job goes |
9 |
|
|
# here we ask for 3 nodes, each with the attribute "p4". |
10 |
|
|
#PBS -l nodes=6:p4 |
11 |
|
|
# |
12 |
|
|
# o Where to write output |
13 |
|
|
#PBS -e stderr |
14 |
|
|
#PBS -o stdout |
15 |
|
|
# |
16 |
|
|
# o Export all my environment variables to the job |
17 |
|
|
#PBS -V |
18 |
|
|
# |
19 |
|
|
# |
20 |
|
|
echo $PBS_NODEFILE |
21 |
|
|
cat $PBS_NODEFILE |
22 |
|
|
# |
23 |
|
|
cd /s07/heimbach/ecco-branch/exe |
24 |
|
|
rm -f proc_list *.00?.00?.* |
25 |
|
|
cp ~heimbach/ecco/ecco-branch/exe/mitgcmuv . |
26 |
|
|
# |
27 |
|
|
cat $PBS_NODEFILE >! proc_list |
28 |
|
|
set ncpus = ( `wc -l proc_list | awk '{print $1}'` ) |
29 |
|
|
echo 'ncpus = ' $ncpus |
30 |
|
|
set listvar = `cat proc_list` |
31 |
|
|
# |
32 |
|
|
foreach lv ($listvar) |
33 |
|
|
echo 'creating /s/local/1/ecco-exe on ' $lv |
34 |
|
|
rsh -n $lv rm -rf /s/local/1/ecco-exe |
35 |
|
|
rsh -n $lv mkdir /s/local/1/ecco-exe |
36 |
|
|
end |
37 |
|
|
# |
38 |
|
|
/usr/local/pkg/mpi/mpi-1.2.4..8a-gm-1.5/g77/bin/mpirun.ch_gm -machinefile proc_list --gm-kill 7 -v -np $ncpus ./mitgcmuv |
39 |
|
|
# |
40 |
|
|
set out=$? |
41 |
|
|
echo 'end with status' $out |
42 |
|
|
|