- Timestamp:
- 10/27/11 14:10:01 (13 years ago)
- Location:
- trunk/pbs_drmaa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pbs_drmaa/job.c
r29 r33 438 438 pbsdrmaa_session_t *pbssession = (pbsdrmaa_session_t*)self->session; 439 439 440 if( pbssession->pbs_home == NULL || pbssession->super.wait_thread_started ) 440 if( pbssession->pbs_home != NULL && pbssession->super.wait_thread_started ) 441 fsd_log_debug(("Job on missing but WT is running. Skipping...")); /* TODO: try to provide implementation that uses accounting/server log files */ 442 else 441 443 pbsdrmaa_job_on_missing_standard( self ); 442 else443 pbsdrmaa_job_on_missing_standard( self ); /* TODO: try to provide implementation that uses accounting/server log files */444 444 } 445 445 -
trunk/pbs_drmaa/log_reader.c
r32 r33 321 321 } 322 322 #ifndef PBS_PBS_PROFESSIONAL 323 else if (event_type == pbsdrmaa_event_0008 && strncmp(msg, "Job deleted", 11) )323 else if (event_type == pbsdrmaa_event_0008 && strncmp(msg, "Job deleted", 11) == 0) 324 324 #else 325 else if (event_type == pbsdrmaa_event_0008 && strncmp(msg, "Job to be deleted", 17) )325 else if (event_type == pbsdrmaa_event_0008 && strncmp(msg, "Job to be deleted", 17) == 0) 326 326 #endif 327 327 { … … 338 338 if (job->state < DRMAA_PS_RUNNING) 339 339 { 340 fsd_log_info((" Job %s killed before entering running state (%d).", job->job_id, job->state));340 fsd_log_info(("WT - Job %s killed before entering running state (%d).", job->job_id, job->state)); 341 341 attribs = pbsdrmaa_add_attr(attribs, PBSDRMAA_JOB_STATE, "C"); 342 342 attribs = pbsdrmaa_add_attr(attribs, PBSDRMAA_MTIME, timestamp_unix); … … 368 368 { 369 369 token[11] = '\0'; 370 attribs = pbsdrmaa_add_attr(attribs, token, token + 12);370 attribs = pbsdrmaa_add_attr(attribs, PBSDRMAA_EXIT_STATUS, token + 12); 371 371 fsd_log_info(("WT - Completion of job %s (Exit_status=%s) detected after %d seconds", job->job_id, token+12, (int)(time(NULL) - timestamp_time_t) )); 372 372 } … … 451 451 452 452 453 { /* poll on log file */ 454 struct timeval timeout_tv; 455 fd_set log_fds; 456 457 fsd_mutex_unlock( &self->session->mutex ); 458 459 FD_ZERO(&log_fds); 460 FD_SET(fileno(self->fhandle), &log_fds); 461 462 timeout_tv.tv_sec = 1; 463 timeout_tv.tv_usec = 0; 464 fsd_log_debug(("Polling log file for %d seconds", timeout_tv.tv_sec)); 465 /* ignore return value - the next get line call will handle IO errors */ 466 (void)select(1, &log_fds, NULL, NULL, &timeout_tv); 467 468 fsd_mutex_lock( &self->session->mutex ); 469 470 self->run_flag = self->session->wait_thread_run_flag; 471 } 453 454 fsd_mutex_unlock( &self->session->mutex ); 455 456 usleep(1500000); /* 500 ms - consider using inotify - but this would not work with NFS */ 457 458 fsd_mutex_lock( &self->session->mutex ); 459 460 self->run_flag = self->session->wait_thread_run_flag; 472 461 } 473 462 EXCEPT_DEFAULT -
trunk/pbs_drmaa/session.c
r29 r33 239 239 char errbuf[256] = "InternalError"; 240 240 (void)strerror_r(errno, errbuf, sizeof(errbuf)); 241 fsd_exc_raise_fmt(FSD_ERRNO_INTERNAL_ERROR,"stat error : %s",errbuf);241 fsd_exc_raise_fmt(FSD_ERRNO_INTERNAL_ERROR,"stat error on file %s: %s", log_path, errbuf); 242 242 } 243 243
Note: See TracChangeset
for help on using the changeset viewer.