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
RevLine 
[2431]1#!/bin/bash
2#
3# Cron to keep track of core usage for GENCMIP6 project.
[2432]4# To be executed every hour
[2431]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# ====================
[2461]20ROOT_DIR=$( dirname $0 )
21cd ${ROOT_DIR}
[2431]22
[2849]23# Main script to get data for gencmip6
24# ====================================
[2432]25script="run_pen_v2"
[2431]26printf "${script}\n"
27echo "--------------------"
[2432]28bin/${script}.sh
[2431]29rc=$?
30if [ ${rc} -ne 0 ] ; then
31  echo "${script} terminated abnormally"
32  exit
33else
34  echo "${script} OK"
35fi
36
[2849]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
[2432]51# Plot running and pending jobs
52# =============================
[2431]53# -d : copy plot on dods
[2849]54# -m : mode, 'project' (=default) or 'machine'
[2432]55script="plot_jobs"
[2431]56printf "\n${script}\n"
57echo "--------------------"
[2460]58bin/${script}.py -v
[2431]59rc=$?
60if [ ${rc} -ne 0 ] ; then
61  echo "${script} terminated abnormally"
62else
63  echo "${script} OK"
64fi
65
[2849]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
[2845]75
[2849]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
[2845]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
[2431]95printf "\nEnd of script OK\n"
[2524]96
Note: See TracBrowser for help on using the repository browser.