source: configs/testing/bash/X64_CURIE.sh @ 510

Last change on this file since 510 was 510, checked in by dubos, 8 years ago

updates to testing

  • Property svn:executable set to *
File size: 2.5 KB
Line 
1#!/bin/bash
2
3# This script provides site-specific functions
4# called by the site-independent scripts
5# create_runs.sh and submit.sh
6
7# NB : we must the queue 'normal' because there seems to be a limit
8# on the number of jobs that can be submitted to queue 'test'
9
10#----------------------------- split_XXX ----------------------------
11
12function split_serial_40() {
13    setvar nbp 41 nsplit_i 2 nsplit_j 2
14}
15function split_mpi_40() {
16    setvar nbp 41 nsplit_i 2 nsplit_j 2
17}
18function split_mpi_80() {
19    setvar nbp 81 nsplit_i 4 nsplit_j 2
20}
21
22#----------------- job submission ------------------
23
24function submit_job_X64_CURIE() # $1=script $* = SLURM OPTIONS
25{
26    TMP=$(mktemp)
27    ccc_msub $1 > $TMP
28    cat $TMP 1>&2
29    cat $TMP | awk '{print $NF }'
30    rm -f $TMP
31}
32
33#------------------------------ job_XXX -----------------------------
34
35function job_serial() { # EXP_NAME
36    job_X64_CURIE $1 1 "" 
37}
38function job_serial_40() { # EXP_NAME
39    job_serial $1
40}
41
42function job_mpi() { #EXP_NAME NB_MPI
43    job_X64_CURIE $1 $2 ccc_mprun
44}
45function job_mpi_40() { # EXP_NAME
46    job_mpi $1 40
47}
48function job_mpi_80() { # EXP_NAME
49    job_mpi $1 80
50}
51
52function job_X64_CURIE() { # EXP_NAME MPI_TASKS MPIRUN
53    cat <<EOF
54#!/bin/bash
55## Request name
56#MSUB -r $1
57#MSUB -q standard
58#MSUB -A gen7548
59#MSUB -x
60## Number of tasks (=MPI processes) to use
61#MSUB -n $2
62## Elapsed time limit in seconds
63#MSUB -T 600
64## Quality of Service required (long [3 days], normal [1 day], test [30 min])
65#MSUB -Q normal
66
67export OMP_NUM_THREADS=1
68cd \${BRIDGE_MSUB_PWD}
69
70$(cat $ROOT/DYNAMICO/arch/arch-X64_CURIE.env)
71
72rm -rf gcm.log logs *.nc netcdf
73date > gcm.log
74ulimit -s unlimited
75$3 ./gcm.exe >> gcm.log
76date >> gcm.log
77
78mkdir -p netcdf
79cp gcm.log *.def netcdf
80mv *.nc netcdf
81
82mkdir -p logs
83cp *.xml logs
84mv xios_client_*.err xios_client_*.out gcm.log logs
85
86EOF
87}
88
89#------------------------------ post-processing job -----------------------------
90
91function job_post_X64_CURIE() # LIST
92{
93    DEPLIST=afterany
94    for ID in $* ; do
95        DEPLIST="$DEPLIST:$ID"
96    done
97    cat <<EOF
98#!/bin/bash
99## Request name
100#MSUB -r testing
101#MSUB -q standard
102#MSUB -A gen7548
103#MSUB -E "--dependency=$DEPLIST"
104## Number of tasks (=MPI processes) to use
105#MSUB -n 1
106## Elapsed time limit in seconds
107#MSUB -T 600
108## Quality of Service required (long [3 days], normal [1 day], test [30 min])
109#MSUB -Q normal
110
111export OMP_NUM_THREADS=1
112# this script is submitted from $ROOT/logs
113cd \${BRIDGE_MSUB_PWD}/..
114
115$(cat $ROOT/DYNAMICO/arch/arch-X64_CURIE.env)
116module load python
117
118bash/post.sh
119EOF
120}
Note: See TracBrowser for help on using the repository browser.