Ignore:
Timestamp:
10/07/13 16:35:45 (11 years ago)
Author:
labetoulle
Message:

RunChecker? :

  • Introduction of getopts to process command line options
  • new option -r to check running simulations

(#131)

File:
1 edited

Legend:

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

    r948 r955  
    15351535    echo "IGCM_sys_GetDate_FichWork :" $@ 
    15361536  fi 
     1537 
     1538  if [ $# -ge 3 ] ; then 
     1539    mode=$3 
     1540    TimeStyle=$4 
     1541  else 
     1542    mode="default" 
     1543    TimeStyle="%Y%m%d%H%M%S" 
     1544  fi 
     1545 
    15371546  typeset dateF 
    1538   set +A dateF -- $( ls -l --full-time --time-style='+%Y%m%d%H%M%S' ${1} ) 
    1539   eval ${2}=${dateF[5]} 
     1547  set +A dateF -- $( ls -l --full-time --time-style=+"${TimeStyle}" ${1} ) 
     1548 
     1549  case $mode in 
     1550    "default") 
     1551      eval ${2}=${dateF[5]} 
     1552      ;; 
     1553    "SplitFields") 
     1554      eval ${2}="${dateF[5]}\ ${dateF[6]}" 
     1555      ;; 
     1556  esac 
     1557 
    15401558 
    15411559  # donne la date filesys d'un fichier sur la machine work 
     
    20182036} 
    20192037 
     2038#D-#================================================== 
     2039#D-function IGCM_sys_ListJobInQueue 
     2040#D-* Purpose: Check if job_name is currently 
     2041#D-  running or in queue 
     2042#D-* Examples: IGCM_sys_ListJobInQueue ${User} JobNameList 
     2043#D- 
     2044function IGCM_sys_ListJobInQueue { 
     2045  IGCM_debug_PushStack "IGCM_sys_ListJobInQueue" 
     2046  if ( $DEBUG_sys ) ; then 
     2047    echo "IGCM_sys_ListJobInQueue" 
     2048  fi 
     2049 
     2050  # With -f option, the full job name is given in the last column 
     2051  set -A JobList $( llq -u $1 -W -f %jn | gawk '( $1 != /TS/      && \ 
     2052                                                  $1 !~ /PACK/    && \ 
     2053                                                  $1 !~ /REBUILD/ && \ 
     2054                                                  $1 !~ /pack/ )     \ 
     2055                                                { print $1 }' | sed -e "s/\(.*\)\.[0-9]*/\1/" ) 
     2056 
     2057  eval set -A ${2} ${JobList[*]} 
     2058 
     2059  IGCM_debug_PopStack "IGCM_sys_ListJobInQueue" 
     2060} 
     2061 
    20202062############################################################## 
    20212063# NCO OPERATOR 
Note: See TracChangeset for help on using the changeset viewer.