Ignore:
Timestamp:
09/23/14 11:16:24 (10 years ago)
Author:
sdipsl
Message:
  • refactor archive and storage path definition. They can be defined using UserChoices? from config.card. Very easy now to decide where to store everything. There is a single place to look at : IGCM_sys_defineArchives. see #221
  • clean up IGCM_debug_PushStack arguments
File:
1 edited

Legend:

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

    r1046 r1057  
    117117 
    118118#==================================================== 
    119 #- ARCHIVE 
    120 typeset ARCHIVE=${ARCHIVE:=/home/${LOGIN}} 
    121  
    122 #==================================================== 
    123 #- STORAGE (dedicated to small/medium files) 
    124 typeset STORAGE=${ARCHIVE} 
    125  
    126 #==================================================== 
    127 #- R_OUT 
    128 typeset R_OUT=${ARCHIVE}/IGCM_OUT 
    129  
    130 #==================================================== 
    131 #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
    132 typeset R_FIG=${STORAGE}/IGCM_OUT 
    133  
    134 #==================================================== 
    135 #- R_BUF (ONLY FOR double copy an scratch) 
    136 typeset -r R_BUF=${STORAGE}/IGCM_OUT 
    137  
    138 #==================================================== 
    139119#- RUN_DIR_PATH : Temporary working directory (=> TMP) 
    140120typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${STORAGE}/RUN_DIR/tmp$$} 
     
    162142 
    163143#D-#================================================== 
    164 #D-function IGCM_sys_ChangeArchive 
    165 #D-* Purpose: Just a dummy call on this machine 
    166 #D-* Examples: 
    167 #D- 
    168 function IGCM_sys_ChangeArchive { 
    169   IGCM_debug_Print 1 " dummy function : IGCM_sys_ChangeArchive " 
     144#D-function IGCM_sys_defineArchives 
     145#D-* Purpose: 
     146#D-* Define ARCHIVE : Dedicated to large files 
     147#D-* Define STORAGE : Dedicated to small/medium files 
     148#D-* Define R_OUT   : Output tree located on ARCHIVE 
     149#D-* Define R_FIG   : Output tree located on STORAGE hosting figures (monitoring and atlas, and/or small files) 
     150#D-* Define R_BUF   : Output tree located on STORAGE hosting files waiting for rebuild or pack processes 
     151#D-* if SpaceName=TEST nothing special will hapen 
     152#D-* Examples: 
     153#D- 
     154function IGCM_sys_defineArchives { 
     155  IGCM_debug_PushStack "IGCM_sys_defineArchives" 
     156 
     157  if [ ! X${config_UserChoices_Archive} = X ]; then 
     158    #==================================================== 
     159    #- ARCHIVE (dedicated to large files) 
     160    typeset ARCHIVE=${config_UserChoices_Archive} 
     161  else 
     162    #==================================================== 
     163    #- ARCHIVE (dedicated to large files) 
     164    typeset ARCHIVE=${ARCHIVE:=/home/${LOGIN}} 
     165  fi 
     166 
     167  if [ ! X${config_UserChoices_Storage} = X ]; then 
     168    #==================================================== 
     169    #- STORAGE (dedicated to small/medium files) 
     170    typeset STORAGE=${config_UserChoices_Storage} 
     171  else 
     172    #==================================================== 
     173    #- STORAGE (dedicated to small/medium files) 
     174    typeset STORAGE=${ARCHIVE} 
     175  fi 
     176 
     177  # ON OBELIX NO SPECIAL CASE WHEN X${config_UserChoices_SpaceName} = XTEST 
     178 
     179  #==================================================== 
     180  #- R_OUT 
     181  typeset R_OUT=${ARCHIVE}/IGCM_OUT 
     182 
     183  #==================================================== 
     184  #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
     185  typeset R_FIG=${STORAGE}/IGCM_OUT 
     186 
     187  #==================================================== 
     188  #- R_BUF (ONLY FOR double copy an scratch) 
     189  typeset -r R_BUF=${STORAGE}/IGCM_OUT 
     190 
     191  IGCM_debug_Print 1 "R_OUT has been defined = ${R_OUT}" 
     192  IGCM_debug_Print 1 "R_BUF has been defined = ${R_BUF}" 
     193  IGCM_debug_Print 1 "R_FIG has been defined = ${R_FIG}" 
     194 
     195  IGCM_debug_PopStack "IGCM_sys_defineArchives" 
    170196} 
    171197 
     
    363389#D- 
    364390function IGCM_sys_Chmod { 
    365   IGCM_debug_PushStack "IGCM_sys_Chmod" -- $@ 
     391  IGCM_debug_PushStack "IGCM_sys_Chmod" $@ 
    366392  if ( $DEBUG_sys ) ; then 
    367393    echo "IGCM_sys_Chmod :" $@ 
     
    764790#D- 
    765791function IGCM_sys_Rm { 
    766   IGCM_debug_PushStack "IGCM_sys_Rm" -- $@ 
     792  IGCM_debug_PushStack "IGCM_sys_Rm" $@ 
    767793  if ( $DEBUG_sys ) ; then 
    768794    echo "IGCM_sys_Rm :" $@ 
     
    792818#D- 
    793819function IGCM_sys_RmRunDir { 
    794   IGCM_debug_PushStack "IGCM_sys_RmRunDir" -- $@ 
     820  IGCM_debug_PushStack "IGCM_sys_RmRunDir" $@ 
    795821  if ( $DEBUG_sys ) ; then 
    796822    echo "IGCM_sys_RmRunDir :" $@ 
     
    14081434#D- 
    14091435function IGCM_sys_rebuild { 
    1410   IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@ 
     1436  IGCM_debug_PushStack "IGCM_sys_rebuild" $@ 
    14111437  if ( $DEBUG_sys ) ; then 
    14121438    echo "IGCM_sys_rebuild :" $@ 
     
    14521478#D- 
    14531479function IGCM_sys_rebuild_station { 
    1454   IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 
     1480  IGCM_debug_PushStack "IGCM_sys_rebuild_station" $@ 
    14551481  typeset i list_opt file_in file_out prefix_invert list_invert 
    14561482  if ( $DEBUG_sys ) ; then 
     
    19311957#D- 
    19321958function IGCM_sys_ncap2 { 
    1933   IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@ 
     1959  IGCM_debug_PushStack "IGCM_sys_ncap2" $@ 
    19341960  if ( $DEBUG_sys ) ; then 
    19351961    echo "IGCM_sys_ncap2 :" $@ 
     
    19731999#D- 
    19742000function IGCM_sys_ncatted { 
    1975   IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@ 
     2001  IGCM_debug_PushStack "IGCM_sys_ncatted" $@ 
    19762002  if ( $DEBUG_sys ) ; then 
    19772003    echo "IGCM_sys_ncatted :" $@ 
     
    20152041#D- 
    20162042function IGCM_sys_ncbo { 
    2017   IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@ 
     2043  IGCM_debug_PushStack "IGCM_sys_ncbo" $@ 
    20182044  if ( $DEBUG_sys ) ; then 
    20192045    echo "IGCM_sys_ncbo :" $@ 
     
    20572083#D- 
    20582084function IGCM_sys_ncdiff { 
    2059   IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@ 
     2085  IGCM_debug_PushStack "IGCM_sys_ncdiff" $@ 
    20602086  if ( $DEBUG_sys ) ; then 
    20612087    echo "IGCM_sys_ncdiff :" $@ 
     
    20992125#D- 
    21002126function IGCM_sys_ncea { 
    2101   IGCM_debug_PushStack "IGCM_sys_ncea" -- $@ 
     2127  IGCM_debug_PushStack "IGCM_sys_ncea" $@ 
    21022128  if ( $DEBUG_sys ) ; then 
    21032129    echo "IGCM_sys_ncea :" $@ 
     
    21412167#D- 
    21422168function IGCM_sys_ncecat { 
    2143   IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@ 
     2169  IGCM_debug_PushStack "IGCM_sys_ncecat" $@ 
    21442170  if ( $DEBUG_sys ) ; then 
    21452171    echo "IGCM_sys_ncecat :" $@ 
     
    21832209#D- 
    21842210function IGCM_sys_ncflint { 
    2185   IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@ 
     2211  IGCM_debug_PushStack "IGCM_sys_ncflint" $@ 
    21862212  if ( $DEBUG_sys ) ; then 
    21872213    echo "IGCM_sys_ncflint :" $@ 
     
    22252251#D- 
    22262252function IGCM_sys_ncks { 
    2227   IGCM_debug_PushStack "IGCM_sys_ncks" -- $@ 
     2253  IGCM_debug_PushStack "IGCM_sys_ncks" $@ 
    22282254  if ( $DEBUG_sys ) ; then 
    22292255    echo "IGCM_sys_ncks :" $@ 
     
    22672293#D- 
    22682294function IGCM_sys_ncpdq { 
    2269   IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@ 
     2295  IGCM_debug_PushStack "IGCM_sys_ncpdq" $@ 
    22702296  if ( $DEBUG_sys ) ; then 
    22712297    echo "IGCM_sys_ncpdq :" $@ 
     
    23092335#D- 
    23102336function IGCM_sys_ncra { 
    2311   IGCM_debug_PushStack "IGCM_sys_ncra" -- $@ 
     2337  IGCM_debug_PushStack "IGCM_sys_ncra" $@ 
    23122338  if ( $DEBUG_sys ) ; then 
    23132339    echo "IGCM_sys_ncra :" $@ 
     
    23512377#D- 
    23522378function IGCM_sys_ncrcat { 
    2353   IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@ 
     2379  IGCM_debug_PushStack "IGCM_sys_ncrcat" $@ 
    23542380  if ( $DEBUG_sys ) ; then 
    23552381    echo "IGCM_sys_ncrcat :" $@ 
     
    24032429#D- 
    24042430function IGCM_sys_ncrename { 
    2405   IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@ 
     2431  IGCM_debug_PushStack "IGCM_sys_ncrename" $@ 
    24062432  if ( $DEBUG_sys ) ; then 
    24072433    echo "IGCM_sys_ncrename :" $@ 
     
    24452471#D- 
    24462472function IGCM_sys_ncwa { 
    2447   IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@ 
     2473  IGCM_debug_PushStack "IGCM_sys_ncwa" $@ 
    24482474  if ( $DEBUG_sys ) ; then 
    24492475    echo "IGCM_sys_ncwa :" $@ 
     
    24902516#D- 
    24912517function IGCM_sys_cdo { 
    2492   IGCM_debug_PushStack "IGCM_sys_cdo" -- $@ 
     2518  IGCM_debug_PushStack "IGCM_sys_cdo" $@ 
    24932519  if ( $DEBUG_sys ) ; then 
    24942520    echo "IGCM_sys_cdo :" $@ 
Note: See TracChangeset for help on using the changeset viewer.