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

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

configs/testing : towards first working version

  • Property svn:executable set to *
File size: 3.0 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
70module purge
71module load licsrv/intel
72module load c/intel/14.0.3.174
73module load c++/intel/14.0.3.174
74module load fortran/intel/14.0.3.174
75module load mkl/14.0.3.174
76module load idb/14.0.3.174
77module load intel/14.0.3.174
78module load mpi/bullxmpi/1.2.8.4
79module load netcdf/4.3.3.1_hdf5_parallel
80
81rm -rf gcm.log logs *.nc netcdf
82date > gcm.log
83ulimit -s unlimited
84$3 ./gcm.exe >> gcm.log
85date >> gcm.log
86
87mkdir -p netcdf
88cp gcm.log *.def netcdf
89mv *.nc netcdf
90
91mkdir -p logs
92cp *.xml logs
93mv xios_client_*.err xios_client_*.out gcm.log logs
94
95EOF
96}
97
98#------------------------------ post-processing job -----------------------------
99
100function job_post_X64_CURIE() # LIST
101{
102    DEPLIST=afterany
103    for ID in $* ; do
104        DEPLIST="$DEPLIST:$ID"
105    done
106    cat <<EOF
107#!/bin/bash
108## Request name
109#MSUB -r testing
110#MSUB -q standard
111#MSUB -A gen7548
112#MSUB -E "--dependency=$DEPLIST"
113## Number of tasks (=MPI processes) to use
114#MSUB -n 1
115## Elapsed time limit in seconds
116#MSUB -T 600
117## Quality of Service required (long [3 days], normal [1 day], test [30 min])
118#MSUB -Q normal
119
120export OMP_NUM_THREADS=1
121# this script is submitted from $ROOT/logs
122cd \${BRIDGE_MSUB_PWD}/..
123
124module purge
125module load licsrv/intel
126module load c/intel/14.0.3.174
127module load c++/intel/14.0.3.174
128module load fortran/intel/14.0.3.174
129module load mkl/14.0.3.174
130module load idb/14.0.3.174
131module load intel/14.0.3.174
132module load mpi/bullxmpi/1.2.8.4
133module load netcdf/4.3.3.1_hdf5_parallel
134module load python
135
136bash/post.sh
137EOF
138}
Note: See TracBrowser for help on using the repository browser.