#-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 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 -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 = $(job_name).$(jobid) #-Q- aix6 # Fichier de sortie erreur (le meme) #-Q- aix6 # @ error = $(job_name).$(jobid) #-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- 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- 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:: # $Date$ # $Author$ # $Revision$ # 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- 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- Experience type : DEB(ug), DEV(elopment), RUN (default) JobType=RUN #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- Turn in dry run mode ? (0,1,2,3) #D- Default=0 #DRYRUN=3 # YOU MUST COMPILE YOUR EXE FILES FOR 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- Define input file root directory #D- Default=/IGCMG/common/account/of/this/machine #R_IN=/u/rech/por/rpor111/DATA #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} # --------------------------------------------------------------------== #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--------------------------------------------------------------------== #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- 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 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 ( [ X${BATCH_NUM_PROC_TOT} != X ] && [ "${BATCH_NUM_PROC_TOT}" -gt 1 ] ) ; then MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND} eval MPIRUN_OPTIONS=${config_UserChoices_JobRunOptions} else MPIRUN_COMMAND=${MPIRUN_COMMAND:="time "} MPIRUN_OPTIONS=${MPIRUN_OPTIONS:=""} fi if [ ${DRYRUN} -le 1 ] ; then REAL_DATE_INIT=$( date ) echo "EXECUTION of : ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} > ${Exe_Output} 2>&1" typeset RET RUN_DATE_BEGIN=$( date '+%Y-%m-%dT%H:%M:%S' ) ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} > ${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_Cp ${Exe_Output} ${SUBMIT_DIR}/${PREFIX}_${Exe_Output}_error fi echo "libIGCM RunDateBegin=${RUN_DATE_BEGIN}" >> ${Exe_Output} echo "libIGCM RunDateEnd=${RUN_DATE_END}" >> ${Exe_Output} else echo "EXECUTION of : ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} simulated for DRYRUN = " $DRYRUN 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- Launch remote rebuild or/and post-treatment process if necessary # ------------------------------------------------------------------ IGCM_post_Configure #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