Ignore:
Timestamp:
01/08/12 17:21:05 (14 years ago)
Author:
mmamonski
Message:

handle job killing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pbs_drmaa/submit.c

    r53 r56  
    336336                if( wd != NULL ) 
    337337                        script_len += strlen("cd ") + strlen(wd) + strlen("; "); 
     338                script_len += strlen("touch ") + strlen(((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix) + strlen("/$PBS_JOBID.started;"); 
    338339                script_len += strlen(executable); 
    339340                if( argv != NULL ) 
     
    342343                if( input_path != NULL ) 
    343344                        script_len += strlen(" <") + strlen(input_path); 
    344                 if (((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix) 
    345                         script_len += strlen("; echo $? >") + strlen(((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix) + strlen("/$PBS_JOBID.exitcode"); 
     345 
     346                script_len += strlen("; echo $? >") + strlen(((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix) + strlen("/$PBS_JOBID.exitcode"); 
    346347         } 
    347348 
     
    353354                if( wd != NULL ) 
    354355                        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) 
    355357                s += sprintf( s, "%s", executable ); 
    356358                if( argv != NULL ) 
     
    359361                if( input_path != NULL ) 
    360362                        s += sprintf( s, " <%s", input_path ); 
    361                 if (((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix) 
    362                         s += sprintf( s, "; echo $? >%s/$PBS_JOBID.exitcode", ((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix); 
     363 
     364                s += sprintf( s, "; echo $? >%s/$PBS_JOBID.exitcode", ((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix); 
    363365 
    364366                fsd_assert( s == script+script_len ); 
Note: See TracChangeset for help on using the changeset viewer.