Changeset 1180 for trunk


Ignore:
Timestamp:
03/30/15 17:18:46 (9 years ago)
Author:
sdipsl
Message:

house keeping in libIGCM_sys (third pass). Will ease #248 and #251

Location:
trunk/libIGCM/libIGCM_sys
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh

    r1179 r1180  
    8383# ie storage filesystem 
    8484typeset -r STOREHOST=ergon 
    85 typeset -r REMOTE_RSYNC=/u/rech/ces/rces452/RSYNC/bin/rsync 
     85typeset -r REMOTE_RSYNC=/usr/bin/rsync 
    8686 
    8787#==================================================== 
    88 # Set environment tools (ferret, nco, cdo) 
     88# Set environment tools (ferret, nco, cdo, rebuild, ...) 
    8989#==================================================== 
    9090source /smplocal/pub/Modules/default/init/ksh 
     
    136136 
    137137#==================================================== 
    138 #- set PackDefault true on ada 
     138#- set PackDefault to true on ada 
    139139PackDefault=true 
    140140 
     
    951951    fi 
    952952  fi 
    953  
    954953  IGCM_debug_PopStack "IGCM_sys_Mv" 
    955954} 
     
    13431342      i=0 
    13441343      while [ $i -lt $NB_ESSAI ] ; do 
    1345         # USUAL WAY 
    1346         \cp $1 $2 > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 
    1347         status=$? 
     1344        if [ $( stat -c %d $1 ) -ne $( stat -c %d $( dirname $2 ) ) ] ; then 
     1345          # USUAL WAY 
     1346          \cp $1 $2 > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 
     1347          status=$? 
     1348        else 
     1349          # NOT SO USUAL WAY 
     1350          \mv $1 $2 > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 
     1351          status=$? 
     1352        fi 
    13481353        if [ ${status} -gt 0 ]; then 
    13491354          IGCM_debug_Print 2 "IGCM_sys_PutBuffer_Out : cp failed error code ${status} ${i}/${NB_ESSAI}" 
     
    19952000    fi 
    19962001 
    1997   else # Only one executable. (SPMD mode). 
     2002  # Only one executable (SPMD mode). 
     2003  else 
    19982004 
    19992005    for comp in ${config_ListOfComponents[*]} ; do 
     
    20922098 
    20932099  eval ${3}=${ID} 
    2094  
    20952100  IGCM_debug_PopStack "IGCM_sys_GetJobID" 
    20962101} 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh

    r1179 r1180  
    8585# ie storage filesystem 
    8686typeset -r STOREHOST=${MASTER} 
     87typeset -r REMOTE_RSYNC=/usr/bin/rsync 
    8788 
    8889#==================================================== 
    89 # Set environment tools (ferret, nco, cdo) 
     90# Set environment tools (ferret, nco, cdo, rebuild, ...) 
    9091#==================================================== 
    9192if [ X${TaskType} = Xcomputing ] ; then 
     
    172173 
    173174#==================================================== 
    174 #- set PackDefault true on curie 
     175#- set PackDefault to true on curie 
    175176PackDefault=true 
    176177 
     
    10171018    fi 
    10181019  fi 
    1019  
    10201020  IGCM_debug_PopStack "IGCM_sys_Mv" 
    10211021} 
     
    10751075    DELAI=2 
    10761076 
    1077     # Only if we use rsync 
    1078     #IGCM_sys_TestDirArchive $( dirname $2 ) 
    10791077    # 
    10801078    # USUAL WAY 
     
    25212519 
    25222520  eval ${3}=${ID} 
    2523  
    25242521  IGCM_debug_PopStack "IGCM_sys_GetJobID" 
    25252522} 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh

    r1179 r1180  
    6464# Host and user names 
    6565# $hostname ou hostname 
    66 typeset  HOST=${HOST:=$( hostname )} 
     66typeset HOST=${HOST:=$( hostname )} 
    6767# $username ou whoami 
    68 typeset  LOGIN=${LOGIN:=$( whoami )} 
     68typeset LOGIN=${LOGIN:=$( whoami )} 
    6969# $hostname of the MASTER job 
    70 typeset MASTER=${HOST} 
     70typeset MASTER=${MASTER:=$( hostname )} 
    7171 
    7272#D- 
     
    8585 
    8686#==================================================== 
    87 # Set environment tools (ferret, nco, cdo) 
     87# Set environment tools (ferret, nco, cdo, rebuild, ...) 
    8888#==================================================== 
    8989#. /home/${LOGIN}/.atlas_env_${HOST}_ksh 
    90  
    91 export PATH=${PATH}:/home/jripsl/snapshot/Monitoring/CNClient/ 
     90#export PATH=${PATH}:/home/${LOGIN}/rebuild/bin/ 
    9291 
    9392#==================================================== 
     
    131130#- Max number of arguments passed to nco operator or demigration command 
    132131UNIX_MAX_LIMIT=360 
     132 
     133#==================================================== 
     134#- set PackDefault to false on obelix 
     135PackDefault=false 
    133136 
    134137#==================================================== 
     
    207210function IGCM_sys_RshMaster { 
    208211  IGCM_debug_PushStack "IGCM_sys_RshMaster" $@ 
    209   /bin/ksh <<-EOF 
     212  OUTCOMMAND_PATH=${OUTCOMMAND_PATH} /bin/ksh <<-EOF 
    210213    export libIGCM=${libIGCM} 
    211214    export DEBUG_debug=${DEBUG_debug} 
     
    264267  fi 
    265268  # 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} 
    269272  if [ $? -gt 0 ] ; then 
    270273    echo "IGCM_sys_RshPost : erreur." 
     
    272275  fi 
    273276  # delete temporary file 
    274   \rm /tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 
     277  \rm ${OUTCOMMAND_PATH}/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 
    275278  IGCM_debug_PopStack "IGCM_sys_RshPost" 
    276279} 
     
    304307 
    305308  if [ ! -z ${config_UserChoices_MailName} ] ; then 
    306     mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 
     309    mail -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 
    307310  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 
    309314  fi 
    310315 
     
    473478#D-#================================================== 
    474479#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 
    476481#D-* Examples: 
    477482#D- 
     
    556561  fi 
    557562 
    558   \ls -lR ${@} 
     563  \tree -f $@ 
    559564 
    560565  IGCM_debug_PopStack "IGCM_sys_Tree" 
     
    924929  fi 
    925930  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 
    931952 
    932953    if [ ${status} -gt 0 ] ; then 
     
    10331054 
    10341055    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}" 
    10361057      [ -f ${1} ] && ls -l ${1} 
    10371058      [ -f ${2} ] && ls -l ${2} 
     
    17191740    echo "IGCM_sys_build_execution_scripts " $@ 
    17201741  fi 
     1742 
    17211743  typeset nodes listnodes init_node start_num init_exec comp ExeNameIn ExeNameOut 
    17221744  typeset node_num_current node_current comp_proc_mpi_loc comp_proc_omp_loc 
    17231745  typeset num_corempi nombre_restant_node nombre_restant_comp 
    1724  
    1725   if [ ! -f ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} ]  ; then 
    1726     IGCM_debug_Exit "IGCM_sys_default build_execution_scripts : Job_${config_UserChoices_JobName} don't exist in SUBMIT_DIR : ${SUBMIT_DIR} " 
    1727   fi 
    17281746 
    17291747  if ( ${OK_PARA_MPMD} ) ; then 
     
    17621780      init_exec=n 
    17631781 
    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 
    17661786      for comp in ${config_ListOfComponents[*]} ; do 
    17671787 
     
    19651985 
    19661986      fi 
     1987 
    19671988    done 
    19681989 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh

    r1179 r1180  
    6464# Host and user names 
    6565# $hostname ou hostname 
    66 typeset  HOST=${HOST:=$( hostname )} 
     66typeset HOST=${HOST:=$( hostname )} 
    6767# $username ou whoami 
    68 typeset  LOGIN=${LOGIN:=$( whoami )} 
     68typeset LOGIN=${LOGIN:=$( whoami )} 
    6969# $hostname of the MASTER job 
    70 ntypeset -r MASTER=iitm01 
     70typeset MASTER=iitm01 
    7171 
    7272#D- 
     
    8686 
    8787#==================================================== 
    88 # Source default environment 
     88# Set environment tools (ferret, nco, cdo, rebuild, ...) 
    8989#==================================================== 
    90 ##. /etc/profile 
    91  
    92 #==================================================== 
    93 # Set environment tools (ferret, nco, cdo) 
    94 #==================================================== 
    95 # Not applicable here 
     90# Not applicable here. Only rebuild path 
     91export export PATH=${PATH}:/gpfs1/home/sebastien/REBUILD/ 
    9692 
    9793#==================================================== 
     
    10096 
    10197#==================================================== 
    102 #- Mirror libIGCM from iitm to a post-processing machine 
     98#- MirrorlibIGCM for frontend 
    10399typeset -r MirrorlibIGCM=${MirrorlibIGCM:=false} 
    104100 
     
    137133 
    138134#==================================================== 
    139 #- set PackDefault true on curie 
     135#- set PackDefault to false on iitm 
    140136PackDefault=false 
    141137 
     
    210206#D-#================================================== 
    211207#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. 
    217209#D-* Examples: 
    218210#D- 
    219211function IGCM_sys_RshMaster { 
    220212  IGCM_debug_PushStack "IGCM_sys_RshMaster" $@ 
    221   /bin/ksh <<-EOF 
     213  OUTCOMMAND_PATH=${OUTCOMMAND_PATH} /bin/ksh <<-EOF 
    222214    export libIGCM=${libIGCM} 
    223215    export DEBUG_debug=${DEBUG_debug} 
     
    252244 
    253245#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- 
     251function IGCM_sys_RshArchive_NoError { 
     252  IGCM_debug_PushStack "IGCM_sys_RshArchive_NoError" $@ 
     253  /bin/ksh <<-EOF 
     254    ${@} 2> /dev/null 
     255EOF 
     256  IGCM_debug_PopStack "IGCM_sys_RshArchive_NoError" 
     257} 
     258 
     259#D-#================================================== 
    254260#D-function IGCM_sys_RshPost 
    255261#D-* Purpose: Post-process rsh command 
     
    261267    echo "IGCM_sys_RshPost :" $@ 
    262268  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} 
    268273  if [ $? -gt 0 ] ; then 
    269274    echo "IGCM_sys_RshPost : erreur." 
     
    271276  fi 
    272277  # delete temporary file 
    273   \rm /tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 
     278  \rm ${OUTCOMMAND_PATH}/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 
    274279 
    275280  IGCM_debug_PopStack "IGCM_sys_RshPost" 
     
    304309 
    305310  if [ ! -z ${config_UserChoices_MailName} ] ; then 
    306     mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 
     311    mail -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 
    307312  elif [ -f ~/.forward ] ; then 
    308     mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 
     313    mail -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 
    309314  else 
    310     mailx -s "${config_UserChoices_JobName} ${status}" ${USER} < mail.txt 
     315    mail -s "${config_UserChoices_JobName} ${status}" ${USER} < mail.txt 
    311316  fi 
    312317 
     
    353358  fi 
    354359  #- 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 
    361368  fi 
    362369  IGCM_debug_PopStack "IGCM_sys_MkdirArchive" 
     
    473480#D-#================================================== 
    474481#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 
    476483#D-* Examples: 
    477484#D- 
     
    920927    fi 
    921928  fi 
    922  
    923929  IGCM_debug_PopStack "IGCM_sys_Mv" 
    924930} 
     
    10801086 
    10811087    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}" 
    10831089      cat ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
    10841090      IGCM_debug_Exit "IGCM_sys_Put_Rest" 
     
    12361242      i=0 
    12371243      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 
    12411253        if [ ${status} -gt 0 ]; then 
    12421254          IGCM_debug_Print 2 "IGCM_sys_PutBuffer_Out : cp failed error code ${status} ${i}/${NB_ESSAI}" 
     
    15071519  i=0 
    15081520  while [ $i -lt $NB_ESSAI ] ; do 
    1509     /gpfs1/home/sebastien/REBUILD/rebuild -f -o $@ > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 
     1521    rebuild -f -o $@ > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 
    15101522    status=$? 
    15111523    if [ ${status} -gt 0 ] ; then 
     
    15831595  #  0  118 110.0000000000000   87.46478873239437 
    15841596  #  1  40  4.999999999999995   51.97183098591550 
     1597 
    15851598#  typeset iStation iProc list_opt file_in file_out prefix_invert 
    15861599#  typeset -Z4 j4 
     
    17781791 
    17791792        if ( ${OK_PARA_MPI} ) ; then 
    1780  
    17811793          (( mpi_count = 1 )) 
    17821794          until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do 
     
    18121824 
    18131825        if ( ${OK_PARA_MPI} ) ; then 
    1814  
    18151826          (( mpi_count = 1 )) 
    18161827          until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do 
     
    18411852    fi 
    18421853 
    1843   else # Only one executable. launch it. 
     1854  # Only one executable (SPMD mode). 
     1855  else 
    18441856 
    18451857    for comp in ${config_ListOfComponents[*]} ; do 
     
    23832395  if [ ${status} -gt 0 ] ; then 
    23842396    echo "IGCM_sys_ncrcat : ncrcat error" 
    2385       #IGCM_debug_Exit "ncrcat" 
     2397    #IGCM_debug_Exit "ncrcat" 
    23862398  fi 
    23872399 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh

    r1179 r1180  
    6464# Host and user names 
    6565# $hostname ou hostname 
    66 typeset  HOST=${HOST:=$( hostname )} 
     66typeset HOST=${HOST:=$( hostname )} 
    6767# $username ou whoami 
    68 typeset  LOGIN=${LOGIN:=$( whoami )} 
     68typeset LOGIN=${LOGIN:=$( whoami )} 
    6969# $hostname of the MASTER job 
    7070typeset MASTER=${MASTER:=$( hostname )} 
     
    8585 
    8686#==================================================== 
    87 # Set environment tools (ferret, nco, cdo) 
     87# Set environment tools (ferret, nco, cdo, rebuild, ...) 
    8888#==================================================== 
    8989. /home/users/igcmg/.atlas_env_asterix_ksh 
     90export PATH=${PATH}:/home/users/igcmg/rebuild/bin/ 
    9091 
    9192#==================================================== 
     
    121122#- IN 
    122123typeset -r R_IN=${R_IN:=/home/orchideeshare/igcmg/IGCM} 
     124typeset -r R_IN_ECMWF=${R_IN_ECMWF:=/home/orchideeshare/igcmg/IGCM} 
    123125 
    124126#==================================================== 
     
    141143#- Max number of arguments passed to nco operator or demigration command 
    142144UNIX_MAX_LIMIT=360 
     145 
     146#==================================================== 
     147#- set PackDefault to false on obelix 
     148PackDefault=false 
    143149 
    144150#==================================================== 
     
    217223function IGCM_sys_RshMaster { 
    218224  IGCM_debug_PushStack "IGCM_sys_RshMaster" $@ 
    219   /bin/ksh <<-EOF 
     225  OUTCOMMAND_PATH=${OUTCOMMAND_PATH} /bin/ksh <<-EOF 
    220226    export libIGCM=${libIGCM} 
    221227    export DEBUG_debug=${DEBUG_debug} 
     
    274280  fi 
    275281  # keep standard input (stdin) for the loop onto temporary file 
    276   cat >/tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 
    277  
    278   /bin/ksh </tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 
     282  cat >${OUTCOMMAND_PATH}/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 
     283 
     284  OUTCOMMAND_PATH=${OUTCOMMAND_PATH} /bin/ksh <${OUTCOMMAND_PATH}/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 
    279285  if [ $? -gt 0 ] ; then 
    280286    echo "IGCM_sys_RshPost : erreur." 
     
    282288  fi 
    283289  # delete temporary file 
    284   \rm /tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 
     290  \rm ${OUTCOMMAND_PATH}/tmp_IGCM_sys_RshPost_$$_${LOGNAME} 
    285291  IGCM_debug_PopStack "IGCM_sys_RshPost" 
    286292} 
     
    314320 
    315321  if [ ! -z ${config_UserChoices_MailName} ] ; then 
    316     mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 
     322    mail -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < mail.txt 
    317323  elif [ -f ~/.forward ] ; then 
    318     mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 
     324    mail -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < mail.txt 
     325  else 
     326    mail -s "${config_UserChoices_JobName} ${status}" ${USER} < mail.txt 
    319327  fi 
    320328 
     
    483491#D-#================================================== 
    484492#D-function IGCM_sys_IsFileArchived 
    485 #D-* Purpose: Test file that must NOT EXISTS on Archive 
     493#D-* Purpose: Test file that must NOT EXISTS on Archive based on filename only 
    486494#D-* Examples: 
    487495#D- 
     
    624632  cat ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
    625633  if [ ${status} -gt 0 ] ; then 
    626     IGCM_debug_Print 2 "IGCM_sys_Qsub $1 : error code ${status}" 
     634    IGCM_debug_Print 2 "IGCM_sys_Qsub ${options} $1 : error code ${status}" 
    627635    IGCM_debug_Exit "IGCM_sys_Qsub" 
    628636  else 
     
    945953  fi 
    946954  if [ $DRYRUN = 0 ]; then 
    947     typeset status 
    948  
    949     #USUAL WAY 
    950     \cp -ur $1 $2 > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 
    951     status=$? 
     955    typeset NB_ESSAI DELAI status i 
     956    # number of tentative 
     957    NB_ESSAI=3 
     958    # time delay between tentative 
     959    DELAI=2 
     960 
     961    # 
     962    # USUAL WAY 
     963    i=0 
     964    while [ $i -lt $NB_ESSAI ] ; do 
     965      \cp -ur $1 $2 >> ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 
     966      status=$? 
     967      if [ ${status} -gt 0 ] ; then 
     968        IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed error code ${status} ${i}/${NB_ESSAI}" 
     969        IGCM_debug_Print 2 "IGCM_sys_Get_Dir : sleep ${DELAI} seconds and try again." 
     970        sleep $DELAI 
     971      else 
     972        break 
     973      fi 
     974      (( i = i + 1 )) 
     975    done 
    952976 
    953977    if [ ${status} -gt 0 ] ; then 
     
    10541078 
    10551079    if [ ${status} -gt 0 ] ; then 
    1056       echo "IGCM_sys_Put_Rest : cp failed error code ${status}" 
     1080      IGCM_debug_Print 2 "IGCM_sys_Put_Rest : cp failed error code ${status}" 
    10571081      [ -f ${1} ] && ls -l ${1} 
    10581082      [ -f ${2} ] && ls -l ${2} 
     
    15371561  i=0 
    15381562  while [ $i -lt $NB_ESSAI ] ; do 
    1539     /home/users/igcmg/rebuild/bin/rebuild -f -o $@ > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 
     1563    rebuild -f -o $@ > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 
    15401564    status=$? 
    15411565    if [ ${status} -gt 0 ] ; then 
     
    17401764    echo "IGCM_sys_build_execution_scripts " $@ 
    17411765  fi 
     1766 
    17421767  typeset nodes listnodes init_node start_num init_exec comp ExeNameIn ExeNameOut 
    17431768  typeset node_num_current node_current comp_proc_mpi_loc comp_proc_omp_loc 
    17441769  typeset num_corempi nombre_restant_node nombre_restant_comp 
    1745  
    1746   if [ ! -f ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} ]  ; then 
    1747     IGCM_debug_Exit "IGCM_sys_obelix build_execution_scripts : Job_${config_UserChoices_JobName} don't exist in SUBMIT_DIR : ${SUBMIT_DIR} " 
    1748   fi 
    17491770 
    17501771  if ( ${OK_PARA_MPMD} ) ; then 
     
    17831804      init_exec=n 
    17841805 
    1785       # Test : if oasis is there, we put it at the first position 
    1786  
     1806      # Build run_file 
     1807 
     1808      # First loop on the components for the coupler ie oasis (only if oasis3) 
     1809      # the coupler ie oasis3 must be the first one 
    17871810      for comp in ${config_ListOfComponents[*]} ; do 
    17881811 
     
    19862009 
    19872010      fi 
     2011 
    19882012    done 
    19892013 
Note: See TracChangeset for help on using the changeset viewer.