Changeset 62


Ignore:
Timestamp:
01/10/12 09:58:12 (8 years ago)
Author:
mmamonski
Message:

Log missing time

Location:
trunk/pbs_drmaa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/pbs_drmaa/job.c

    r57 r62  
    6868        self->super.update_status = pbsdrmaa_job_update_status; 
    6969        self->super.on_missing = pbsdrmaa_job_on_missing; 
     70        self->missing_time = 0; 
    7071        self->update = pbsdrmaa_job_update; 
    7172        return (fsd_job_t*)self; 
     
    471472{ 
    472473        pbsdrmaa_session_t *pbssession = (pbsdrmaa_session_t*)self->session; 
    473  
    474         if( pbssession->pbs_home != NULL && pbssession->super.wait_thread_started && self->submit_time) 
     474        pbsdrmaa_job_t *pbsself = (pbsdrmaa_job_t *)self; 
     475         
     476        if (!pbsself->missing_time) 
     477         { 
     478                pbsself->missing_time = time(NULL); 
     479         } 
     480 
     481        fsd_log_info(("pbsdrmaa_job_on_missing: pbs_home=%s, wait_thread_started=%d, submit_time=%d, missing_time=%d",  
     482                pbssession->pbs_home,  
     483                pbssession->super.wait_thread_started,  
     484                self->submit_time,  
     485                pbsself->missing_time)); 
     486         
     487        #define DRMAA_MAX_MISSING_TIME (30) 
     488        if( pbssession->pbs_home != NULL && pbssession->super.wait_thread_started && self->submit_time && (time(NULL) - pbsself->missing_time < DRMAA_MAX_MISSING_TIME)) 
    475489                fsd_log_info(("Job on missing but WT is running. Skipping...")); /* TODO: try to provide implementation that uses accounting/server log files */ 
    476490        else 
  • trunk/pbs_drmaa/job.h

    r54 r62  
    3737struct pbsdrmaa_job_s { 
    3838        fsd_job_t super; 
     39        time_t missing_time; /* The time when job was seen as missing for the first time */ 
    3940 
    4041        void (* 
Note: See TracChangeset for help on using the changeset viewer.