Ignore:
Timestamp:
01/18/13 11:24:04 (11 years ago)
Author:
labetoulle
Message:

RunChecker? for IDRIS :

  • replace ccc_home by ${HOME} ;
  • create IGCM_sys_CountJobInQueue function.
  • Replace all occurences of awk by gawk.
File:
1 edited

Legend:

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

    r767 r768  
    26432643  IGCM_debug_PopStack "IGCM_sys_cdo" 
    26442644} 
     2645 
     2646#D-#================================================== 
     2647#D-function IGCM_sys_CountJobInQueue 
     2648#D-* Purpose: Check if job_name is currently  
     2649#D-  running or in queue 
     2650#D-* Examples: IGCM_sys_CountJobInQueue ${JobName} NbRun 
     2651#D- 
     2652 
     2653function IGCM_sys_CountJobInQueue { 
     2654  IGCM_debug_PushStack "IGCM_sys_CountJobInQueue" 
     2655  if ( $DEBUG_sys ) ; then 
     2656    echo "IGCM_sys_CountJobInQueue" 
     2657  fi 
     2658 
     2659  #NbRun=$( ccc_mstat -f | grep -c ${JobName} ) 
     2660 
     2661  # With -f option, the full job name is given in the last column 
     2662  NbRun=$( ccc_mstat -f | gawk -v JobName=$1 'BEGIN { x=0 } ($NF~String) { x=x+1 } END { print x }' ) 
     2663 
     2664  eval ${2}=${NbRun} 
     2665 
     2666  IGCM_debug_PopStack "IGCM_sys_CountJobInQueue" 
     2667} 
     2668 
Note: See TracChangeset for help on using the changeset viewer.