Changeset 800 for trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh
- Timestamp:
- 02/18/13 17:09:13 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh
r782 r800 64 64 # Host and user names 65 65 # $hostname ou hostname 66 typeset HOST=${HOST:=$( hostname )}66 typeset HOST=${HOST:=$( hostname )} 67 67 # $username ou whoami 68 typeset LOGIN=${LOGIN:=$( whoami )}68 typeset LOGIN=${LOGIN:=$( whoami )} 69 69 # $hostname of the MASTER job 70 70 typeset MASTER=${MASTER:=$( hostname )} … … 111 111 112 112 #==================================================== 113 #- SCRATCHDIR (=> ${R_DONNEES})114 if [ X${PBS_O_WORKDIR} != X ] ; then115 typeset -r SCRATCHDIR=/scratch/$PBS_O_LOGNAME.$PBS_JOBID116 #==${WORKDIR}117 # cf /usr/Local/Env sur obelix118 else119 typeset -r SCRATCHDIR=/tmp120 fi121 #FOR DEBUG RUN :122 #typeset -r SCRATCHDIR=/home/scratch01/${LOGIN}123 124 #====================================================125 113 #- SUBMIT_DIR : submission dir 126 114 if [ X${PBS_O_WORKDIR} != X ] ; then … … 136 124 #==================================================== 137 125 #- ARCHIVE (dedicated to large files) 138 typeset -rARCHIVE=${ARCHIVE:=/home/scratch01/${LOGIN}}126 typeset ARCHIVE=${ARCHIVE:=/home/scratch01/${LOGIN}} 139 127 140 128 #==================================================== 141 129 #- STORAGE (dedicated to small/medium files) 142 typeset -rSTORAGE=${ARCHIVE}130 typeset STORAGE=${ARCHIVE} 143 131 144 132 #==================================================== 145 133 #- R_OUT 146 typeset -rR_OUT=${ARCHIVE}/IGCM_OUT134 typeset R_OUT=${ARCHIVE}/IGCM_OUT 147 135 148 136 #==================================================== 149 137 #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 150 typeset -rR_FIG=${STORAGE}/IGCM_OUT138 typeset R_FIG=${STORAGE}/IGCM_OUT 151 139 152 140 #==================================================== 153 141 #- R_BUF (ONLY FOR double copy an scratch) 154 typeset -r R_BUF= /home/scratch01/${LOGIN}/IGCM_OUT142 typeset -r R_BUF=${STORAGE}/IGCM_OUT 155 143 156 144 #==================================================== 157 145 #- BIG_DIR : BIG_DIR to store files waiting for rebuild 158 typeset -r BIG_DIR=${BIG_DIR:=${S CRATCHDIR}/REBUILD}146 typeset -r BIG_DIR=${BIG_DIR:=${STORAGE}/REBUILD} 159 147 160 148 #==================================================== 161 149 #- RUN_DIR_PATH : Temporary working directory (=> TMP) 162 typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:= ${SCRATCHDIR}/tmp$$}150 typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=/scratch/$PBS_O_LOGNAME.$PBS_JOBID} 163 151 164 152 #==================================================== 165 153 #- HOST_MPIRUN_COMMAND 166 154 typeset -r HOST_MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND:="time mpirun"} 167 168 #=========================================================169 #- Add "time" before mpirun command170 MPIRUN_COMMAND="time "${MPIRUN_COMMAND}171 echo ${MPIRUN_COMMAND}172 155 173 156 #==================================================== … … 201 184 #D-#================================================== 202 185 #D-function IGCM_sys_RshMaster 203 #D-* Purpose: Just a fake command to wrapp 204 #D- IGCM_card call in post-treatment 205 #D- Ulam do not see brodie filesystem 206 #D- Cesium do not see all mercure filesystem 207 #D- That's why we need this hack. 186 #D-* Purpose: Connection to frontend machine. 208 187 #D-* Examples: 209 188 #D- … … 246 225 #D-* Examples: 247 226 #D- 248 (( RshPNum = 0 ))249 227 function IGCM_sys_RshPost { 250 228 IGCM_debug_PushStack "IGCM_sys_RshPost" $@ … … 252 230 echo "IGCM_sys_RshPost :" $@ 253 231 fi 254 ssh obelix3 exec /bin/ksh $@ > out_RshPost.${RshPNum} 232 233 #echo cat tmp_IGCM_sys_RshPost_$$ INITIAL 234 #cat tmp_IGCM_sys_RshPost_$$ 235 # keep standard input (stdin) for the loop onto temporary file 236 cat >tmp_IGCM_sys_RshPost_$$ 237 238 # ============ FRONTEND START ============ # 239 240 ssh obelix3 exec /bin/ksh <tmp_IGCM_sys_RshPost_$$ 255 241 if [ $? -gt 0 ] ; then 256 242 echo "IGCM_sys_RshPost : erreur." 257 243 IGCM_debug_Exit "IGCM_sys_RshPost" 258 244 fi 259 (( RshPNum = RshPNum + 1 )) 245 # delete temporary file 246 \rm tmp_IGCM_sys_RshPost_$$ 260 247 IGCM_debug_PopStack "IGCM_sys_RshPost" 261 248 } … … 285 272 Job ended : ${DateEnd} 286 273 Output files are available in ${R_SAVE} 274 Files to be rebuild are temporarily available in ${REBUILD_DIR} 275 Pre-packed files are temporarily available in ${R_BUFR} 287 276 Script files, Script Outputs and Debug files (if necessary) are available in ${SUBMIT_DIR} 288 277 END_MAIL … … 461 450 462 451 #D-#================================================== 452 #D-function IGCM_sys_IsFileArchived 453 #D-* Purpose: Test file that must NOT EXISTS on Archive 454 #D-* Examples: 455 #D- 456 function IGCM_sys_IsFileArchived { 457 IGCM_debug_PushStack "IGCM_sys_IsFileArchived" $@ 458 if ( $DEBUG_sys ) ; then 459 echo "IGCM_sys_IsFileArchived :" $@ 460 fi 461 typeset IsArchivedFlag 462 # Never archived for this system 463 IsArchivedFlag=1 464 IGCM_debug_PopStack "IGCM_sys_IsFileArchived" 465 466 return ${IsArchivedFlag} 467 } 468 469 #D-#================================================== 463 470 #D-function IGCM_sys_TestFileArchive 464 471 #D-* Purpose: Test file that must NOT EXISTS on Archive … … 578 585 echo "IGCM_sys_Qsub :" $@ 579 586 fi 580 # /usr/local/bin/qsub -q short -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} < $1581 587 /usr/local/bin/qsub -q medium -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} < $1 582 588 if [ $? -gt 0 ] ; then … … 1263 1269 eval ${2}=${dateF[5]} 1264 1270 1265 1271 # donne la date filesys d'un fichier sur la machine work 1266 1272 IGCM_debug_PopStack "IGCM_sys_FichWork" 1267 1273 } … … 1350 1356 list_opt=$@ 1351 1357 1352 # Invert Axis : t,x -> x,t 1358 # Invert Axis : t,x -> x,t 1353 1359 # t,pres,x -> x,t,pres 1354 1360 # So that we can concatenate along x … … 1413 1419 # j3=${proc_stn[${iStation}]} 1414 1420 # Extract station 1415 # Invert Axis : t,x -> x,t 1421 # Invert Axis : t,x -> x,t 1416 1422 # t,pres,x -> x,t,pres 1417 1423 # So that we can concatenate along x … … 1456 1462 1457 1463 ############################################################ 1458 # Build run file1464 # Build MPI/OMP scripts run file (dummy function) 1459 1465 1460 1466 function IGCM_sys_build_run_file { … … 1737 1743 # NCO OPERATOR 1738 1744 1739 1740 1745 function IGCM_sys_ncap2 { 1741 1746 IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@ … … 1759 1764 \rm out_rsync 1760 1765 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1766 sleep $DELAI 1761 1767 else 1762 1768 \rm out_rsync … … 1795 1801 \rm out_rsync 1796 1802 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1803 sleep $DELAI 1797 1804 else 1798 1805 \rm out_rsync … … 1831 1838 \rm out_rsync 1832 1839 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1840 sleep $DELAI 1833 1841 else 1834 1842 \rm out_rsync … … 1867 1875 \rm out_rsync 1868 1876 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1877 sleep $DELAI 1869 1878 else 1870 1879 \rm out_rsync … … 1903 1912 \rm out_rsync 1904 1913 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1914 sleep $DELAI 1905 1915 else 1906 1916 \rm out_rsync … … 1939 1949 \rm out_rsync 1940 1950 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1951 sleep $DELAI 1941 1952 else 1942 1953 \rm out_rsync … … 1975 1986 \rm out_rsync 1976 1987 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1988 sleep $DELAI 1977 1989 else 1978 1990 \rm out_rsync … … 2011 2023 \rm out_rsync 2012 2024 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2025 sleep $DELAI 2013 2026 else 2014 2027 \rm out_rsync … … 2047 2060 \rm out_rsync 2048 2061 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2062 sleep $DELAI 2049 2063 else 2050 2064 \rm out_rsync … … 2083 2097 \rm out_rsync 2084 2098 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2099 sleep $DELAI 2085 2100 else 2086 2101 \rm out_rsync … … 2119 2134 \rm out_rsync 2120 2135 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2136 sleep $DELAI 2121 2137 else 2122 2138 \rm out_rsync … … 2155 2171 \rm out_rsync 2156 2172 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2173 sleep $DELAI 2157 2174 else 2158 2175 \rm out_rsync … … 2191 2208 \rm out_rsync 2192 2209 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2210 sleep $DELAI 2193 2211 else 2194 2212 \rm out_rsync
Note: See TracChangeset
for help on using the changeset viewer.