Changeset 57


Ignore:
Timestamp:
01/08/12 17:38:24 (12 years ago)
Author:
mmamonski
Message:

on site fixies

Location:
trunk/pbs_drmaa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/pbs_drmaa/job.c

    r56 r57  
    2626#include <string.h> 
    2727#include <unistd.h> 
     28#include <sys/stat.h> 
    2829 
    2930#include <drmaa_utils/drmaa.h> 
     
    508509pbsdrmaa_job_read_exit_status( const char *job_id, const char *job_state_dir_prefix) 
    509510{ 
    510         char *status_file = NULL, start_file = NULL; 
     511        char *status_file = NULL, *start_file = NULL; 
    511512        FILE *fhandle = NULL; 
    512513        int exit_status = -1; 
     
    515516 
    516517        status_file = fsd_asprintf("%s/%s.exitcode", job_state_dir_prefix, job_id); 
    517         start_file = fsd_asprintf("%s/%s.started", job_id, job_state_dir_prefix); 
     518        start_file = fsd_asprintf("%s/%s.started", job_state_dir_prefix, job_id); 
    518519 
    519520        if ((fhandle = fopen(status_file, "r")) == NULL) 
     
    525526                 { 
    526527                        exit_status = 143; /* SIGTERM */ 
    527                         fsd_log_info("But start file exist %s. Assuming that job was killed (exit_status=%d).", start_file, exit_status); 
    528                  } 
     528                        fsd_log_info(("But start file exist %s. Assuming that job was killed (exit_status=%d).", start_file, exit_status)); 
     529                 } 
     530                else 
     531                 { 
     532                        fsd_log_error(("Start file not found: %s", start_file)); 
     533                 } 
     534         
     535 
    529536         } 
    530537        else 
  • trunk/pbs_drmaa/submit.c

    r56 r57  
    354354                if( wd != NULL ) 
    355355                        s += sprintf( s, "cd %s; ", wd ); 
    356                 s += sprintf( s, "touch %s/$PBS_JOBID.started;", ((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix) 
     356                s += sprintf( s, "touch %s/$PBS_JOBID.started;", ((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix); 
    357357                s += sprintf( s, "%s", executable ); 
    358358                if( argv != NULL ) 
Note: See TracChangeset for help on using the changeset viewer.