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

« back to all changes in this revision

Viewing changes to src/sshare/sshare.h

  • 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
/*****************************************************************************\
 
2
 *  sshare.h - definitions for all sshare modules.
 
3
 *****************************************************************************
 
4
 *  Copyright (C) 2008 Lawrence Livermore National Security.
 
5
 *  Copyright (C) 2002-2007 The Regents of the University of California.
 
6
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 
7
 *  Written by Danny Auble <da@llnl.gov>
 
8
 *  CODE-OCEC-09-009. All rights reserved.
 
9
 *  
 
10
 *  This file is part of SLURM, a resource management program.
 
11
 *  For details, see <https://computing.llnl.gov/linux/slurm/>.
 
12
 *  Please also read the included file: DISCLAIMER.
 
13
 *  
 
14
 *  SLURM is free software; you can redistribute it and/or modify it under
 
15
 *  the terms of the GNU General Public License as published by the Free
 
16
 *  Software Foundation; either version 2 of the License, or (at your option)
 
17
 *  any later version.
 
18
 *
 
19
 *  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
 
21
 *  certain conditions as described in each individual source file, and 
 
22
 *  distribute linked combinations including the two. You must obey the GNU 
 
23
 *  General Public License in all respects for all of the code used other than 
 
24
 *  OpenSSL. If you modify file(s) with this exception, you may extend this 
 
25
 *  exception to your version of the file(s), but you are not obligated to do 
 
26
 *  so. If you do not wish to do so, delete this exception statement from your
 
27
 *  version.  If you delete this exception statement from all source files in 
 
28
 *  the program, then also delete it here.
 
29
 *  
 
30
 *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
 
31
 *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
32
 *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 
33
 *  details.
 
34
 *  
 
35
 *  You should have received a copy of the GNU General Public License along
 
36
 *  with SLURM; if not, write to the Free Software Foundation, Inc.,
 
37
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA.
 
38
\*****************************************************************************/
 
39
 
 
40
#ifndef __SSHARE_H__
 
41
#define __SSHARE_H__
 
42
 
 
43
#if HAVE_CONFIG_H
 
44
#  include "config.h"
 
45
#endif
 
46
 
 
47
#if HAVE_GETOPT_H
 
48
#  include <getopt.h>
 
49
#else
 
50
#  include "src/common/getopt.h"
 
51
#endif
 
52
 
 
53
#include <ctype.h>
 
54
#include <errno.h>
 
55
#include <stdio.h>
 
56
#include <stdlib.h>
 
57
#ifdef HAVE_STRING_H
 
58
#  include <string.h>
 
59
#endif
 
60
#ifdef HAVE_STRINGS_H
 
61
#  include <strings.h>
 
62
#endif
 
63
#include <time.h>
 
64
#include <unistd.h>
 
65
 
 
66
#if HAVE_READLINE
 
67
#  include <readline/readline.h>
 
68
#  include <readline/history.h>
 
69
#endif
 
70
 
 
71
#if HAVE_INTTYPES_H
 
72
#  include <inttypes.h>
 
73
#else  /* !HAVE_INTTYPES_H */
 
74
#  if HAVE_STDINT_H
 
75
#    include <stdint.h>
 
76
#  endif
 
77
#endif  /* HAVE_INTTYPES_H */
 
78
 
 
79
#include <slurm/slurm.h>
 
80
 
 
81
#include "src/common/parse_time.h"
 
82
#include "src/common/slurm_accounting_storage.h"
 
83
#include "src/common/xstring.h"
 
84
#include "src/common/print_fields.h"
 
85
 
 
86
#define CKPT_WAIT       10
 
87
#define MAX_INPUT_FIELDS 128
 
88
 
 
89
typedef enum {
 
90
        SSHARE_TIME_SECS,
 
91
        SSHARE_TIME_MINS,
 
92
        SSHARE_TIME_HOURS,
 
93
} sshare_time_format_t;
 
94
 
 
95
extern int exit_code;   /* sshare's exit code, =1 on any error at any time */
 
96
extern int quiet_flag;  /* quiet=1, verbose=-1, normal=0 */
 
97
extern uint32_t my_uid;
 
98
extern sshare_time_format_t time_format;
 
99
extern char *time_format_string;
 
100
 
 
101
extern int process(shares_response_msg_t *msg);
 
102
 
 
103
#endif