source: BOL/Multi_atlas/install_multi_atlas.sh @ 3737

Last change on this file since 3737 was 3737, checked in by idelkadi, 4 years ago

Repository under svn of a first version of Multiatlas diagnostics for LMDZ. This version is adapted to be able to run a LMDZ multiatlas on an individual account on the ciclad machine of the IPSL. In this version, the parts to be modified are identified so as to subsequently adapt it to other machines.
Modifications following changes and simplification of access from CICLAD / ClimServ?? to the different "thredds"

  • Property svn:executable set to *
File size: 4.3 KB
Line 
1#!/bin/bash
2
3#################################################################################
4# A.I  : 1e version : Decembre 2019
5# Reprise Mars 2020
6# installer les scripts de post-traitement multi-atlas pour LMDZ sur une machine
7# le packege sera integrer sous svn aux sources du modele ..../BOL/
8# Ce script permet de definir les differents repertoires en fonction de la machine
9# Permet de creer les sscripts job_multi.sh et atlas.sh
10#################################################################################
11# Definition des coleurs d'affichage
12noir='\e[0;30m' gris='\e[1;30m' rougefonce='\e[0;31m' rose='\e[1;31m' vertfonce='\e[0;32m' vertclair='\e[1;32m' orange='\e[0;33m' jaune='\e[1;33m' bleufonce='\e[0;34m' bleuclair='\e[1;34m' violetfonce='\e[0;35m' violetclair='\e[1;35m' cyanfonce='\e[0;36m' cyanclair='\e[1;36m' grisclair='\e[0;37m' blanc='\e[1;37m' neutre='\e[0;m'
13##
14##
15# AI avril 2020 : A FAIRE :
16# Utiliser des fonctions entete, ...
17# A function pour definir l entete du job en fonction de la machine
18#function jobentete { #1er argument doit etre le nom de la machine
19
20#set -x
21# Nom machine et compte
22hostname=`hostname`
23login=`whoami`
24
25# Definitions en fonction de la machine
26# CICLAD
27if [ ${hostname:0:5} = cicla ] ; then
28# chemin vers le rep dods de base
29DODSDIR=/modfs/ipslfs/dods
30# Rep ou sont stockes les multiatlas
31MULTIDIR=$DODSDIR/$login/lmdz/MultiSimu
32if [ ! -d $MULTIDIR ] ; then mkdir -p $MULTIDIR ; fi
33
34# Def entete des job
35cat <<eod >> entete.sh
36#PBS -N atlas
37#PBS -m a
38#PBS -j oe
39#PBS -q h12
40#PBS -o atlasNOMSIMULATION.out
41#PBS -S /bin/bash
42#PBS -l nodes=1:ppn=1
43#PBS -l mem=30gb
44#PBS -l vmem=30gb
45#
46# Commande pour soumettre en bash
47submit=qsub
48
49login=$login
50DODSDIR=$DODSDIR
51eod
52fi
53
54# CLIMSERV
55if [ ${hostname:0:5} = camel ] ; then
56DODSDIR=/modfs/ipslfs/dods
57cat <<eod > entete.sh
58#PBS -N atlas
59#PBS -m a
60#PBS -j oe
61#PBS -q h12
62#PBS -o atlasNOMSIMULATION.out
63#PBS -S /bin/bash
64#PBS -l nodes=1:ppn=1
65#PBS -l mem=30gb
66#PBS -l vmem=30gb
67#
68# Commande pour soumettre en bash
69submit=qsub
70eod
71fi
72
73# IRENE
74if [ ${hostname:0:5} = irene ] ; then
75cat <<eod > definerep.sh
76MAIN_SE=
77TS_DA=
78TS_MO=
79MULTIDIR=
80groupe=
81eod
82cat <<eod > entete.sh
83######################
84## IRENE   TGCC/CEA ##
85######################
86#MSUB -r multiatlas            # Job name
87#MSUB -o multi.out_%I
88#MSUB -e multi.out_%I
89#MSUB -n 1
90#MSUB -T 36000         # Maximum elapsed time
91#MSUB -q xlarge
92#MSUB -c 8
93#MSUB -Q normal
94#MSUB -A $groupe
95#MSUB -m store,work,scratch
96#
97# Commande pour soumettre en bash
98submit=ccc_msub
99eod
100fi
101
102# JEAN-
103if [ ${hostname:0:5} = jean- ] ; then
104cat <<eod > definerep.sh
105MAIN_SE=
106TS_DA=
107TS_MO=
108MULTIDIR=
109groupe=
110eod
111cat <<eod > entete.sh
112######################
113## IRENE   TGCC/CEA ##
114######################
115#MSUB -r multiatlas            # Job name
116#MSUB -o multi.out_%I
117#MSUB -e multi.out_%I
118#MSUB -n 1
119#MSUB -T 36000         # Maximum elapsed time
120#MSUB -q xlarge
121#MSUB -c 8
122#MSUB -Q normal
123#MSUB -A $groupe
124#MSUB -m store,work,scratch
125#
126# Commande pour soumettre en bash
127submit=sbash
128eod
129fi
130
131# PC (formation et perso linux)
132
133# Machines locales lmd
134
135local=`pwd -P`
136
137echo -e "${noir}%%%%%%%%%%%%%%%%%%%%%%% ${rougefonce} LMDZ MULTIATLAS ${noir}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
138echo
139echo -e "${vertfonce}"To create your multi-atlas you needs :
140echo 1.  to create your multiatlas directory "example Multi01" :
141echo     mkdir -p /modfs/ipslfs/dods/$login/lmdz/MultiSimu/Multi01
142echo 
143echo 2.  to define some characeristics of your multi-atlas "names, dates, description of simulations and atlas variables" :
144echo     cp Utils/def.txt  Utils/atlas-def /modfs/ipslfs/dods/$login/lmdz/MultiSimu/Multi01/.
145echo     define "names, date, description" of simulations in file :
146echo     /modfs/ipslfs/dods/$login/lmdz/MultiSimu/Multi01/def.txt
147echo     define atlas variables in file :
148echo     /modfs/ipslfs/dods/$login/lmdz/MultiSimu/Multi01/atlas-def
149echo
150echo 3.   Add the link to the simulation outputs in your file : $local/runs.txt
151echo 
152rm -f job_multi.sh
153cat entete.sh >| job_multi.sh
154cat Utils/multi.sh >> job_multi.sh
155chmod +x job_multi.sh
156
157rm -f atlas.sh
158cat entete.sh >| atlas.sh
159cat Utils/atlas0.sh >> atlas.sh
160chmod +x atlas.sh
161\mv atlas.sh atlas/.
162
163echo 4. Then you can run your multiatlas :
164echo ./job_multi.sh Multi01
165echo -e "${noir}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
Note: See TracBrowser for help on using the repository browser.