Changeset 282


Ignore:
Timestamp:
05/28/10 20:06:08 (14 years ago)
Author:
mmaipsl
Message:

MM, NVui, PC : correct obelix system.

File:
1 edited

Legend:

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

    r265 r282  
    6969# $username ou whoami 
    7070typeset  LOGIN=${LOGIN:=$( whoami )} 
    71 # $hostname of the MASTER job 
    72 typeset -r MASTER=obelix 
    7371 
    7472#D- 
     
    8078typeset -r RSYNC=/usr/bin/rsync 
    8179# RSYNC_opt args to rsync 
    82 typeset -r RSYNC_opt="-Lt -v" 
     80typeset -r RSYNC_opt="-va" 
    8381 
    8482#==================================================== 
     
    9391#- R_EXE   (==> BIN_DIR = ${MODIPSL}/bin ) 
    9492typeset -r R_EXE="${MODIPSL}/bin" 
    95  
    96 #==================================================== 
    97 #- libIGCM_POST 
    98 typeset -r libIGCM_POST=${libIGCM} 
    9993 
    10094#==================================================== 
     
    122116 
    123117#==================================================== 
     118#- libIGCM_POST 
     119typeset -r libIGCM_POST=${libIGCM} 
     120 
     121#==================================================== 
    124122#- IN 
    125123typeset -r R_IN=${R_IN:=/home/orchidee01/mmancip/IGCM} 
     
    127125#==================================================== 
    128126#- OUT 
    129 typeset -r R_OUT=${ARCHIVE}/${LOGIN}/IGCM_OUT 
     127typeset -r R_OUT=${ARCHIVE}/IGCM_OUT 
    130128 
    131129#==================================================== 
     
    156154#D-#================================================== 
    157155#D-function IGCM_sys_RshMaster 
    158 #D-* Purpose: Master rsh command 
     156#D-* Purpose: Just a fake command to wrapp 
     157#D-           IGCM_card call in post-treatment 
     158#D-           Ulam do not see brodie filesystem 
     159#D-           Cesium do not see all mercure filesystem 
     160#D-           That's why we need this hack. 
    159161#D-* Examples: 
    160162#D- 
    161163function IGCM_sys_RshMaster { 
    162164    IGCM_debug_PushStack "IGCM_sys_RshMaster" $@ 
    163     ssh ${HOST} /bin/ksh  <<-EOF 
     165 
     166    ssh ${HOST} exec /bin/ksh  <<-EOF 
    164167    export libIGCM=${libIGCM} 
    165168    export DEBUG_debug=${DEBUG_debug} 
     
    194197#D-#================================================== 
    195198#D-function IGCM_sys_RshPost 
    196 #D-* Purpose: Master rsh command 
     199#D-* Purpose: Post-process rsh command 
    197200#D-* Examples: 
    198201#D- 
     
    203206        echo "IGCM_sys_RshPost :" $@ 
    204207    fi 
    205     #ssh ${HOST} exec /bin/ksh -vx $@ > out_RshPost.${RshPNum} 
    206208    ssh obelix2 exec /bin/ksh $@ > out_RshPost.${RshPNum} 
    207209    if [ $? -gt 0 ] ; then 
     
    289291        fi 
    290292    fi 
    291 #    vérification ?? : 
    292     if [ ! -d ${1} ] ; then 
    293         echo "IGCM_sys_MkdirArchive : erreur." 
    294         IGCM_debug_Exit "IGCM_sys_MkdirArchive" 
    295     fi 
    296293    IGCM_debug_PopStack "IGCM_sys_MkdirArchive" 
    297294} 
     
    315312        fi 
    316313    fi 
    317     # vérification ?? : 
    318     if [ ! -d ${1} ] ; then 
    319         echo "IGCM_sys_MkdirWork : erreur." 
    320         IGCM_debug_Exit "IGCM_sys_MkdirWork" 
    321     fi 
    322314    IGCM_debug_PopStack "IGCM_sys_MkdirWork" 
    323315} 
    324 IGCM_sys_MkdirWork ${RUN_DIR_PATH} 
    325 echo "RUN_DIR_PATH ${RUN_DIR_PATH} ok." 
    326316 
    327317#D-#================================================== 
     
    349339#D- 
    350340function IGCM_sys_Chmod { 
    351     IGCM_debug_PushStack "IGCM_sys_Chmod" $@ 
     341    IGCM_debug_PushStack "IGCM_sys_Chmod" -- $@ 
    352342    if ( $DEBUG_sys ) ; then 
    353343        echo "IGCM_sys_Chmod :" $@ 
     
    514504#    /usr/local/bin/qsub -q short -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} < $1 
    515505    /usr/local/bin/qsub -q medium -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} < $1 
    516 #    /usr/local/bin/qsub -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} < $1 
    517     if [ $? -gt 0 ] ; then 
    518         echo "IGCM_sys_Qsub : erreur -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} $@." 
     506    if [ $? -gt 0 ] ; then 
     507        echo "IGCM_sys_Qsub : erreur." 
    519508        IGCM_debug_Exit "IGCM_sys_Qsub" 
    520509    fi 
     
    686675#D- 
    687676function IGCM_sys_Rm { 
    688     IGCM_debug_PushStack "IGCM_sys_Rm" $@ 
     677    IGCM_debug_PushStack "IGCM_sys_Rm" -- $@ 
    689678    if ( $DEBUG_sys ) ; then 
    690679        echo "IGCM_sys_Rm :" $@ 
     
    715704    if ( $DEBUG_sys ) ; then 
    716705        echo "IGCM_sys_RmRunDir :" $@ 
    717         echo "Dummy call, let the scheduler do that." 
    718 #       IGCM_sys_Rm -rf ${RUN_DIR} 
    719     fi 
     706    fi 
     707 
     708    typeset RET 
     709 
     710    echo rm $@ > out_rsync 2>&1 
     711    \rm $@ >> out_rsync 2>&1 
     712    RET=$? 
     713 
     714    if [ ${RET} -gt 0 ] ; then 
     715        echo "IGCM_sys_RmRunDir : error." 
     716        cat out_rsync 
     717        IGCM_debug_Exit "IGCM_sys_RmRunDir" 
     718    fi 
     719 
    720720    IGCM_debug_PopStack "IGCM_sys_RmRunDir" 
    721721} 
     
    860860#D-#================================================== 
    861861#D-function IGCM_sys_Put_Rest 
    862 #D-* Purpose: commande de transfert des restarts $(ARCHIVE). 
    863 #D-           Quitte si le fichier ou si le répertoire d'arriver n'existe pas. 
     862#D-* Purpose: Put computied restarts on $(ARCHIVE). 
     863#D-           File and target directory must exist. 
    864864#D-* Examples: 
    865865#D- 
     
    877877            IGCM_debug_Exit "IGCM_sys_Put_Rest" 
    878878        fi 
     879 
    879880        if [ X${JobType} = XRUN ] ; then 
    880881            IGCM_sys_Chmod 444 ${1} 
     
    10191020    fi 
    10201021    if [ $DRYRUN = 0 ]; then 
    1021         if [ ! -f ${1} ] ; then 
    1022             echo "WARNING : IGCM_sys_Put_Dods ${1} DOES NOT EXIST ." 
     1022        if [ ! -d ${R_SAVE}/${1} ] ; then 
     1023            echo "WARNING : IGCM_sys_Put_Dods ${R_SAVE}/${1} DOES NOT EXIST ." 
    10231024            IGCM_debug_PopStack "IGCM_sys_Put_Dods" 
    10241025            return 
     
    10591060    IGCM_debug_PopStack "IGCM_sys_FichArchive" 
    10601061} 
    1061  
    10621062 
    10631063############################################################## 
     
    12911291 
    12921292function IGCM_sys_build_run_file { 
    1293     IGCM_debug_PushStack "IGCM_sys_build_run_file" 
     1293    IGCM_debug_PushStack "IGCM_sys_build_run_file" $@ 
    12941294    if ( $DEBUG_sys ) ; then 
    12951295        echo "IGCM_sys_build_run_file" 
Note: See TracChangeset for help on using the changeset viewer.