source: TOOLS/ConsoGENCMIP6/launch_jobs.sh @ 2431

Last change on this file since 2431 was 2431, checked in by labetoulle, 9 years ago

Add script to plot running and pending jobs

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/bash
2#
3# Cron to keep track of core usage for GENCMIP6 project.
4# To be executed every day at 6am
5# ======================================================================
6
7# Initialize module command
8# =========================
9if [ -f /etc/bashrc ] ; then
10  . /etc/bashrc
11fi
12# Load python
13# ===========
14# python/2.7.3 is the default, but it comes with matplotlib 1.2,
15# which is too old (no context manager for PdfPages)
16module load python/2.7.8
17
18# Go to root directory
19# ====================
20cd /ccc/cont003/home/dsm/p86ipsl/ConsoGENCMIP6/
21
22# Main script to get data
23# =======================
24script="conso_gencmip6"
25printf "${script}\n"
26echo "--------------------"
27bin/${script}.py
28rc=$?
29if [ ${rc} -ne 0 ] ; then
30  echo "${script} terminated abnormally"
31  exit
32else
33  echo "${script} OK"
34fi
35
36# Plot daily consumption
37# ======================
38# -f : plot the whole period of the project
39# -d : copy plot on dods
40script="plot_bilan"
41printf "\n${script}\n"
42echo "--------------------"
43bin/${script}.py -fd
44rc=$?
45if [ ${rc} -ne 0 ] ; then
46  echo "${script} terminated abnormally"
47else
48  echo "${script} OK"
49fi
50
51script="plot_login"
52printf "\n${script}\n"
53echo "--------------------"
54bin/${script}.py -d
55rc=$?
56if [ ${rc} -ne 0 ] ; then
57  echo "${script} terminated abnormally"
58else
59  echo "${script} OK"
60fi
61
62script="plot_store"
63printf "\n${script}\n"
64echo "--------------------"
65bin/${script}.py -d
66rc=$?
67if [ ${rc} -ne 0 ] ; then
68  echo "${script} terminated abnormally"
69else
70  echo "${script} OK"
71fi
72
73printf "\nEnd of script OK\n"
Note: See TracBrowser for help on using the repository browser.