Changeset 29 for trunk/pbs_drmaa/job.c
- Timestamp:
- 10/17/11 01:49:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pbs_drmaa/job.c
r26 r29 59 59 pbsdrmaa_job_on_missing_standard( fsd_job_t *self ); 60 60 61 void62 pbsdrmaa_job_on_missing_log_based( fsd_job_t *self );63 64 61 static void 65 62 pbsdrmaa_job_update( fsd_job_t *self, struct batch_status* ); 66 67 bool68 pbsdrmaa_job_update_status_accounting( fsd_job_t *self );69 63 70 64 … … 254 248 else if( self->state < DRMAA_PS_DONE ) 255 249 { 256 #ifndef PBS_PROFESSIONAL257 /*best effort call*/258 if (pbsdrmaa_job_update_status_accounting(self) == false)259 self->on_missing( self );260 #else261 250 self->on_missing( self ); 262 #endif263 251 } 264 252 } … … 305 293 break; 306 294 case PBSDRMAA_ATTR_EXIT_STATUS: 307 exit_status = atoi( i->value );295 exit_status = fsd_atoi( i->value ); 308 296 break; 309 297 case PBSDRMAA_ATTR_RESOURCES_USED: … … 453 441 pbsdrmaa_job_on_missing_standard( self ); 454 442 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 */ 456 444 } 457 445 … … 506 494 } 507 495 508 void509 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 TRY518 {519 log_reader = pbsdrmaa_log_reader_new( session, self);520 log_reader->read_log( log_reader );521 }522 FINALLY523 {524 pbsdrmaa_log_reader_destroy( log_reader );525 }526 END_TRY527 528 fsd_log_return(( "; job_ps=%s, exit_status=%d",529 drmaa_job_ps_to_str(self->state), self->exit_status ));530 }531 532 bool533 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 TRY543 {544 log_reader = pbsdrmaa_log_reader_accounting_new( session, self);545 bool res = log_reader->read_log( log_reader );546 }547 FINALLY548 {549 pbsdrmaa_log_reader_destroy( log_reader );550 }551 END_TRY552 553 fsd_log_return((""));554 return res;555 }
Note: See TracChangeset
for help on using the changeset viewer.