Changeset 933


Ignore:
Timestamp:
08/21/13 17:10:51 (11 years ago)
Author:
sdipsl
Message:

properly remove RUN_DIR_PATH used by AA_job on curie. see #141
but add some check to be sure RUN_DIR_PATH do not point to important directory.
Indeed within AA_Job you can overwrite RUN_DIR_PATH and define something like this:
RUN_DIR_PATH=$SCRATCHDIR
You don't want to erase your $SCRATCHDIR don't you

Location:
trunk/libIGCM
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_config/libIGCM_config.ksh

    r922 r933  
    545545  IGCM_sys_check_quota 
    546546 
     547  # check to be sure that RUN_DIR_PATH, that will be removed is not pointing to an important directory 
     548  echo 
     549  IGCM_debug_Print 1 "Check where RUN_DIR_PATH variable is pointing to" 
     550  IGCM_sys_check_path 
     551 
     552 
    547553  IGCM_debug_PopStack "IGCM_config_Check" 
    548554} 
     
    13161322  # and command sent from .. directory. 
    13171323  IGCM_sys_Cd .. 
    1318   [ X${JobType} = XRUN ] && IGCM_sys_Rm -rf ${RUN_DIR} 
     1324  [ X${JobType} = XRUN ] && IGCM_sys_Rm -rf ${RUN_DIR_PATH} 
    13191325 
    13201326  IGCM_debug_PopStack "IGCM_config_Finalize" 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh

    r926 r933  
    19421942} 
    19431943 
    1944 ############################################################ 
    1945 # Check of space available on temporary filesytems. 
     1944#D-#================================================== 
     1945#D-function IGCM_sys_check_path 
     1946#D-* Purpose: check that RUN_DIR_PATH that will be removed on some machine 
     1947#D-* do not point to an important use directory. Stop immediately in that case. 
     1948#D-* Examples: 
     1949#D- 
     1950function IGCM_sys_check_path { 
     1951  IGCM_debug_PushStack "IGCM_sys_check_path" 
     1952  if ( $DEBUG_sys ) ; then 
     1953    echo "IGCM_sys_check_path" 
     1954  fi 
     1955 
     1956  if ( [ X${RUN_DIR_PATH} = X${HOME} ] || [ X${RUN_DIR_PATH} = X${WORKDIR} ] || [ X${RUN_DIR_PATH} = X${HOMEGAYA} ] ) ; then 
     1957    IGCM_debug_Print 1 "Variable RUN_DIR_PATH is pointing to an important directory : ${RUN_DIR_PATH}" 
     1958    IGCM_debug_Print 1 "Please check the RUN_DIR_PATH definition in your Job : Job_${config_UserChoices_JobName}" 
     1959    IGCM_debug_Exit "This will stop the job" ;; 
     1960  fi 
     1961  IGCM_debug_PopStack "IGCM_sys_check_path" 
     1962} 
    19461963 
    19471964#D-#================================================== 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh

    r926 r933  
    21542154} 
    21552155 
    2156 ############################################################ 
    2157 # Check of space available on temporary filesytems. 
     2156#D-#================================================== 
     2157#D-function IGCM_sys_check_path 
     2158#D-* Purpose: check that RUN_DIR_PATH that will be removed on some machine 
     2159#D-* do not point to an important use directory. Stop immediately in that case. 
     2160#D-* Examples: 
     2161#D- 
     2162function IGCM_sys_check_path { 
     2163  IGCM_debug_PushStack "IGCM_sys_check_path" 
     2164  if ( $DEBUG_sys ) ; then 
     2165    echo "IGCM_sys_check_path" 
     2166  fi 
     2167 
     2168  if ( [ X${RUN_DIR_PATH} = X${HOME} ] || [ X${RUN_DIR_PATH} = X${WORKDIR} ] || [ X${RUN_DIR_PATH} = X${SCRATCHDIR} ] || [ X${RUN_DIR_PATH} = X${CCCWORKDIR} ] || [ X${RUN_DIR_PATH} = X${CCCSTOREDIR} ] ) ; then 
     2169    IGCM_debug_Print 1 "Variable RUN_DIR_PATH is pointing to an important directory : ${RUN_DIR_PATH}" 
     2170    IGCM_debug_Print 1 "Please check the RUN_DIR_PATH definition in your Job : Job_${config_UserChoices_JobName}" 
     2171    IGCM_debug_Exit "This will stop the job" ;; 
     2172  fi 
     2173  IGCM_debug_PopStack "IGCM_sys_check_path" 
     2174} 
    21582175 
    21592176#D-#================================================== 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh

    r922 r933  
    18711871} 
    18721872 
    1873 ############################################################ 
    1874 # Check of space available on temporary filesytems. Dummy function here 
     1873#D-#================================================== 
     1874#D-function IGCM_sys_check_path 
     1875#D-* Purpose: check that RUN_DIR_PATH that will be removed on some machine 
     1876#D-* do not point to an important use directory. Stop immediately in that case. 
     1877#D-* Examples: 
     1878#D- 
     1879function IGCM_sys_check_path { 
     1880  IGCM_debug_PushStack "IGCM_sys_check_path" 
     1881  if ( $DEBUG_sys ) ; then 
     1882    echo "IGCM_sys_check_path" 
     1883  fi 
     1884 
     1885  if ( [ X${RUN_DIR_PATH} = X${HOME} ] || [ X${RUN_DIR_PATH} = X${ARCHIVE} ] ) ; then 
     1886    IGCM_debug_Print 1 "Variable RUN_DIR_PATH is pointing to an important directory : ${RUN_DIR_PATH}" 
     1887    IGCM_debug_Print 1 "Please check the RUN_DIR_PATH definition in your Job : Job_${config_UserChoices_JobName}" 
     1888    IGCM_debug_Exit "This will stop the job" ;; 
     1889  fi 
     1890  IGCM_debug_PopStack "IGCM_sys_check_path" 
     1891} 
    18751892 
    18761893#D-#================================================== 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh

    r922 r933  
    18081808} 
    18091809 
    1810 ############################################################ 
    1811 # Check of space available on temporary filesytems. Dummy function here 
     1810#D-#================================================== 
     1811#D-function IGCM_sys_check_path 
     1812#D-* Purpose: check that RUN_DIR_PATH that will be removed on some machine 
     1813#D-* do not point to an important use directory. Stop immediately in that case. 
     1814#D-* Examples: 
     1815#D- 
     1816function IGCM_sys_check_path { 
     1817  IGCM_debug_PushStack "IGCM_sys_check_path" 
     1818  if ( $DEBUG_sys ) ; then 
     1819    echo "IGCM_sys_check_path" 
     1820  fi 
     1821 
     1822  if ( [ X${RUN_DIR_PATH} = X${HOME} ] || [ X${RUN_DIR_PATH} = X${WORKDIR} ] || [ X${RUN_DIR_PATH} = X${ARCHIVE} ] ) ; then 
     1823    IGCM_debug_Print 1 "Variable RUN_DIR_PATH is pointing to an important directory : ${RUN_DIR_PATH}" 
     1824    IGCM_debug_Print 1 "Please check the RUN_DIR_PATH definition in your Job : Job_${config_UserChoices_JobName}" 
     1825    IGCM_debug_Exit "This will stop the job" ;; 
     1826  fi 
     1827  IGCM_debug_PopStack "IGCM_sys_check_path" 
     1828} 
    18121829 
    18131830#D-#================================================== 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh

    r923 r933  
    19001900} 
    19011901 
    1902 ############################################################ 
    1903 # Check of space available on temporary filesytems. Dummy function here 
     1902#D-#================================================== 
     1903#D-function IGCM_sys_check_path 
     1904#D-* Purpose: check that RUN_DIR_PATH that will be removed on some machine 
     1905#D-* do not point to an important use directory. Stop immediately in that case. 
     1906#D-* Examples: 
     1907#D- 
     1908function IGCM_sys_check_path { 
     1909  IGCM_debug_PushStack "IGCM_sys_check_path" 
     1910  if ( $DEBUG_sys ) ; then 
     1911    echo "IGCM_sys_check_path" 
     1912  fi 
     1913 
     1914  if ( [ X${RUN_DIR_PATH} = X${HOME} ] || [ X${RUN_DIR_PATH} = X${ARCHIVE} ] ) ; then 
     1915    IGCM_debug_Print 1 "Variable RUN_DIR_PATH is pointing to an important directory : ${RUN_DIR_PATH}" 
     1916    IGCM_debug_Print 1 "Please check the RUN_DIR_PATH definition in your Job : Job_${config_UserChoices_JobName}" 
     1917    IGCM_debug_Exit "This will stop the job" ;; 
     1918  fi 
     1919  IGCM_debug_PopStack "IGCM_sys_check_path" 
     1920} 
    19041921 
    19051922#D-#================================================== 
Note: See TracChangeset for help on using the changeset viewer.