Ignore:
Timestamp:
04/22/14 16:14:49 (11 years ago)
Author:
pkopta
Message:

Michael Gutteridge <michael.gutteridge@…> patch for "mincpus" calculations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/slurm_drmaa/session.c

    r13 r35  
    9393        fsd_job_t *volatile job = NULL; 
    9494        char **volatile job_ids = NULL; 
    95         unsigned n_jobs = 0; 
     95        unsigned n_jobs = 1; 
    9696        volatile bool connection_lock = false; 
    9797        fsd_environ_t *volatile env = NULL; 
     
    103103 
    104104                if( start != end ) 
    105                         n_jobs = (end - start) / incr + 1; 
    106                 else  
    107                         n_jobs = 1;      
    108  
    109                 if(  start != end ) 
    110105                 { 
    111106                        unsigned idx, i; 
     107 
     108                        n_jobs = (end - start) / incr + 1; 
    112109 
    113110                        fsd_calloc( job_ids, n_jobs+1, char* ); 
     
    125122                                connection_lock = fsd_mutex_unlock( &self->drm_connection_mutex ); 
    126123 
    127  
    128124                                job_ids[i] = fsd_asprintf("%d",submit_response->job_id); /*TODO  */ 
    129125 
     
    140136                 { 
    141137                        fsd_calloc( job_ids, n_jobs+1, char* ); 
    142                          
     138 
    143139                        connection_lock = fsd_mutex_lock( &self->drm_connection_mutex ); 
    144140                        slurmdrmaa_job_create_req( self, jt, (fsd_environ_t**)&env , &job_desc, 0); 
     
    148144                        } 
    149145 
     146                        connection_lock = fsd_mutex_unlock( &self->drm_connection_mutex ); 
     147 
    150148                        fsd_log_debug(("job %u submitted", submit_response->job_id));          
    151                         connection_lock = fsd_mutex_unlock( &self->drm_connection_mutex ); 
    152149                         
    153150                        job_ids[0] = fsd_asprintf( "%d", submit_response->job_id); /* .0*/ 
Note: See TracChangeset for help on using the changeset viewer.