source: TOOLS/ConsoGENCMIP6/launch_conso.sh @ 2441

Last change on this file since 2441 was 2437, checked in by labetoulle, 7 years ago

Add plot_bilan_jobs.py and do some cleaning

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