Changeset 1180 for trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh
- Timestamp:
- 03/30/15 17:18:46 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh
r1179 r1180 64 64 # Host and user names 65 65 # $hostname ou hostname 66 typeset 66 typeset HOST=${HOST:=$( hostname )} 67 67 # $username ou whoami 68 typeset 68 typeset LOGIN=${LOGIN:=$( whoami )} 69 69 # $hostname of the MASTER job 70 ntypeset -rMASTER=iitm0170 typeset MASTER=iitm01 71 71 72 72 #D- … … 86 86 87 87 #==================================================== 88 # S ource default environment88 # Set environment tools (ferret, nco, cdo, rebuild, ...) 89 89 #==================================================== 90 ##. /etc/profile 91 92 #==================================================== 93 # Set environment tools (ferret, nco, cdo) 94 #==================================================== 95 # Not applicable here 90 # Not applicable here. Only rebuild path 91 export export PATH=${PATH}:/gpfs1/home/sebastien/REBUILD/ 96 92 97 93 #==================================================== … … 100 96 101 97 #==================================================== 102 #- Mirror libIGCM from iitm to a post-processing machine98 #- MirrorlibIGCM for frontend 103 99 typeset -r MirrorlibIGCM=${MirrorlibIGCM:=false} 104 100 … … 137 133 138 134 #==================================================== 139 #- set PackDefault t rue on curie135 #- set PackDefault to false on iitm 140 136 PackDefault=false 141 137 … … 210 206 #D-#================================================== 211 207 #D-function IGCM_sys_RshMaster 212 #D-* Purpose: Just a fake command to wrapp 213 #D- IGCM_card call in post-treatment 214 #D- Ulam do not see brodie filesystem 215 #D- Cesium do not see all mercure filesystem 216 #D- That's why we need this hack. 208 #D-* Purpose: Connection to frontend machine. 217 209 #D-* Examples: 218 210 #D- 219 211 function IGCM_sys_RshMaster { 220 212 IGCM_debug_PushStack "IGCM_sys_RshMaster" $@ 221 /bin/ksh <<-EOF213 OUTCOMMAND_PATH=${OUTCOMMAND_PATH} /bin/ksh <<-EOF 222 214 export libIGCM=${libIGCM} 223 215 export DEBUG_debug=${DEBUG_debug} … … 252 244 253 245 #D-#================================================== 246 #D-function IGCM_sys_RshArchive_NoError 247 #D-* Purpose: Archive rsh command, without error 248 #D-* used only in monitoring.job 249 #D-* Examples: 250 #D- 251 function IGCM_sys_RshArchive_NoError { 252 IGCM_debug_PushStack "IGCM_sys_RshArchive_NoError" $@ 253 /bin/ksh <<-EOF 254 ${@} 2> /dev/null 255 EOF 256 IGCM_debug_PopStack "IGCM_sys_RshArchive_NoError" 257 } 258 259 #D-#================================================== 254 260 #D-function IGCM_sys_RshPost 255 261 #D-* Purpose: Post-process rsh command … … 261 267 echo "IGCM_sys_RshPost :" $@ 262 268 fi 263 264 # keep standard input to keep it for postpone if ulam don't answer 265 cat >/tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 266 267 /bin/ksh </tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 269 # keep standard input (stdin) for the loop onto temporary file 270 cat >${OUTCOMMAND_PATH}/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 271 272 OUTCOMMAND_PATH=${OUTCOMMAND_PATH} /bin/ksh <${OUTCOMMAND_PATH}/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 268 273 if [ $? -gt 0 ] ; then 269 274 echo "IGCM_sys_RshPost : erreur." … … 271 276 fi 272 277 # delete temporary file 273 \rm /tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME}278 \rm ${OUTCOMMAND_PATH}/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 274 279 275 280 IGCM_debug_PopStack "IGCM_sys_RshPost" … … 304 309 305 310 if [ ! -z ${config_UserChoices_MailName} ] ; then 306 mail x-s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt311 mail -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 307 312 elif [ -f ~/.forward ] ; then 308 mail x-s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt313 mail -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 309 314 else 310 mail x-s "${config_UserChoices_JobName} ${status}" ${USER} < mail.txt315 mail -s "${config_UserChoices_JobName} ${status}" ${USER} < mail.txt 311 316 fi 312 317 … … 353 358 fi 354 359 #- creation de repertoire sur le serveur fichier 355 mkdir -p $1 356 status=$? 357 358 if [ ${status} -gt 0 ] ; then 359 IGCM_debug_Print 2 "IGCM_sys_MkdirArchive : mkdir failed error code ${status}" 360 IGCM_debug_Exit "IGCM_sys_MkdirArchive" 360 if [ ! -d ${1} ]; then 361 \mkdir -p $1 362 status=$? 363 364 if [ ${status} -gt 0 ] ; then 365 IGCM_debug_Print 2 "IGCM_sys_MkdirArchive : mkdir failed error code ${status}" 366 IGCM_debug_Exit "IGCM_sys_MkdirArchive" 367 fi 361 368 fi 362 369 IGCM_debug_PopStack "IGCM_sys_MkdirArchive" … … 473 480 #D-#================================================== 474 481 #D-function IGCM_sys_IsFileArchived 475 #D-* Purpose: Test file that must NOT EXISTS on Archive 482 #D-* Purpose: Test file that must NOT EXISTS on Archive based on filename only 476 483 #D-* Examples: 477 484 #D- … … 920 927 fi 921 928 fi 922 923 929 IGCM_debug_PopStack "IGCM_sys_Mv" 924 930 } … … 1080 1086 1081 1087 if [ ${status} -gt 0 ] ; then 1082 echo"IGCM_sys_Put_Rest : cp failed error code ${status}"1088 IGCM_debug_Print 2 "IGCM_sys_Put_Rest : cp failed error code ${status}" 1083 1089 cat ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 1084 1090 IGCM_debug_Exit "IGCM_sys_Put_Rest" … … 1236 1242 i=0 1237 1243 while [ $i -lt $NB_ESSAI ] ; do 1238 # USUAL WAY 1239 \cp $1 $2 > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 1240 status=$? 1244 if [ $( stat -c %d $1 ) -ne $( stat -c %d $( dirname $2 ) ) ] ; then 1245 # USUAL WAY 1246 \cp $1 $2 > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 1247 status=$? 1248 else 1249 # NOT SO USUAL WAY 1250 \mv $1 $2 > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 1251 status=$? 1252 fi 1241 1253 if [ ${status} -gt 0 ]; then 1242 1254 IGCM_debug_Print 2 "IGCM_sys_PutBuffer_Out : cp failed error code ${status} ${i}/${NB_ESSAI}" … … 1507 1519 i=0 1508 1520 while [ $i -lt $NB_ESSAI ] ; do 1509 /gpfs1/home/sebastien/REBUILD/rebuild -f -o $@ > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&11521 rebuild -f -o $@ > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 1510 1522 status=$? 1511 1523 if [ ${status} -gt 0 ] ; then … … 1583 1595 # 0 118 110.0000000000000 87.46478873239437 1584 1596 # 1 40 4.999999999999995 51.97183098591550 1597 1585 1598 # typeset iStation iProc list_opt file_in file_out prefix_invert 1586 1599 # typeset -Z4 j4 … … 1778 1791 1779 1792 if ( ${OK_PARA_MPI} ) ; then 1780 1781 1793 (( mpi_count = 1 )) 1782 1794 until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do … … 1812 1824 1813 1825 if ( ${OK_PARA_MPI} ) ; then 1814 1815 1826 (( mpi_count = 1 )) 1816 1827 until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do … … 1841 1852 fi 1842 1853 1843 else # Only one executable. launch it. 1854 # Only one executable (SPMD mode). 1855 else 1844 1856 1845 1857 for comp in ${config_ListOfComponents[*]} ; do … … 2383 2395 if [ ${status} -gt 0 ] ; then 2384 2396 echo "IGCM_sys_ncrcat : ncrcat error" 2385 2397 #IGCM_debug_Exit "ncrcat" 2386 2398 fi 2387 2399
Note: See TracChangeset
for help on using the changeset viewer.