Changeset 29 for trunk/pbs_drmaa/job.c


Ignore:
Timestamp:
10/17/11 01:49:55 (13 years ago)
Author:
mmamonski
Message:

log reder reStructured

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pbs_drmaa/job.c

    r26 r29  
    5959pbsdrmaa_job_on_missing_standard( fsd_job_t *self ); 
    6060 
    61 void 
    62 pbsdrmaa_job_on_missing_log_based( fsd_job_t *self ); 
    63  
    6461static void 
    6562pbsdrmaa_job_update( fsd_job_t *self, struct batch_status* ); 
    66  
    67 bool 
    68 pbsdrmaa_job_update_status_accounting( fsd_job_t *self ); 
    6963 
    7064 
     
    254248                else if( self->state < DRMAA_PS_DONE ) 
    255249                 { 
    256 #ifndef PBS_PROFESSIONAL 
    257                         /*best effort call*/ 
    258                         if (pbsdrmaa_job_update_status_accounting(self) == false) 
    259                                 self->on_missing( self ); 
    260 #else 
    261250                        self->on_missing( self ); 
    262 #endif 
    263251                 } 
    264252         } 
     
    305293                                break; 
    306294                        case PBSDRMAA_ATTR_EXIT_STATUS: 
    307                                 exit_status = atoi( i->value ); 
     295                                exit_status = fsd_atoi( i->value ); 
    308296                                break; 
    309297                        case PBSDRMAA_ATTR_RESOURCES_USED: 
     
    453441                pbsdrmaa_job_on_missing_standard( self );        
    454442        else 
    455                 pbsdrmaa_job_on_missing_log_based( self );       
     443                pbsdrmaa_job_on_missing_standard( self ); /* TODO: try to provide implementation that uses accounting/server log files */ 
    456444} 
    457445 
     
    506494} 
    507495 
    508 void 
    509 pbsdrmaa_job_on_missing_log_based( fsd_job_t *self ) 
    510 { 
    511         fsd_drmaa_session_t *session = self->session; 
    512         pbsdrmaa_log_reader_t *log_reader = NULL; 
    513          
    514         fsd_log_enter(( "({job_id=%s})", self->job_id )); 
    515         fsd_log_info(( "Job %s missing from DRM queue", self->job_id )); 
    516          
    517         TRY 
    518         {        
    519                 log_reader = pbsdrmaa_log_reader_new( session, self); 
    520                 log_reader->read_log( log_reader );  
    521         } 
    522         FINALLY 
    523         { 
    524                 pbsdrmaa_log_reader_destroy( log_reader ); 
    525         } 
    526         END_TRY 
    527  
    528         fsd_log_return(( "; job_ps=%s, exit_status=%d", 
    529                                 drmaa_job_ps_to_str(self->state), self->exit_status ));  
    530 } 
    531  
    532 bool 
    533 pbsdrmaa_job_update_status_accounting( fsd_job_t *self ) 
    534 { 
    535         fsd_drmaa_session_t *session = self->session; 
    536         pbsdrmaa_log_reader_t *log_reader = NULL; 
    537         bool res = false; 
    538          
    539         fsd_log_enter(( "({job_id=%s})", self->job_id )); 
    540         fsd_log_info(( "Reading job %s info from accounting file", self->job_id )); 
    541          
    542         TRY 
    543         {        
    544                 log_reader = pbsdrmaa_log_reader_accounting_new( session, self); 
    545                 bool res = log_reader->read_log( log_reader );  
    546         } 
    547         FINALLY 
    548         { 
    549                 pbsdrmaa_log_reader_destroy( log_reader ); 
    550         } 
    551         END_TRY 
    552  
    553         fsd_log_return(("")); 
    554         return res; 
    555 } 
Note: See TracChangeset for help on using the changeset viewer.