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

« back to all changes in this revision

Viewing changes to src/squeue/opts.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
 *  opts.c - srun command line option parsing
3
3
 *
4
 
 *  $Id: opts.c 16350 2009-01-29 18:16:08Z jette $
 
4
 *  $Id: opts.c 18308 2009-08-04 16:31:06Z jette $
5
5
 *****************************************************************************
6
 
 *  Copyright (C) 2002-2006 The Regents of the University of California.
 
6
 *  Copyright (C) 2002-2007 The Regents of the University of California.
 
7
 *  Copyright (C) 2008-2009 Lawrence Livermore National Security
7
8
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
8
9
 *  Written by Joey Ekstrom <ekstrom1@llnl.gov>, Morris Jette <jette1@llnl.gov>
9
 
 *  LLNL-CODE-402394.
 
10
 *  CODE-OCEC-09-009. All rights reserved.
10
11
 *
11
12
 *  This file is part of SLURM, a resource management program.
12
 
 *  For details, see <http://www.llnl.gov/linux/slurm/>.
 
13
 *  For details, see <https://computing.llnl.gov/linux/slurm/>.
 
14
 *  Please also read the included file: DISCLAIMER.
13
15
 *
14
16
 *  SLURM is free software; you can redistribute it and/or modify it under
15
17
 *  the terms of the GNU General Public License as published by the Free
17
19
 *  any later version.
18
20
 *
19
21
 *  In addition, as a special exception, the copyright holders give permission 
20
 
 *  to link the code of portions of this program with the OpenSSL library under 
 
22
 *  to link the code of portions of this program with the OpenSSL library under
21
23
 *  certain conditions as described in each individual source file, and 
22
24
 *  distribute linked combinations including the two. You must obey the GNU 
23
25
 *  General Public License in all respects for all of the code used other than 
123
125
        if ( ( env_val = getenv("SQUEUE_SORT") ) )
124
126
                params.sort = xstrdup(env_val);
125
127
 
126
 
        while((opt_char = getopt_long(argc, argv, "ahi:j::ln:o:p:s::S:t:u:U:vV",
127
 
                        long_options, &option_index)) != -1) {
 
128
        while((opt_char = getopt_long(argc, argv, 
 
129
                                      "ahi:j::ln:o:p:s::S:t:u:U:vV",
 
130
                                      long_options, &option_index)) != -1) {
128
131
                switch (opt_char) {
129
132
                        case (int)'?':
130
133
                                fprintf(stderr, "Try \"squeue --help\" "
185
188
                                if (optarg) {
186
189
                                        params.steps = xstrdup(optarg);
187
190
                                        params.step_list = 
188
 
                                                _build_step_list( params.steps );
 
191
                                                _build_step_list(params.steps);
189
192
                                }
190
193
                                params.step_flag = true;
191
194
                                break;
437
440
                                                           right_justify, 
438
441
                                                           suffix );
439
442
                        else if (field[0] == 'S')
440
 
                                step_format_add_time_start( params.format_list, 
 
443
                                step_format_add_time_start( params.format_list,
441
444
                                                            field_size, 
442
445
                                                            right_justify, 
443
446
                                                            suffix );
452
455
                                                           right_justify, 
453
456
                                                           suffix );
454
457
                        else
455
 
                                error ("Invalid job step format specification: %c",
456
 
                                       field[0] );
 
458
                                error ( "Invalid job step format "
 
459
                                        "specification: %c",
 
460
                                        field[0] );
457
461
                } else {
458
462
                        if (field[0] == 'a')
459
463
                                job_format_add_account( params.format_list,
517
521
                                                       right_justify, 
518
522
                                                       suffix );
519
523
                        else if (field[0] == 'H')
520
 
                                job_format_add_min_sockets( params.format_list, 
 
524
                                job_format_add_min_sockets( params.format_list,
521
525
                                                           field_size, 
522
526
                                                           right_justify, 
523
527
                                                           suffix );
536
540
                                                     field_size, 
537
541
                                                     right_justify, suffix );
538
542
                        else if (field[0] == 'J')
539
 
                                job_format_add_min_threads( params.format_list, 
 
543
                                job_format_add_min_threads( params.format_list,
540
544
                                                           field_size, 
541
545
                                                           right_justify, 
542
546
                                                           suffix );
545
549
                                                           field_size, 
546
550
                                                           right_justify, 
547
551
                                                           suffix );
 
552
                        else if (field[0] == 'L')
 
553
                                job_format_add_time_left( params.format_list, 
 
554
                                                          field_size, 
 
555
                                                          right_justify, 
 
556
                                                          suffix );
548
557
                        else if (field[0] == 'm')
549
558
                                job_format_add_min_memory( params.format_list, 
550
559
                                                           field_size, 
590
599
                                                        right_justify, 
591
600
                                                        suffix );
592
601
                        else if (field[0] == 'Q')
593
 
                                 job_format_add_priority_long( params.format_list,
 
602
                                 job_format_add_priority_long( 
 
603
                                                        params.format_list,
594
604
                                                        field_size,
595
605
                                                        right_justify,
596
606
                                                        suffix );
600
610
                                                        right_justify,
601
611
                                                        suffix );
602
612
                        else if (field[0] == 'R')
603
 
                                job_format_add_reason_list(  params.format_list,
 
613
                                job_format_add_reason_list( params.format_list,
604
614
                                                        field_size,
605
615
                                                        right_justify,
606
616
                                                        suffix );
607
617
                        else if (field[0] == 's')
608
 
                                job_format_add_select_jobinfo( params.format_list, 
 
618
                                job_format_add_select_jobinfo( 
 
619
                                                         params.format_list, 
609
620
                                                         field_size, 
610
621
                                                         right_justify, 
611
622
                                                         suffix );
635
646
                                                          field_size, 
636
647
                                                          right_justify, 
637
648
                                                          suffix );
 
649
                        else if (field[0] == 'v')
 
650
                                job_format_add_reservation( params.format_list,
 
651
                                                        field_size, 
 
652
                                                        right_justify, 
 
653
                                                        suffix );
638
654
                        else if (field[0] == 'w')
639
655
                                job_format_add_wckey( params.format_list, 
640
656
                                                      field_size, 
646
662
                                                          right_justify, 
647
663
                                                          suffix );
648
664
                        else if (field[0] == 'X')
649
 
                                job_format_add_num_sockets( params.format_list, 
 
665
                                job_format_add_num_sockets( params.format_list,
650
666
                                                           field_size, 
651
667
                                                           right_justify, 
652
668
                                                           suffix );
656
672
                                                           right_justify, 
657
673
                                                           suffix );
658
674
                        else if (field[0] == 'Z')
659
 
                                job_format_add_num_threads( params.format_list, 
 
675
                                job_format_add_num_threads( params.format_list,
660
676
                                                           field_size, 
661
677
                                                           right_justify, 
662
678
                                                           suffix );