~ubuntu-branches/ubuntu/saucy/slurm-llnl/saucy

« back to all changes in this revision

Viewing changes to src/slurmctld/job_scheduler.c

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2008-12-03 11:56:28 UTC
  • mfrom: (1.1.8 upstream) (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20081203115628-93t417da6wkazmo5
Tags: 1.3.11-1
New upstream release 

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
 * RET number of entries in job_queue
84
84
 * NOTE: the buffer at *job_queue must be xfreed by the caller
85
85
 */
86
 
static int _build_user_job_list(uint32_t user_id,char* job_name,
 
86
static int _build_user_job_list(uint32_t user_id, char* job_name,
87
87
                                struct job_queue **job_queue)
88
88
{
89
89
        ListIterator job_iterator;
100
100
                xassert (job_ptr->magic == JOB_MAGIC);
101
101
                if (job_ptr->user_id != user_id)
102
102
                        continue;
103
 
                if (job_name && strcmp(job_name,job_ptr->name))
 
103
                if (job_name && job_ptr->name &&
 
104
                    strcmp(job_name, job_ptr->name))
104
105
                        continue;
105
106
                if (job_buffer_size <= job_queue_size) {
106
107
                        job_buffer_size += 200;
340
341
                job_ptr = job_queue[i].job_ptr;
341
342
                if (job_ptr->priority == 0)     /* held */
342
343
                        continue;
343
 
                if (!acct_policy_job_runnable(job_ptr))
344
 
                        continue;
 
344
 
345
345
                if (_failed_partition(job_ptr->part_ptr, failed_parts, 
346
346
                                      failed_part_cnt)) {
347
347
                        job_ptr->state_reason = WAIT_PRIORITY;
416
416
                        else
417
417
                                srun_allocate(job_ptr->job_id);
418
418
                        job_cnt++;
419
 
                } else if (error_code !=
420
 
                           ESLURM_REQUESTED_PART_CONFIG_UNAVAILABLE) {
 
419
                } else if ((error_code !=
 
420
                            ESLURM_REQUESTED_PART_CONFIG_UNAVAILABLE)
 
421
                           && (error_code != ESLURM_ACCOUNTING_POLICY)) {
421
422
                        info("schedule: JobId=%u non-runnable: %s",
422
423
                                job_ptr->job_id, 
423
424
                                slurm_strerror(error_code));
810
811
                if ((sep_ptr == NULL) && (job_id == 0)) {
811
812
                        job_id = strtol(tok, &sep_ptr, 10);
812
813
                        if ((sep_ptr == NULL) || (sep_ptr[0] != '\0') ||
813
 
                            (job_id <= 0) || (job_id == job_ptr->job_id)) {
 
814
                            (job_id < 0) || (job_id == job_ptr->job_id)) {
814
815
                                rc = EINVAL;
815
816
                                break;
816
817
                        }
846
847
                while (rc == SLURM_SUCCESS) {
847
848
                        job_id = strtol(sep_ptr, &sep_ptr2, 10);
848
849
                        if ((sep_ptr2 == NULL) || 
849
 
                            (job_id <= 0) || (job_id == job_ptr->job_id) ||
 
850
                            (job_id < 0) || (job_id == job_ptr->job_id) ||
850
851
                            ((sep_ptr2[0] != '\0') && (sep_ptr2[0] != ',') && 
851
852
                             (sep_ptr2[0] != ':'))) {
852
853
                                rc = EINVAL;