Changeset 798


Ignore:
Timestamp:
02/18/13 12:39:14 (11 years ago)
Author:
sdipsl
Message:

Continue to track down SpaceName?=TEST implications at IDRIS

Location:
trunk/libIGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_TimeSeries_Checker

    r731 r798  
    275275                TestedFile=${config_UserChoices_JobName}_${ChunckDebut}_${ChunckFin}_${FlagDir}_${var}.nc 
    276276                # 
    277                 if [ -d ${DIRECTORY} ] ; then 
    278                   Candidat=$( find ${DIRECTORY} -name "${config_UserChoices_JobName}_${ChunckDebut}_*_${FlagDir}_${var}.nc" ) 
     277                IGCM_sys_TestDirArchive ${DIRECTORY} 
     278                if [ $? = 0 ] ; then 
     279                  Candidat=$( IGCM_sys_RshArchive "find ${DIRECTORY} -name "${config_UserChoices_JobName}_${ChunckDebut}_*_${FlagDir}_${var}.nc"" ) 
    279280                else 
    280281                  Candidat="" 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh

    r797 r798  
    226226function IGCM_sys_RshArchive { 
    227227  IGCM_debug_PushStack "IGCM_sys_RshArchive" $@ 
    228   rsh ${STOREHOST} exec /bin/ksh <<-EOF 
     228  DEBUG_sys=false IGCM_sys_IsFileArchived "$@" 
     229  if [ $? = 0 ] ; then 
     230    rsh ${STOREHOST} exec /bin/ksh <<-EOF 
    229231    ${@} 
    230232EOF 
    231   if [ $? -gt 0 ] ; then 
    232     echo "IGCM_sys_RshArchive : erreur." 
     233    status=$? 
     234  else 
     235    /bin/ksh <<-EOF 
     236    ${@} 
     237EOF 
     238    status=$? 
     239  fi 
     240  if [ ${status} -gt 0 ] ; then 
     241    IGCM_debug_Print 2 "IGCM_sys_RshArchive : rsh or command failed error code ${status}" 
    233242    IGCM_debug_Exit "IGCM_sys_RshArchive" 
    234243  fi 
     
    344353  fi 
    345354  #- creation de repertoire sur le serveur fichier 
    346   IGCM_sys_IsFileArchived $1 
     355  DEBUG_sys=false IGCM_sys_IsFileArchived $1 
    347356  if [ $? = 0 ] ; then 
    348357    rsh ${STOREHOST} -n mkdir -p $1 
     
    468477  typeset ExistFlag 
    469478  #Command depends on targeted file system 
    470   IGCM_sys_IsFileArchived $1 
     479  DEBUG_sys=false IGCM_sys_IsFileArchived $1 
    471480  if [ $? = 0 ] ; then 
    472481    ExistFlag=$( IGCM_sys_RshArchive "[ -d $1 ] && echo 0 || echo 1" ) 
     
    489498  fi 
    490499  typeset IsArchivedFlag 
    491   IsArchivedFlag=$( [ X$( echo $1 | grep ^\/u\/rech ) != X ] && echo 0 || echo 1 ) 
     500  IsArchivedFlag=$( [ "X$( echo $1 | grep \/u\/rech )" != "X" ] && echo 0 || echo 1 ) 
    492501  IGCM_debug_PopStack "IGCM_sys_IsFileArchived" 
    493502 
     
    504513  typeset ExistFlag 
    505514  #Command depends on targeted file system 
    506   IGCM_sys_IsFileArchived $1 
     515  #We want it quiet 
     516  DEBUG_sys=false IGCM_sys_IsFileArchived $1 
    507517  if [ $? = 0 ] ; then 
    508518    ExistFlag=$( IGCM_sys_RshArchive "[ -f $1 ] && echo 0 || echo 1" ) 
     
    537547  IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@ 
    538548  #Command depends on targeted file system 
    539   IGCM_sys_IsFileArchived $1 
     549  DEBUG_sys=false IGCM_sys_IsFileArchived $1 
    540550  if [ $? = 0 ] ; then 
    541551    IGCM_sys_RshArchive "ls ${@} 2>/dev/null | wc -l" 
     
    947957    # 
    948958    #Command depends on targeted file system 
    949     IGCM_sys_IsFileArchived $2 
     959    DEBUG_sys=false IGCM_sys_IsFileArchived $2 
    950960    if [ $? = 0 ] ; then 
    951961      \rcp -r $1 ${STOREHOST}:$2 > out_rsync 2>&1 
     
    9961006    # 
    9971007    # Command depends on targeted filesystem 
    998     IGCM_sys_IsFileArchived $1 
     1008    DEBUG_sys=false IGCM_sys_IsFileArchived $1 
    9991009    if [ $? = 0 ] ; then 
    10001010      # add dmget (to demigrate all offline files) to reduce time of this command : 
     
    11181128    # 
    11191129    #Command depends on targeted file system 
    1120     IGCM_sys_IsFileArchived $2 
     1130    DEBUG_sys=false IGCM_sys_IsFileArchived $2 
    11211131    if [ $? = 0 ] ; then 
    11221132      mfput $1 $2 > out_rsync 2>&1 
     
    12281238    # 
    12291239    #Command depends on targeted file system 
    1230     IGCM_sys_IsFileArchived $2 
     1240    DEBUG_sys=false IGCM_sys_IsFileArchived $2 
    12311241    if [ $? = 0 ] ; then 
    12321242      mfput $1 $2 > out_rsync 2>&1 
     
    13801390 
    13811391    # test if the (first) file is present in the old computation : 
    1382     IGCM_sys_IsFileArchived ${dm_liste[0]} 
     1392    DEBUG_sys=false IGCM_sys_IsFileArchived ${dm_liste[0]} 
    13831393    if [ $? = 0 ] ; then 
    13841394      IGCM_sys_TestFileArchive ${dm_liste[0]} 
    13851395      status=$? 
    13861396    else 
    1387       IGCM_sys_TestFile ${dm_liste[0]} 
     1397      IGCM_sys_TestFileBuffer ${dm_liste[0]} 
    13881398      status=$? 
    13891399    fi 
     
    13961406 
    13971407    #Command depends on targeted file system 
    1398     IGCM_sys_IsFileArchived ${dm_liste[0]} 
     1408    DEBUG_sys=false IGCM_sys_IsFileArchived ${dm_liste[0]} 
    13991409    if [ $? = 0 ] ; then 
    14001410      mfget ${dm_liste[*]} ${DEST} > out_rsync 2>&1 
Note: See TracChangeset for help on using the changeset viewer.