source: trunk/libIGCM/AA_job_debug @ 1569

Last change on this file since 1569 was 1569, checked in by aclsce, 17 months ago

Added fonctionality to create RUN_DIR and Job_debug to be launched directly in the RUN_DIR directory.

File size: 9.1 KB
Line 
1#-Q- curie #!/bin/ksh
2#-Q- curie ######################
3#-Q- curie ## CURIE   TGCC/CEA ##
4#-Q- curie ######################
5#-Q- curie #MSUB -r ::Jobname::        # Job Name
6#-Q- curie #MSUB -o Script_Output_::Jobname::.000001    # standard output
7#-Q- curie #MSUB -e Script_Output_::Jobname::.000001    # error output
8#-Q- curie #MSUB -eo
9#-Q- curie #MSUB -n ::JobNumProcTot::  # Number of MPI tasks (SPMD case) or cores (MPMD case)
10#-Q- curie #MSUB -c ::openMPthreads::  # Number of openMP threads. To specify only for SMPD
11#-Q- curie #MSUB -x                    # exclusive node. To specify only for MPMD together with the one below
12#-Q- curie #MSUB -E '--cpu_bind=none'
13#-Q- curie ##MSUB -E '--distribution cyclic'
14#-Q- curie #MSUB -T 86400              # Wall clock limit (seconds)
15#-Q- curie #MSUB -q standard           # thin nodes
16#-Q- curie ##MSUB -U high
17#-Q- curie #MSUB -U medium
18#-Q- curie ##MSUB -U low
19#-Q- curie #MSUB -A ::default_project::
20#-Q- curie #MSUB -E --no-requeue
21#-Q- curie # Below specific options that can be activated
22#-Q- curie ##MSUB -q ivybridge         # Option for Airain
23#-Q- curie
24#-Q- curie BATCH_NUM_PROC_TOT=$BRIDGE_MSUB_NPROC
25#-Q- curie set +x
26#-Q- irene #!/bin/ksh
27#-Q- irene ######################
28#-Q- irene ## IRENE   TGCC/CEA ##
29#-Q- irene ######################
30#-Q- irene #MSUB -r ::Jobname::        # Job Name
31#-Q- irene #MSUB -o Script_Output_::Jobname::.000001    # standard output
32#-Q- irene #MSUB -e Script_Output_::Jobname::.000001    # error output
33#-Q- irene #MSUB -eo
34#-Q- irene #MSUB -n ::JobNumProcTot::  # Number of MPI tasks (SPMD case) or cores (MPMD case)
35#-Q- irene #MSUB -c ::openMPthreads::  # Number of openMP threads. To specify only for SMPD
36#-Q- irene #MSUB -x                    # exclusive node. To specify only for MPMD together with the one below
37#-Q- irene #MSUB -E '--cpu_bind=none'
38#-Q- irene #MSUB -T ::WallTime::              # Wall clock limit (seconds)
39#-Q- irene #MSUB -A ::default_project::
40#-Q- irene #MSUB -q skylake
41#-Q- irene #MSUB -m store,work,scratch
42#-Q- irene
43#-Q- irene BATCH_NUM_PROC_TOT=$BRIDGE_MSUB_NPROC
44#-Q- irene set +x
45#-Q- irene-amd #!/bin/ksh
46#-Q- irene-amd ######################
47#-Q- irene-amd ## IRENE-AMD   TGCC/CEA ##
48#-Q- irene-amd ######################
49#-Q- irene-amd #MSUB -r ::Jobname::        # Job Name
50#-Q- irene-amd #MSUB -o Script_Output_::Jobname::.000001    # standard output
51#-Q- irene-amd #MSUB -e Script_Output_::Jobname::.000001    # error output
52#-Q- irene-amd #MSUB -eo
53#-Q- irene-amd #MSUB -n ::JobNumProcTot::  # Number of MPI tasks (SPMD case) or cores (MPMD case)
54#-Q- irene-amd #MSUB -c ::openMPthreads::  # Number of openMP threads. To specify only for SMPD
55#-Q- irene-amd #MSUB -x                    # exclusive node. To specify only for MPMD together with the one below
56#-Q- irene-amd #MSUB -T ::WallTime::              # Wall clock limit (seconds)
57#-Q- irene-amd #MSUB -A ::default_project::
58#-Q- irene-amd #MSUB -q rome
59#-Q- irene-amd #MSUB -m store,work,scratch
60#-Q- irene-amd
61#-Q- irene-amd BATCH_NUM_PROC_TOT=$BRIDGE_MSUB_NPROC
62#-Q- irene-amd set +x
63#-Q- jeanzay #!/bin/ksh
64#-Q- jeanzay ######################
65#-Q- jeanzay ## JEANZAY    IDRIS ##
66#-Q- jeanzay ######################
67#-Q- jeanzay #SBATCH --job-name=::Jobname::        # Job Name
68#-Q- jeanzay #SBATCH --output=Script_Output_::Jobname::.000001    # standard output
69#-Q- jeanzay #SBATCH --error=Script_Output_::Jobname::.000001    # error output
70#-Q- jeanzay #SBATCH --ntasks=::JobNumProcTot::   # Number of MPI tasks
71#-Q- jeanzay #SBATCH --cpus-per-task=::openMPthreads::  # Number of openMP threads.
72#-Q- jeanzay #SBATCH --hint=nomultithread         # 1 processus MPI par par physical core (no hyperthreading)
73#-Q- jeanzay #SBATCH --time=::WallTime::             # Wall clock limit (minutes)
74#-Q- jeanzay #SBATCH --account ::default_project::@cpu
75#-Q- jeanzay
76#-Q- jeanzay ##BATCH_NUM_PROC_TOT=$BRIDGE_SBATCH_NPROC
77#-Q- jeanzay set +x
78#-Q- ada #!/bin/ksh
79#-Q- ada # ######################
80#-Q- ada # ##  ADA       IDRIS ##
81#-Q- ada # ######################
82#-Q- ada # Job name
83#-Q- ada # @ job_name = ::Jobname::
84#-Q- ada # Standard output file name
85#-Q- ada # @ output = Script_Output_::Jobname::.000001
86#-Q- ada # Error output file name
87#-Q- ada # @ error = Script_Output_::Jobname::.000001
88#-Q- ada # Job type
89#-Q- ada # @ job_type = parallel
90#-Q- ada # Total number of tasks
91#-Q- ada # @ total_tasks = ::JobNumProcTot::
92#-Q- ada # Specific option for OpenMP parallelization: Number of OpenMP threads per MPI task
93#-Q- ada # @ parallel_threads = ::openMPthreads::
94#-Q- ada # Memory : as_limit=3.5gb max per process per core. With 4 threads per process use max as_limit=14gb
95#-Q- ada # @ as_limit = 3.5gb
96#-Q- ada # Maximum CPU time per task hh:mm:ss
97#-Q- ada # @ wall_clock_limit = 1:00:00
98#-Q- ada # @ environment = "BATCH_NUM_PROC_TOT=::JobNumProcTot::" ; wall_clock_limit=$(wall_clock_limit)
99#-Q- ada # End of the header options
100#-Q- ada # @ queue
101#-Q- obelix ######################
102#-Q- obelix ## OBELIX      LSCE ##
103#-Q- obelix ######################
104#-Q- obelix #PBS -N ::Jobname::
105#-Q- obelix #PBS -m a
106#-Q- obelix #PBS -j oe
107#-Q- obelix #PBS -q mediump
108#-Q- obelix #PBS -o Script_Output_::Jobname::.000001
109#-Q- obelix #PBS -S /bin/ksh
110#-Q- obelix #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot::
111#-Q- obelix #PBS -l nodes=1:ppn=::JobNumProcTot::
112#-Q- ifort_CICLAD ######################
113#-Q- ifort_CICLAD ##   CICLAD    IPSL ##
114#-Q- ifort_CICLAD ######################
115#-Q- ifort_CICLAD #PBS -N ::Jobname::
116#-Q- ifort_CICLAD #PBS -m a
117#-Q- ifort_CICLAD #PBS -j oe
118#-Q- ifort_CICLAD ###PBS -q h12   # Queue for 12 hours at ciclad only
119#-Q- ifort_CICLAD #PBS -o Script_Output_::Jobname::.000001
120#-Q- ifort_CICLAD #PBS -S /bin/ksh
121#-Q- ifort_CICLAD #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot::
122#-Q- ifort_CICLAD #PBS -l nodes=1:ppn=::JobNumProcTot::
123#-Q- ifort_CICLAD #PBS -l mem=6gb
124#-Q- ifort_CICLAD #PBS -l vmem=30gb
125#-Q- default #!/bin/ksh
126#-Q- default ##################
127#-Q- default ## DEFAULT HOST ##
128#-Q- default ##################
129#-Q- default #For MPI use, uncomment next line :
130#-Q- default #BATCH_NUM_PROC_TOT=::JobNumProcTot::
131
132#**************************************************************
133# Author: Sebastien Denvil
134# Contact: Sebastien.Denvil__at__ipsl.jussieu.fr
135# $Revision:: 1536                                     $ Revision of last commit
136# $Author:: rpennel                                    $ Author of last commit
137# $Date:: 2020-07-03 15:16:53 +0200 (Fri, 03 Jul 2020) $ Date of last commit
138# IPSL (2006)
139#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
140#
141#**************************************************************
142
143date
144
145echo
146echo "#######################################"
147echo "#  ANOTHER GREAT DEBUG SIMULATION #"
148echo "#######################################"
149echo
150
151#D------------------------------------------------------
152#D- ENVIRONMENT
153#D-     - Loading environment needed to run
154#D------------------------------------------------------
155
156MODIPSL=::modipsl::
157libIGCM=${MODIPSL}/libIGCM
158SRF_comp=::SRF_comp::
159OCE_comp=::OCE_comp::
160CPL_comp=::CPL_comp::
161CHM_comp=::CHM_comp::
162JobName=::JOBNAME::
163::SUBMIT_DIR::
164ExecutionType=::EXECUTION_TYPE::
165
166#-Q- jeanzay . /gpfslocalsup/spack_soft/environment-modules/current/init/ksh
167#-Q- mesoipsl . /etc/profile.d/modules.sh
168
169. ::ENVFILE::
170
171module list
172
173#D------------------------------------------------------
174#D- EXECUTION
175#D-     - Copy binary files from modipsl directory
176#D-     - Remove of some out restart files
177#D-     - Execution
178#D------------------------------------------------------
179
180cd ${SUBMIT_DIR}
181
182while read EXEIN EXEOUT ;do
183 eval EXEIN=${EXEIN}
184 cp ${MODIPSL}/bin/${EXEIN} ${EXEOUT}
185done < components_binary.txt
186
187if [ X${SRF_comp} = Xy ] ; then
188  [ -f sechiba_rest_out.nc ] && rm -f sechiba_rest_out.nc
189  [ -f stomate_rest_out.nc ] && rm -f stomate_rest_out.nc
190  [ -f driver_rest_out.nc ] && rm -f driver_rest_out.nc
191fi
192if [ X${OCE_comp} = Xy ] ; then
193  [ X${JobName} != X ] && rm -f ${JobName}*restart*.nc
194fi
195
196if [ X${CPL_comp} = Xy ] ; then
197  if [ -f sstoc_orig.nc ] ; then
198    cp sstoc_orig.nc sstoc.nc
199    cp flxat_orig.nc flxat.nc
200    cp icbrg_orig.nc icbrg.nc
201    cp icshf_orig.nc icshf.nc
202  else
203   cp sstoc.nc sstoc_orig.nc
204   cp flxat.nc flxat_orig.nc
205   cp icbrg.nc icbrg_orig.nc
206   cp icshf.nc icshf_orig.nc
207  fi
208fi
209if [ X${CHM_comp} = Xy ] ; then
210  [ -f reprecipinsoil.dat ] && rm -f reprecipinsoil.dat
211fi
212
213#-Q- jeanzay #Case MPMD + MPI/OpenMP
214#-Q- jeanzay if [ ${ExecutionType} -eq 2 ] ; then
215#-Q- jeanzay    _bkIFS=$IFS;
216#-Q- jeanzay    IFS=$'\n'; set -f
217#-Q- jeanzay    listnodes=($(< <( scontrol show hostnames $SLURM_JOB_NODELIST )))
218#-Q- jeanzay    IFS=$_bkIFS; set +f
219#-Q- jeanzay    rm -f hostlist ; cp hostlist_template hostlist
220#-Q- jeanzay    for nb_proc in `seq 0 $(($SLURM_JOB_NUM_NODES-1))`; do
221#-Q- jeanzay        mv hostlist hostlist_tmp
222#-Q- jeanzay        host_value=${listnodes[${nb_proc}]}
223#-Q- jeanzay        sed -e "s/node_$nb_proc_X/${host_value}/" hostlist_tmp > hostlist
224#-Q- jeanzay    done
225#-Q- jeanzay    export SLURM_HOSTFILE=./hostlist
226#-Q- jeanzay fi
227#-Q- jeanzay # Workaround at Jean-Zay
228#-Q- jeanzay source $I_MPI_ROOT/intel64/bin/mpivars.sh release_mt
229
230
231::EXECUTION:: > out_execution  2>&1
232RET=$?
233if [ ${RET} -gt 0 ] ; then
234    echo "Return code of executable :" ${RET}
235fi
236
237date
238exit
Note: See TracBrowser for help on using the repository browser.