[524] | 1 | #-Q- platine #!/usr/bin/ksh |
---|
| 2 | #-Q- platine ################### |
---|
| 3 | #-Q- platine ## PLATINE CEA ## |
---|
| 4 | #-Q- platine ################### |
---|
| 5 | #-Q- platine #BSUB -J SaveSource # Nom du job |
---|
| 6 | #-Q- platine #BSUB -N # message a la fin du job |
---|
| 7 | #-Q- platine #BSUB -n 1 # reservation des processeurs pour le job |
---|
| 8 | #-Q- platine #BSUB -W 0:10 # Limite temps |
---|
| 9 | #-Q- platine #BSUB -q post # Passage en queue post |
---|
| 10 | #-Q- platine #BSUB -L /bin/ksh |
---|
| 11 | #-Q- sx8brodie #!/bin/ksh |
---|
| 12 | #-Q- sx8brodie ####################### |
---|
| 13 | #-Q- sx8brodie ## SX8BRODIE IDRIS ## |
---|
| 14 | #-Q- sx8brodie ####################### |
---|
| 15 | #-Q- aix6 #!/bin/ksh |
---|
| 16 | #-Q- aix6 ####################### |
---|
| 17 | #-Q- aix6 ## VARGAS IDRIS ## |
---|
| 18 | #-Q- aix6 ####################### |
---|
| 19 | #-Q- sx8mercure #!/bin/ksh |
---|
| 20 | #-Q- sx8mercure ###################### |
---|
| 21 | #-Q- sx8mercure ## SX8MERCURE CEA ## |
---|
| 22 | #-Q- sx8mercure ###################### |
---|
| 23 | #-Q- sx8mercure #PBS -N SaveSource # Nom du job |
---|
| 24 | #-Q- sx8mercure #PBS -j o # regroupement des stdout et stderr |
---|
| 25 | #-Q- sx8mercure #PBS -S /usr/bin/ksh # shell de soumission |
---|
| 26 | #-Q- sx8mercure #PBS -l memsz_job=1gb # Limite memoire a 1 Go |
---|
| 27 | #-Q- sx8mercure #PBS -l cputim_job=0:10:00 # Limite temps a 1 heures |
---|
| 28 | #-Q- sx8mercure #PBS -q scalaire |
---|
[640] | 29 | #-Q- sx8mercure #PBS -r n |
---|
[524] | 30 | #-Q- sx9mercure #!/bin/ksh |
---|
[535] | 31 | #-Q- sx9mercure ##################### |
---|
| 32 | #-Q- sx9mercure ## SX9MERCURE CEA ## |
---|
| 33 | #-Q- sx9mercure ##################### |
---|
[524] | 34 | #-Q- sx9mercure #PBS -N SaveSource # Nom du job |
---|
| 35 | #-Q- sx9mercure #PBS -j o # regroupement des stdout et stderr |
---|
| 36 | #-Q- sx9mercure #PBS -S /usr/bin/ksh # shell de soumission |
---|
| 37 | #-Q- sx9mercure #PBS -l memsz_job=1gb # Limite memoire a 1 Go |
---|
[616] | 38 | #-Q- sx9mercure #PBS -l elapstim_req=0:10:00 # Limite temps a 1 heures |
---|
[524] | 39 | #-Q- sx9mercure #PBS -q scalaire |
---|
[640] | 40 | #-Q- sx9mercure #PBS -r n |
---|
[524] | 41 | #-Q- titane #!/bin/ksh |
---|
| 42 | #-Q- titane ###################### |
---|
| 43 | #-Q- titane ## TITANE CEA ## |
---|
| 44 | #-Q- titane ###################### |
---|
| 45 | #-Q- titane #MSUB -r SaveSource # Nom du job |
---|
| 46 | #-Q- titane #MSUB -n 1 # Reservation du processus |
---|
| 47 | #-Q- titane #MSUB -T 1800 # Limite de temps elapsed du job |
---|
[530] | 48 | #-Q- titane #MSUB -E "-eo" |
---|
| 49 | #-Q- titane #MSUB -E "-L /bin/ksh" |
---|
| 50 | #-Q- titane #MSUB -E "-Ep "${ExeOutDateMax} |
---|
| 51 | #-Q- titane #MSUB -E "-Ep "${R_OUT_EXE} |
---|
| 52 | #-Q- titane #MSUB -E "-Ep "${PREFIX} |
---|
| 53 | #-Q- titane #MSUB -E "-Ep "${SUBMIT_DIR} |
---|
| 54 | #-Q- titane #MSUB -q testext |
---|
[643] | 55 | #-Q- titane #MSUB -E '-rn' |
---|
[524] | 56 | #-Q- lxiv8 ###################### ??? |
---|
| 57 | #-Q- lxiv8 ## OBELIX LSCE ## |
---|
| 58 | #-Q- lxiv8 ###################### |
---|
| 59 | #-Q- lxiv8 #PBS -N SaveSource |
---|
| 60 | #-Q- lxiv8 #PBS -m a |
---|
| 61 | #-Q- lxiv8 #PBS -j oe |
---|
| 62 | #-Q- lxiv8 #PBS -q test |
---|
| 63 | #-Q- lxiv8 #PBS -o SaveSource.$$ |
---|
| 64 | #-Q- lxiv8 #PBS -S /bin/ksh |
---|
| 65 | #-Q- default #!/bin/ksh |
---|
| 66 | #-Q- default ################## |
---|
| 67 | #-Q- default ## DEFAULT HOST ## |
---|
| 68 | #-Q- default ################## |
---|
| 69 | |
---|
| 70 | #************************************************************** |
---|
| 71 | # Author: Martial Mancip |
---|
| 72 | # Contact: Martial.Mancip__at__ipsl.jussieu.fr |
---|
| 73 | # $Revision:: $ Revision of last commit |
---|
| 74 | # $Author:: $ Author of last commit |
---|
| 75 | # $Date:: $ Date of last commit |
---|
| 76 | # IPSL (2006) |
---|
| 77 | # This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC |
---|
| 78 | # |
---|
| 79 | #************************************************************** |
---|
| 80 | |
---|
| 81 | #set -eu |
---|
| 82 | #set -vx |
---|
| 83 | |
---|
| 84 | date |
---|
| 85 | |
---|
| 86 | #-Q- sx8brodie export OMP_NUM_THREADS=1 |
---|
| 87 | #-Q- aix6 export OMP_NUM_THREADS=1 |
---|
| 88 | |
---|
[712] | 89 | #D- Task type (computing or post-processing) |
---|
| 90 | TaskType=post-processing |
---|
| 91 | |
---|
[530] | 92 | MODIPSL=::modipsl:: |
---|
| 93 | |
---|
[554] | 94 | #D- Path to libIGCM |
---|
[524] | 95 | #D- Default : value from AA_job if any |
---|
[554] | 96 | # WARNING For StandAlone use : To run this script on some machine (ulam and cesium) |
---|
| 97 | # WARNING you must check MirrorlibIGCM variable in sys library. |
---|
| 98 | # WARNING If this variable is true, you must use libIGCM_POST path instead |
---|
| 99 | # WARNING of your running libIGCM directory. |
---|
[524] | 100 | libIGCM=${libIGCM:=::modipsl::/libIGCM} |
---|
| 101 | |
---|
| 102 | . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh |
---|
| 103 | ( ${DEBUG_debug} ) && IGCM_debug_Check |
---|
| 104 | #------- |
---|
| 105 | . ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh |
---|
| 106 | . ${libIGCM}/libIGCM_config/libIGCM_config.ksh |
---|
| 107 | |
---|
[530] | 108 | IGCM_sys_MkdirWork ${RUN_DIR_PATH} |
---|
| 109 | IGCM_sys_Cd ${RUN_DIR_PATH} |
---|
[524] | 110 | |
---|
[530] | 111 | ExeOutDateMax=${ExeOutDateMax:=$1} |
---|
| 112 | R_OUT_EXE=${R_OUT_EXE:=$2} |
---|
| 113 | PREFIX=${PREFIX:=$3} |
---|
| 114 | SUBMIT_DIR=${SUBMIT_DIR:=$4} |
---|
[524] | 115 | |
---|
[535] | 116 | cd ${MODIPSL}; |
---|
| 117 | ${MODIPSL}/util/script_diff_model ${SUBMIT_DIR} > ${RUN_DIR_PATH}/out_script_diff_model 2>&1 |
---|
| 118 | echo "script_diff_model return" $? >> ${RUN_DIR_PATH}/out_script_diff_model 2>&1 |
---|
| 119 | cd ${RUN_DIR_PATH} |
---|
[530] | 120 | |
---|
| 121 | ERR_script_diff_model=$( cat out_script_diff_model | grep "script_diff_model return [0-9]*" | sed -e "s&script_diff_model return *\([0-9]*\)&\1&" ) |
---|
| 122 | |
---|
| 123 | if [ ! X${ERR_script_diff_model} = X0 ] ; then |
---|
| 124 | echo 'Error in script_diff_model :' ${ERR_script_diff_model} |
---|
| 125 | exit ${ERR_script_diff_model} |
---|
| 126 | fi |
---|
| 127 | |
---|
| 128 | MODIPSL_SAVE_NAME=$( cat out_script_diff_model | grep "SAVE directory in" | sed -e "s&SAVE directory in &&" ) |
---|
| 129 | MODIPSL_SAVE=${MODIPSL}/tmp/${MODIPSL_SAVE_NAME} |
---|
| 130 | if ( [ X${MODIPSL_SAVE_NAME} = X ] || [ ! -d ${MODIPSL_SAVE} ] ) ; then |
---|
| 131 | echo 'Error in SaveSourceModifications: no MODIPSL_SAVE_NAME avaible. We STOP' |
---|
| 132 | exit 1 |
---|
| 133 | fi |
---|
| 134 | |
---|
[524] | 135 | MaxModifiedDate=$( tail -1 ${MODIPSL_SAVE}/Last_log ) |
---|
| 136 | |
---|
[530] | 137 | cd ${MODIPSL}/tmp |
---|
[535] | 138 | IGCM_sys_Tar ${RUN_DIR_PATH}/${MODIPSL_SAVE_NAME}.tar ${MODIPSL_SAVE_NAME} |
---|
[530] | 139 | cd - |
---|
| 140 | if ( ! ${DEBUG_debug} ) ; then |
---|
| 141 | IGCM_sys_Rm -rf ${MODIPSL_SAVE} |
---|
[524] | 142 | fi |
---|
| 143 | |
---|
| 144 | if [ ${MaxModifiedDate} -lt ${ExeOutDateMax} ] ; then |
---|
[530] | 145 | IGCM_sys_Put_Out ${MODIPSL_SAVE_NAME}.tar ${R_OUT_EXE}/${PREFIX}_${MODIPSL_SAVE_NAME}_certified.tar |
---|
[524] | 146 | else |
---|
[530] | 147 | IGCM_sys_Put_Out ${MODIPSL_SAVE_NAME}.tar ${R_OUT_EXE}/${PREFIX}_${MODIPSL_SAVE_NAME}_NOTcertified.tar |
---|
[524] | 148 | fi |
---|
[530] | 149 | if ( ! ${DEBUG_debug} ) ; then |
---|
| 150 | IGCM_sys_Rm ${MODIPSL_SAVE_NAME}.tar |
---|
| 151 | fi |
---|
| 152 | |
---|
[590] | 153 | # Clean RUN_DIR_PATH (necessary for cesium and titane only) |
---|
[530] | 154 | if ( ! ${DEBUG_debug} ) ; then |
---|
| 155 | IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} |
---|
| 156 | fi |
---|