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

« back to all changes in this revision

Viewing changes to src/api/partition_info.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:
5
5
 *  Copyright (C) 2008 Lawrence Livermore National Security.
6
6
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
7
7
 *  Written by Morris Jette <jette1@llnl.gov> et. al.
8
 
 *  LLNL-CODE-402394.
 
8
 *  CODE-OCEC-09-009. All rights reserved.
9
9
 *   
10
10
 *  This file is part of SLURM, a resource management program.
11
 
 *  For details, see <http://www.llnl.gov/linux/slurm/>.
 
11
 *  For details, see <https://computing.llnl.gov/linux/slurm/>.
 
12
 *  Please also read the included file: DISCLAIMER.
12
13
 *  
13
14
 *  SLURM is free software; you can redistribute it and/or modify it under
14
15
 *  the terms of the GNU General Public License as published by the Free
221
222
                xstrcat(out, "\n   ");
222
223
        
223
224
        /****** Line 4 ******/
 
225
        if (part_ptr->allow_alloc_nodes == NULL)
 
226
                snprintf(tmp_line, sizeof(tmp_line), "AllocNodes=%s","ALL");
 
227
        else
 
228
                snprintf(tmp_line, sizeof(tmp_line), "AllocNodes=%s",
 
229
                         part_ptr->allow_alloc_nodes);
 
230
        xstrcat(out, tmp_line);
 
231
        if (one_liner)
 
232
                xstrcat(out, " ");
 
233
        else
 
234
                xstrcat(out, "\n   ");
 
235
        
 
236
 
 
237
        /****** Line 5 ******/
224
238
#ifdef HAVE_BG
225
239
        snprintf(tmp_line, sizeof(tmp_line), "BasePartitions=%s BPIndices=", 
226
240
                part_ptr->nodes);
237
251
                        part_ptr->node_inx[j+1]);
238
252
                xstrcat(out, tmp_line);
239
253
        }
 
254
 
 
255
        if (part_ptr->default_time == INFINITE)
 
256
                sprintf(tmp_line, " DefaultTime=UNLIMITED ");
 
257
        else if (part_ptr->default_time == NO_VAL)
 
258
                sprintf(tmp_line, " DefaultTime=NONE ");          
 
259
        else {
 
260
                char time_line[32];
 
261
                secs2time_str(part_ptr->default_time * 60, time_line, 
 
262
                        sizeof(time_line));
 
263
                sprintf(tmp_line, " DefaultTime=%s ", time_line);
 
264
        }
 
265
        xstrcat(out, tmp_line);
 
266
 
240
267
        if (one_liner)
241
268
                xstrcat(out, "\n");
242
269
        else