Changeset 1180 for trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh
- Timestamp:
- 03/30/15 17:18:46 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.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 typeset MASTER=${ HOST}70 typeset MASTER=${MASTER:=$( hostname )} 71 71 72 72 #D- … … 85 85 86 86 #==================================================== 87 # Set environment tools (ferret, nco, cdo )87 # Set environment tools (ferret, nco, cdo, rebuild, ...) 88 88 #==================================================== 89 89 #. /home/${LOGIN}/.atlas_env_${HOST}_ksh 90 91 export PATH=${PATH}:/home/jripsl/snapshot/Monitoring/CNClient/ 90 #export PATH=${PATH}:/home/${LOGIN}/rebuild/bin/ 92 91 93 92 #==================================================== … … 131 130 #- Max number of arguments passed to nco operator or demigration command 132 131 UNIX_MAX_LIMIT=360 132 133 #==================================================== 134 #- set PackDefault to false on obelix 135 PackDefault=false 133 136 134 137 #==================================================== … … 207 210 function IGCM_sys_RshMaster { 208 211 IGCM_debug_PushStack "IGCM_sys_RshMaster" $@ 209 /bin/ksh <<-EOF212 OUTCOMMAND_PATH=${OUTCOMMAND_PATH} /bin/ksh <<-EOF 210 213 export libIGCM=${libIGCM} 211 214 export DEBUG_debug=${DEBUG_debug} … … 264 267 fi 265 268 # keep standard input (stdin) for the loop onto temporary file 266 cat > /tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME}267 268 /bin/ksh </tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME}269 cat >${OUTCOMMAND_PATH}/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 270 271 OUTCOMMAND_PATH=${OUTCOMMAND_PATH} /bin/ksh <${OUTCOMMAND_PATH}/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 269 272 if [ $? -gt 0 ] ; then 270 273 echo "IGCM_sys_RshPost : erreur." … … 272 275 fi 273 276 # delete temporary file 274 \rm /tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME}277 \rm ${OUTCOMMAND_PATH}/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 275 278 IGCM_debug_PopStack "IGCM_sys_RshPost" 276 279 } … … 304 307 305 308 if [ ! -z ${config_UserChoices_MailName} ] ; then 306 mail x -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} <mail.txt309 mail -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 307 310 elif [ -f ~/.forward ] ; then 308 mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 311 mail -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 312 else 313 mail -s "${config_UserChoices_JobName} ${status}" ${USER} < mail.txt 309 314 fi 310 315 … … 473 478 #D-#================================================== 474 479 #D-function IGCM_sys_IsFileArchived 475 #D-* Purpose: Test file that must NOT EXISTS on Archive 480 #D-* Purpose: Test file that must NOT EXISTS on Archive based on filename only 476 481 #D-* Examples: 477 482 #D- … … 556 561 fi 557 562 558 \ ls -lR ${@}563 \tree -f $@ 559 564 560 565 IGCM_debug_PopStack "IGCM_sys_Tree" … … 924 929 fi 925 930 if [ $DRYRUN = 0 ]; then 926 typeset status 927 928 #USUAL WAY 929 \cp -ur $1 $2 > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 930 status=$? 931 typeset NB_ESSAI DELAI status i 932 # number of tentative 933 NB_ESSAI=3 934 # time delay between tentative 935 DELAI=2 936 937 # 938 # USUAL WAY 939 i=0 940 while [ $i -lt $NB_ESSAI ] ; do 941 \cp -ur $1 $2 >> ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 942 status=$? 943 if [ ${status} -gt 0 ] ; then 944 IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed error code ${status} ${i}/${NB_ESSAI}" 945 IGCM_debug_Print 2 "IGCM_sys_Get_Dir : sleep ${DELAI} seconds and try again." 946 sleep $DELAI 947 else 948 break 949 fi 950 (( i = i + 1 )) 951 done 931 952 932 953 if [ ${status} -gt 0 ] ; then … … 1033 1054 1034 1055 if [ ${status} -gt 0 ] ; then 1035 echo"IGCM_sys_Put_Rest : cp failed error code ${status}"1056 IGCM_debug_Print 2 "IGCM_sys_Put_Rest : cp failed error code ${status}" 1036 1057 [ -f ${1} ] && ls -l ${1} 1037 1058 [ -f ${2} ] && ls -l ${2} … … 1719 1740 echo "IGCM_sys_build_execution_scripts " $@ 1720 1741 fi 1742 1721 1743 typeset nodes listnodes init_node start_num init_exec comp ExeNameIn ExeNameOut 1722 1744 typeset node_num_current node_current comp_proc_mpi_loc comp_proc_omp_loc 1723 1745 typeset num_corempi nombre_restant_node nombre_restant_comp 1724 1725 if [ ! -f ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} ] ; then1726 IGCM_debug_Exit "IGCM_sys_default build_execution_scripts : Job_${config_UserChoices_JobName} don't exist in SUBMIT_DIR : ${SUBMIT_DIR} "1727 fi1728 1746 1729 1747 if ( ${OK_PARA_MPMD} ) ; then … … 1762 1780 init_exec=n 1763 1781 1764 # Test : if oasis is there, we put it at the first position 1765 1782 # Build run_file 1783 1784 # First loop on the components for the coupler ie oasis (only if oasis3) 1785 # the coupler ie oasis3 must be the first one 1766 1786 for comp in ${config_ListOfComponents[*]} ; do 1767 1787 … … 1965 1985 1966 1986 fi 1987 1967 1988 done 1968 1989
Note: See TracChangeset
for help on using the changeset viewer.