#-Q- cesium #!/bin/ksh #-Q- cesium ################################################### #-Q- cesium ## CESIUM CEA ## #-Q- cesium ## Usefull for postprocessing. AA_job not tested ## #-Q- cesium ################################################### #-Q- cesium #MSUB -r ::Jobname:: # Nom du job #-Q- cesium #MSUB -N 1 # Reservation du noeud #-Q- cesium #MSUB -n 1 # Reservation du processus #-Q- cesium #MSUB -T 86400 # Limite de temps elapsed du job #-Q- cesium #MSUB -E "-j o" #-Q- cesium #MSUB -E "-S /bin/ksh" #-Q- platine #!/usr/bin/ksh #-Q- platine ################## #-Q- platine ## PLATINE CEA ## #-Q- platine ################## #-Q- platine #BSUB -J ::Jobname:: # nom de la requete #-Q- platine #BSUB -N # message a la fin du job #-Q- platine #BSUB -o Script_Output_::Jobname::.000001 # nom du fichier de sortie #-Q- platine #BSUB -n ::JobNumProcTot:: # reservation des processeurs pour le job #-Q- platine #BSUB -W 1:00 # Limite temps #-Q- platine #BSUB -L /bin/ksh #-Q- platine BATCH_NUM_PROC_TOT=$SLURM_NPROCS #-Q- titane #!/usr/bin/ksh #-Q- titane ################## #-Q- titane ## TITANE CEA ## #-Q- titane ################## #-Q- titane #MSUB -r ::Jobname:: # nom de la requete #-Q- titane #MSUB -o Script_Output_::Jobname::.000001 # nom du fichier de sortie #-Q- titane #MSUB -e Script_Output_::Jobname::.000001 # nom du fichier de sortie #-Q- titane #MSUB -eo #-Q- titane #MSUB -n ::JobNumProcTot:: # reservation des processeurs pour le job #-Q- titane #MSUB -T 86400 # Limite temps (en secondes) #-Q- titane #MSUB -p gen2211 #-Q- titane BATCH_NUM_PROC_TOT=$BRIDGE_MSUB_NPROC #-Q- sx8brodie ####################### #-Q- sx8brodie ## SX8BRODIE IDRIS ## #-Q- sx8brodie ####################### #-Q- sx8brodie #PBS -N ::Jobname:: # nom de la requete #-Q- sx8brodie #PBS -m a # message a la fin du job #-Q- sx8brodie #PBS -j o # regroupement des sorties du job : standard error et output #-Q- sx8brodie #PBS -o Script_Output_::Jobname::.000001 # nom du fichier de sortie #-Q- sx8brodie #PBS -S /usr/bin/ksh # shell de soumission #-Q- sx8brodie #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot:: #-Q- sx8brodie #PBS -q ::JobClass:: # classe multi pour BATCH_NUM_PROC_TOT superieur a 2, mono sinon #-Q- sx8brodie #PBS -l cpunum_job=${BATCH_NUM_PROC_TOT} # reservation des processeurs pour le job #-Q- sx8brodie #PBS -l memsz_job=15.0gb # Limite memoire #-Q- sx8brodie #PBS -l cputim_job=1:00:00 # Limite temps #-Q- aix6 #!/usr/bin/ksh #-Q- aix6 # ###################### #-Q- aix6 # ## VARGAS IDRIS ## #-Q- aix6 # ###################### #-Q- aix6 # Nom de la requete #-Q- aix6 # @ job_name = ::Jobname:: #-Q- aix6 # Type de travail #-Q- aix6 # @ job_type = parallel #-Q- aix6 # Fichier de sortie standard #-Q- aix6 # @ output = Script_Output_::Jobname::.000001 #-Q- aix6 # Fichier de sortie erreur (le meme) #-Q- aix6 # @ error = Script_Output_::Jobname::.000001 #-Q- aix6 # Nombre de processus demandes #-Q- aix6 # @ total_tasks = ::JobNumProcTot:: #-Q- aix6 # @ environment = "BATCH_NUM_PROC_TOT=::JobNumProcTot::" #-Q- aix6 # Temps CPU max. par processus MPI hh:mm:ss #-Q- aix6 # @ wall_clock_limit = 1:00:00 #-Q- aix6 # Memoire max. utilisee par processus #-Q- aix6 # @ data_limit = 3.2gb #-Q- aix6 # Memoire stack demandee #-Q- aix6 # @ stack_limit = 0.3gb,0.3gb #-Q- aix6 # Pas d OpenMP #-Q- aix6 # @ resources = ConsumableCpus(1) #-Q- aix6 # Fin de l entete #-Q- aix6 # @ queue #-Q- ulam #!/usr/bin/ksh #-Q- ulam # #################################################### #-Q- ulam # ## ULAM IDRIS ## #-Q- ulam # ## Usefull for postprocessing. AA_job not tested ## #-Q- ulam # #################################################### #-Q- ulam # #-Q- sx8mercure #!/bin/ksh #-Q- sx8mercure ###################### #-Q- sx8mercure ## SX8MERCURE CEA ## #-Q- sx8mercure ###################### #-Q- sx8mercure #PBS -N ::Jobname:: # nom de la requete #-Q- sx8mercure #PBS -m a # message a la fin du job #-Q- sx8mercure #PBS -j o # regroupement des sorties du job : standard error et output #-Q- sx8mercure ####PBS -A gen6178 #-Q- sx8mercure #PBS -o Script_Output_::Jobname::.000001 # nom du fichier de sortie #-Q- sx8mercure #PBS -S /usr/bin/ksh # shell de soumission #-Q- sx8mercure #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot:: #-Q- sx8mercure #PBS -l cpunum_job=${BATCH_NUM_PROC_TOT} # reservation des processeurs pour le job #-Q- sx8mercure #PBS -l memsz_job=15.0gb # limite memoire #-Q- sx8mercure #PBS -l elapstim_req=01:00:00 # limite en temps elapsed #-Q- sx9mercure #!/bin/ksh #-Q- sx9mercure ###################### #-Q- sx9mercure ## SX9MERCURE CEA ## #-Q- sx9mercure ###################### #-Q- sx9mercure #PBS -N ::Jobname:: # nom de la requete #-Q- sx9mercure #PBS -m a # message a la fin du job #-Q- sx9mercure #PBS -j o # regroupement des sorties du job : standard error et output #-Q- sx9mercure #PBS -o Script_Output_::Jobname::.000001 # nom du fichier de sortie #-Q- sx9mercure #PBS -S /usr/bin/ksh # shell de soumission #-Q- sx9mercure #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot:: #-Q- sx9mercure #PBS -l cpunum_job=${BATCH_NUM_PROC_TOT} # reservation des processeurs pour le job #-Q- sx9mercure #PBS -l memsz_job=16.0gb # limite memoire #-Q- sx9mercure #PBS -l elapstim_req=24:00:00 # limite en temps elapsed #-Q- sx9mercure #PBS -A gen6178 # groupe obligatoire sur SX9 #-Q- sx9mercure #PBS -q para-sx9 # para-sx9 or prio-sx9 (for CMIP5 top priorities), bckg-sx9 (run with free slot) and test-sx9 (if elapsed<1h) #-Q- lxiv8 ###################### #-Q- lxiv8 ## OBELIX LSCE ## #-Q- lxiv8 ###################### #-Q- lxiv8 #PBS -N ::Jobname:: #-Q- lxiv8 #PBS -m a #-Q- lxiv8 #PBS -j oe #-Q- lxiv8 #PBS -q medium #-Q- lxiv8 #PBS -o Script_Output_::Jobname::.000001 #-Q- lxiv8 #PBS -S /bin/ksh #-Q- lxiv8 #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot:: #-Q- lxiv8 #PBS -l nodes=1:ppn=::JobNumProcTot:: #-Q- default #!/bin/ksh #-Q- default ################## #-Q- default ## DEFAULT HOST ## #-Q- default ################## #-Q- default #For MPI use, uncomment next line : #-Q- default #BATCH_NUM_PROC_TOT=::JobNumProcTot:: #************************************************************** # Author: Sebastien Denvil # Contact: Sebastien.Denvil__at__ipsl.jussieu.fr # $Revision:: $ Revision of last commit # $Author:: $ Author of last commit # $Date:: $ Date of last commit # IPSL (2006) # This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC # #************************************************************** #set -eu #set -vx date echo echo "#######################################" echo "# ANOTHER GREAT SIMULATION #" echo "#######################################" echo #D--------------------------------------------------------------------== #D--------------------------------------------------------------------== #D- #D- Job to launch IGCM models #D- #D--------------------------------------------------------------------== #D--------------------------------------------------------------------== #D- MODIPSL=::modipsl:: libIGCM=${MODIPSL}/libIGCM #D--------------------------------------------------------------------== #D- -1. User modification place #D- - Job Verbosity #D- - PeriodNb #D- - Experience type : DEB(ug), DEV(elopment), RUN #D--------------------------------------------------------------------== #D- Increased verbosity (1, 2, 3) Verbosity=3 #D- Experience type : DEB(ug), DEV(elopment), RUN (default) JobType=RUN #D- Number of execution in one job PeriodNb=1 #-Q- sx9mercure PeriodNb=60 #D- # --------------------------------------------------------------------------------------------------# #D- ! Optionnal features /!\ Use with care ! # # --------------------------------------------------------------------------------------------------# #D- Low level debug : to bypass lib test checks and stack construction #D- Default=true DEBUG_debug=false #D- Set DEBUG_sys to false to disable output calls of function #D- Default=true #DEBUG_sys=false #D- Define running directory #D- Default=${TMPDIR} ie temporary batch directory #RUN_DIR_PATH=/workdir/or/scratchdir/of/this/machine #D- Define submit directory #D- Default= where you launch qsub (variable from scheduler) #SUBMIT_DIR=$( pwd ) #D- Define BIG_DIR directory #D- Default=(strongly machine dependant/see libIGCM_sys for details) #BIG_DIR=/somewhere/with/lot/of/space/scratchdir/may/be #D- Define input file root directory #D- Default=/IGCMG/common/account/of/this/machine #R_IN=/u/rech/por/rpor111/DATA #D- Turn in dry run mode ? (0,1,2,3) #D- Default=0 #DRYRUN=3 # YOU HAVE TO COMPILE YOUR EXE FILES to USE DRYRUN MODE ! # ------------------------------------------------------------------------------------- # | DRYRUN= | Date computations, | sys_Get | Exe | sys_Put_Out; sys_Put_Rest | # | | Cp/Exe param files | | Chmod | | # | | Qsub | | | | # ------------------------------------------------------------------------------------- # | 0 | yes | yes | yes | yes | # ------------------------------------------------------------------------------------- # | 1 | yes | yes | yes | no | # ------------------------------------------------------------------------------------- # | 2 | yes | yes | no | no | # ------------------------------------------------------------------------------------- # | 3 | yes | no | no | no | # ------------------------------------------------------------------------------------- #D- # --------------------------------------------------------------------------------------------------# #D- ! End of optionnal features /!\ Do not modify anything below unless you know what you are doing # # --------------------------------------------------------------------------------------------------# #D- #D--------------------------------------------------------------------== #D- 0. System Environment #D- - Define variables for Number of processors #D- - Define MPI variables #D- - Define batch scheduler variables #D- - Source IGCM Library #D- - Get RESOLution in .resol file (temporary) #D--------------------------------------------------------------------== #D--------------------------------------------------------------------== . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh ( ${DEBUG_debug} ) && IGCM_debug_Check . ${libIGCM}/libIGCM_card/libIGCM_card.ksh ( ${DEBUG_debug} ) && IGCM_card_Check . ${libIGCM}/libIGCM_date/libIGCM_date.ksh ( ${DEBUG_debug} ) && IGCM_date_Check #------- . ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh . ${libIGCM}/libIGCM_config/libIGCM_config.ksh . ${libIGCM}/libIGCM_comp/libIGCM_comp.ksh . ${libIGCM}/libIGCM_post/libIGCM_post.ksh #D--------------------------------------------------------------------== #-- Resolution FLAG for oasis input [ -f ${SUBMIT_DIR}/../.resol ] && RESOL=$(head -1 ${SUBMIT_DIR}/../.resol) #RESOL="ORCA2xLMD9671" #D- #D--------------------------------------------------------------------== #D- 1. INITIALIZE CONFIGURATION AND THEN COMPONENTS #D--------------------------------------------------------------------== # --------------------------------------------------------------------== #D- Initialize configuration : #D- - Simulation configuration #D- - Simulation parameters #D- - Execution parameter #D- - Define input files directory #D- - Read or initialize CumulPeriod #D- - run.card #D- # --------------------------------------------------------------------== IGCM_config_Initialize # --------------------------------------------------------------------== #D- Define, create and cd RUN_DIR #D- # --------------------------------------------------------------------== RUN_DIR=${RUN_DIR_PATH}/${config_UserChoices_TagName}/${config_UserChoices_JobName}.${$} IGCM_sys_MkdirWork ${RUN_DIR} IGCM_sys_Cd ${RUN_DIR} # ------------------------------------------------------------------ # Test if all was right before proceeding further # ------------------------------------------------------------------ IGCM_debug_Verif_Exit # --------------------------------------------------------------------== #D- Initialize each components taking part #D- into simulation configuration : #D- - Define component executable #D- - Define Write Frequency by component "1M" "1D" ... #D- - Source ${comp}.driver #D- - Define Storage Places by component #D- - ${comp}_Initialize : #D- - Patterns to sed #D- - Variables from namelist #D- # --------------------------------------------------------------------== IGCM_comp_Initialize # --------------------------------------------------------------------== #D- Verify compatibility of period length, write frequencies, ... #D- Verify compatibility of rebuild choices and post-process choices #D- Will stop here if something is wrong # --------------------------------------------------------------------== IGCM_config_Check # ------------------------------------------------------------------ #D- Test if all was right before entering the period loop # ------------------------------------------------------------------ IGCM_debug_Verif_Exit #D--------------------------------------------------------------------== #D- 2. ENTER THE DEEP EXECUTION LOOP #D- !!!! FASTEN YOUR SEAT BELTS !!!! #D- !!!!! PLEASE. !!!! #D- !! WE WILL CROSS TURBULENCES. !! #D--------------------------------------------------------------------== Period=1 PeriodContinue=false if [ ${Period} -le ${PeriodNb} ]; then PeriodContinue=true fi while ( ${PeriodContinue} ) ; do echo echo "Starting iteration ${Period} / ${PeriodNb}" #D- # ------------------------------------------------------------------ #D- COMPUTE AND DEFINE DATE STUFF. # ------------------------------------------------------------------ IGCM_config_PeriodStart #D- => ${PeriodDateBegin} #D- => ${PeriodDateEnd} #D- => ${CumulPeriod} #D- => ${DatesPeriod}=${PeriodDateBegin}_${PeriodDateEnd} #D- => ${PeriodLength} => JOURS=31 , 28, 29, 30 ; MOIS=0 ; ANS=0 #D- => update run.card value #D- # ------------------------------------------------------------------ #D- BEGIN COMPUTATION ONLY IF NEEDED # ------------------------------------------------------------------ if [ ${SimulationLengthInDays} -gt ${ExperienceLengthInDays} ] ; then break ; fi #D- # ------------------------------------------------------------------ #D- Optionnal function in driver #D- to set special variables used in forward lists (Param, Init or Bc). # ------------------------------------------------------------------ IGCM_comp_PeriodStart #D- # ------------------------------------------------------------------ #D- Get parameters text files updated by job (.def, namelist ...) #D- READ AND USE BY GCM AT EACH EXECUTION. # ------------------------------------------------------------------ IGCM_comp_GetInputParametersFiles #D- # ------------------------------------------------------------------ #D- Get initial state (Etat0, carteveg,relief...) #D- NECESSARY ONLY IF CumulPeriod= (=> NUMERO) == 1 #D- AND ???_Restart=NO #D- READ AND USE BY GCM FOR ONLY ONE EXECUTION. # ------------------------------------------------------------------ IGCM_comp_GetInputInitialStateFiles #D- # ------------------------------------------------------------------ #D- Get Boundaries Conditions (SST, WIND[X,Y,Z], LAI ...) #D- READ AND USE BY GCM AT EACH EXECUTION. # ------------------------------------------------------------------ IGCM_comp_GetInputBoundaryFiles #D- # ------------------------------------------------------------------ #D- Get SmoothFiles Conditions (SST, WIND[X,Y,Z], LAI ...) #D- READ AND USE BY GCM AT EACH EXECUTION but varying in time # ------------------------------------------------------------------ IGCM_comp_GetInputSmoothFiles #D- # ------------------------------------------------------------------ #D- Get restart files (restartphy.nc, orca_restart.nc ...) #D- READ AND USE BY GCM AT EACH EXECUTION. #D- #D- IF A COMPONENT DO NOT RESTART FROM PREVIOULSY COMPUTED RESTART #D- ONLY IF CumulPeriod= (=> NUMERO) == 1 #D- MUST EXECUTE CREATE ETAT0_LIMIT (TYPICALLY LMDZ AND ./create_etat0_limit.e) #D- #D- IF CumulPeriod == 1 #D- AND A COMPONENT RESTART FROM PREVIOULSY COMPUTED RESTART #D- MUST BRING THIS RESTART IN ${RUN_DIR_PATH} #D- #D- ELSE BRING RESTART FROM ${JobName} IN ${RUN_DIR_PATH} # ------------------------------------------------------------------ IGCM_comp_GetInputRestartFiles #D- # ------------------------------------------------------------------ #D- Test if all was right before Update # ------------------------------------------------------------------ IGCM_debug_Verif_Exit # ------------------------------------------------------------------ #D- Activate running environnement variables # ------------------------------------------------------------------ IGCM_sys_activ_variables #D- # ------------------------------------------------------------------ #D- UPDATE ParametersFiles (.def, namelist ...) with #D- current value of (ORCA_NIT00, ORCA_LRSTAR, RAZ_DATE, ...) # ------------------------------------------------------------------ IGCM_comp_Update #D- # ------------------------------------------------------------------ #D- Test if all was right before execution # ------------------------------------------------------------------ IGCM_debug_Verif_Exit #D- #D----------------------------------------------------------------== #D- 3. Execution #D----------------------------------------------------------------== echo echo "#######################################" echo "# DIR BEFORE RUN EXECUTION #" echo "#######################################" echo ls -lrt echo "========================================================================" if [ ${DRYRUN} -le 1 ] ; then REAL_DATE_INIT=$( date ) echo > ${Exe_Output} echo "#######################################" >> ${Exe_Output} echo "EXECUTION of : ${EXECUTION}" >> ${Exe_Output} echo >> ${Exe_Output} typeset RET RUN_DATE_BEGIN=$( date '+%Y-%m-%dT%H:%M:%S' ) ${EXECUTION} >> ${Exe_Output} 2>&1 RET=$? RUN_DATE_END=$( date '+%Y-%m-%dT%H:%M:%S' ) if [ ${RET} -gt 0 ] ; then echo "Return code of executable :" ${RET} IGCM_debug_Exit "EXECUTABLE" IGCM_sys_Mkdir ${SUBMIT_DIR}/Debug IGCM_sys_Cp ${Exe_Output} ${SUBMIT_DIR}/Debug/${PREFIX}_${Exe_Output}_error ExecutionFail=true fi echo >> ${Exe_Output} echo "#######################################" >> ${Exe_Output} echo "libIGCM RunDateBegin=${RUN_DATE_BEGIN}" >> ${Exe_Output} echo "libIGCM RunDateEnd=${RUN_DATE_END}" >> ${Exe_Output} echo >> ${Exe_Output} else echo "EXECUTION of : ${EXECUTION} simulated for DRYRUN = " $DRYRUN echo "EXECUTION of : ${EXECUTION} simulated for DRYRUN = " $DRYRUN > ${Exe_Output} if ( $DEBUG_debug ) ; then echo "FOR EXECUTION DRYRUN mode = " $DRYRUN >> stack fi fi echo "========================================================================" echo echo "#######################################" echo "# DIR AFTER RUN EXECUTION #" echo "#######################################" echo ls -lrt #D- # ------------------------------------------------------------------ #D- Desactivate running environnement variables # ------------------------------------------------------------------ IGCM_sys_desactiv_variables #D- #D----------------------------------------------------------------== #D- 4. Post execution operations #D----------------------------------------------------------------== #D- # ------------------------------------------------------------------ #D- Save on archive machine netcdf outputs, restarts #D- and text files of models # ------------------------------------------------------------------ IGCM_comp_Finalize #D- # ------------------------------------------------------------------ #D- Test if all was right after Finalize # ------------------------------------------------------------------ IGCM_debug_Verif_Exit #D- # ------------------------------------------------------------------ #D- Configure asynchronous post-treatment (Level 0) when necessary (rebuild) #D- Configure classic post-treatment (Level 1) when necessary (TimeSeries/Seasonal) # ------------------------------------------------------------------ IGCM_post_Configure #D- # ------------------------------------------------------------------ #D- Launch remote rebuild or/and post-treatment process if necessary # ------------------------------------------------------------------ IGCM_post_Submit #D- # ------------------------------------------------------------------ #D- Save job output #D- Manage executable size to save only different binary #D- Write in run.card user, system and elapse time #D- Check that everything went well ! No ? then we stop. #D- Determine next computed period # ------------------------------------------------------------------ IGCM_config_PeriodEnd echo "Ending iteration ${Period}" (( Period = Period + 1 )) # End loop if date end is reached if [ ${SimulationLengthInDays} -ge ${ExperienceLengthInDays} ] ; then break ; fi PeriodContinue=false if [ ${Period} -le ${PeriodNb} ]; then PeriodContinue=true fi done #D- #D--------------------------------------------------------------------== #D- 5. Submit next job or send mail if simulation over. #D--------------------------------------------------------------------== IGCM_config_Finalize date