~ubuntu-branches/ubuntu/vivid/slurm-llnl/vivid

« back to all changes in this revision

Viewing changes to src/api/allocate.c

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2009-09-24 23:28:15 UTC
  • mfrom: (1.1.11 upstream) (3.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090924232815-enh65jn32q1ebg07
Tags: 2.0.5-1
* New upstream release 
* Changed dependecy from lib-mysqlclient15 to lib-mysqlclient 
* Added Default-Start for runlevel 2 and 4 and $remote_fs requirement in
  init.d scripts (Closes: #541252)
* Postinst checks for wrong runlevels 2 and 4 links
* Upgraded to standard version 3.8.3
* Add lintian overrides for missing slurm-llnl-configurator.html in doc
  base registration
* modified postrm scripts to ignore pkill return value in order to avoid
  postrm failure when no slurm process is running
* Checking for slurmctld.pid before cancelling running and pending
  jobs during package removal 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************\
2
2
 *  allocate.c - allocate nodes for a job or step with supplied contraints
3
 
 *  $Id: allocate.c 14992 2008-09-05 20:10:34Z da $
 
3
 *  $Id: allocate.c 18263 2009-07-30 19:09:07Z da $
4
4
 *****************************************************************************
5
 
 *  Copyright (C) 2002 The Regents of the University of California.
 
5
 *  Copyright (C) 2002-2007 The Regents of the University of California.
 
6
 *  Copyright (C) 2008-2009 Lawrence Livermore National Security.
6
7
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
7
8
 *  Written by Morris Jette <jette1@llnl.gov>.
8
 
 *  LLNL-CODE-402394.
 
9
 *  CODE-OCEC-09-009. All rights reserved.
9
10
 *  
10
11
 *  This file is part of SLURM, a resource management program.
11
 
 *  For details, see <http://www.llnl.gov/linux/slurm/>.
 
12
 *  For details, see <https://computing.llnl.gov/linux/slurm/>.
 
13
 *  Please also read the included file: DISCLAIMER.
12
14
 *  
13
15
 *  SLURM is free software; you can redistribute it and/or modify it under
14
16
 *  the terms of the GNU General Public License as published by the Free
251
253
                        /* yes, allocation has been granted */
252
254
                        errno = SLURM_PROTOCOL_SUCCESS;
253
255
                } else if (!req->immediate) {
254
 
                        if(resp->error_code != SLURM_SUCCESS) 
 
256
                        if (resp->error_code != SLURM_SUCCESS) 
255
257
                                info("%s", slurm_strerror(resp->error_code));
256
258
                        /* no, we need to wait for a response */
257
259
                        job_id = resp->job_id;
262
264
                                                             timeout);
263
265
                        /* If NULL, we didn't get the allocation in 
264
266
                           the time desired, so just free the job id */
265
 
                        if (resp == NULL && errno != ESLURM_ALREADY_DONE) {
 
267
                        if ((resp == NULL) && (errno != ESLURM_ALREADY_DONE)) {
266
268
                                errnum = errno;
267
269
                                slurm_complete_job(job_id, -1);
268
270
                        }
315
317
                slurm_make_time_str(&will_run_resp->start_time,
316
318
                                    buf, sizeof(buf));
317
319
                info("Job %u to start at %s using %u processors on %s",
318
 
                        will_run_resp->job_id, buf,
319
 
                        will_run_resp->proc_cnt,
320
 
                        will_run_resp->node_list);
 
320
                     will_run_resp->job_id, buf,
 
321
                     will_run_resp->proc_cnt,
 
322
                     will_run_resp->node_list);
321
323
                slurm_free_will_run_response_msg(will_run_resp);
322
324
                break;
323
325
        default:
717
719
                        case EINTR:
718
720
                                *resp = NULL;
719
721
                                return -1;
 
722
                        case EBADF:
720
723
                        case ENOMEM:
721
724
                        case EINVAL:
722
725
                        case EFAULT: