Ignore:
Timestamp:
09/05/14 10:07:41 (11 years ago)
Author:
pkopta
Message:

job array of size 1 patch by E. V.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/slurm-drmaa-1.2.0/slurm_drmaa/session.c

    r38 r42  
    106106         { 
    107107        unsigned i; 
    108                 if( start != end ) 
    109                  { 
     108                if( start != end ) { 
    110109                        n_jobs = (end - start) / incr + 1; 
     110         } else { 
     111            n_jobs = 1; 
     112         } 
    111113 
    112                         fsd_calloc( job_ids, n_jobs+1, char* ); 
    113                         job_desc.array_inx = fsd_asprintf( "%d-%d:%d", start, end, incr ); 
    114          } 
     114        fsd_calloc( job_ids, n_jobs+1, char* ); 
     115 
     116                if ( start != 0 || end != 0 || incr != 0 ) { 
     117                job_desc.array_inx = fsd_asprintf( "%d-%d:%d", start, end, incr ); 
     118                } 
    115119 
    116120                connection_lock = fsd_mutex_lock( &self->drm_connection_mutex ); 
     
    125129                fsd_log_debug(("job %u submitted", submit_response->job_id)); 
    126130 
    127                 if( start != end ) 
    128                 { 
     131                if ( start != 0 || end != 0 || incr != 0 ) { 
    129132                        if ( SLURM_SUCCESS == slurm_load_job( &job_info, submit_response->job_id, 0) ) 
    130133                        { 
     
    145148                        } 
    146149                } else { 
    147                         fsd_calloc( job_ids, n_jobs+1, char* ); 
    148  
    149150                        job_ids[0] = fsd_asprintf( "%d", submit_response->job_id); /* .0*/ 
    150151 
Note: See TracChangeset for help on using the changeset viewer.