source: TOOLS/ConsoGENCMIP6/launch_jobs.sh @ 3734

Last change on this file since 3734 was 2849, checked in by labetoulle, 8 years ago

[gencmip6] running/pending jobs:

  • Gather data for whole Curie in addition to that from gencmip6 project
  • Plot hourly data and daily mean
  • Property svn:executable set to *
File size: 2.0 KB
Line 
1#!/bin/bash
2#
3# Cron to keep track of core usage for GENCMIP6 project.
4# To be executed every hour
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# ====================
20ROOT_DIR=$( dirname $0 )
21cd ${ROOT_DIR}
22
23# Main script to get data for gencmip6
24# ====================================
25script="run_pen_v2"
26printf "${script}\n"
27echo "--------------------"
28bin/${script}.sh
29rc=$?
30if [ ${rc} -ne 0 ] ; then
31  echo "${script} terminated abnormally"
32  exit
33else
34  echo "${script} OK"
35fi
36
37# Main script to get data for whole Curie
38# =======================================
39script="run_pen_full"
40printf "${script}\n"
41echo "--------------------"
42bin/${script}.sh
43rc=$?
44if [ ${rc} -ne 0 ] ; then
45  echo "${script} terminated abnormally"
46  exit
47else
48  echo "${script} OK"
49fi
50
51# Plot running and pending jobs
52# =============================
53# -d : copy plot on dods
54# -m : mode, 'project' (=default) or 'machine'
55script="plot_jobs"
56printf "\n${script}\n"
57echo "--------------------"
58bin/${script}.py -v
59rc=$?
60if [ ${rc} -ne 0 ] ; then
61  echo "${script} terminated abnormally"
62else
63  echo "${script} OK"
64fi
65
66printf "\n${script}\n"
67echo "--------------------"
68bin/${script}.py -vm machine
69rc=$?
70if [ ${rc} -ne 0 ] ; then
71  echo "${script} terminated abnormally"
72else
73  echo "${script} OK"
74fi
75
76script="plot_jobs_hourly"
77printf "\n${script}\n"
78echo "--------------------"
79bin/${script}.py -vd
80rc=$?
81if [ ${rc} -ne 0 ] ; then
82  echo "${script} terminated abnormally"
83else
84  echo "${script} OK"
85fi
86
87
88# Copy web files to ciclad
89# ========================
90echo "=> Copy web files to ciclad"
91echo "==========================="
92rsync -var ${ROOT_DIR}/web/* igcmg@ciclad.ipsl.jussieu.fr:dods/ConsoGENCMIP6
93
94
95printf "\nEnd of script OK\n"
96
Note: See TracBrowser for help on using the repository browser.