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

« back to all changes in this revision

Viewing changes to src/common/slurm_cred.h

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2009-09-24 23:28:15 UTC
  • mfrom: (1.3.4 upstream)
  • mto: (16.1.1 maverick)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20090924232815-uu5ku2gqk7appy26
Tags: upstream-2.0.5
ImportĀ upstreamĀ versionĀ 2.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************\
2
2
 *  src/common/slurm_cred.h  - SLURM job credential operations
3
 
 *  $Id: slurm_cred.h 14499 2008-07-11 22:54:48Z jette $
4
3
 *****************************************************************************
5
4
 *  Copyright (C) 2002-2006 The Regents of the University of California.
6
5
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
7
6
 *  Written by Mark Grondona <grondona1@llnl.gov>.
8
 
 *  LLNL-CODE-402394.
 
7
 *  CODE-OCEC-09-009. All rights reserved.
9
8
 *  
10
9
 *  This file is part of SLURM, a resource management program.
11
 
 *  For details, see <http://www.llnl.gov/linux/slurm/>.
 
10
 *  For details, see <https://computing.llnl.gov/linux/slurm/>.
 
11
 *  Please also read the included file: DISCLAIMER.
12
12
 *  
13
13
 *  SLURM is free software; you can redistribute it and/or modify it under
14
14
 *  the terms of the GNU General Public License as published by the Free
51
51
#  include <sys/types.h>
52
52
#endif
53
53
 
 
54
#include "src/common/bitstring.h"
54
55
#include "src/common/macros.h"
55
56
#include "src/common/pack.h"
56
57
 
124
125
 
125
126
 
126
127
/*
127
 
 * Container for SLURM credential create and verify arguments:
 
128
 * Container for SLURM credential create and verify arguments
 
129
 *
 
130
 * The core_bitmap, cores_per_socket, sockets_per_node, and 
 
131
 * sock_core_rep_count is based upon the nodes allocated to the
 
132
 * JOB, but the bits set in core_bitmap are those cores allocated
 
133
 * to this STEP
128
134
 */
129
135
typedef struct {
130
136
        uint32_t jobid;
131
137
        uint32_t stepid;
132
 
        uint32_t job_mem;       /* MB of memory reserved for job */
133
 
        uint32_t task_mem;      /* MB of memory reserved per task */
 
138
        uint32_t job_mem;       /* MB of memory reserved per node OR
 
139
                                 * real memory per CPU | MEM_PER_CPU,
 
140
                                 * default=0 (no limit) */
134
141
        uid_t    uid;
135
142
        char    *hostlist;
136
 
        uint32_t alloc_lps_cnt;
137
 
        uint32_t *alloc_lps;
 
143
 
 
144
        bitstr_t *core_bitmap;
 
145
        uint16_t *cores_per_socket;
 
146
        uint16_t *sockets_per_node;
 
147
        uint32_t *sock_core_rep_count;
 
148
        uint32_t  job_nhosts;   /* count of nodes allocated to JOB */
 
149
        char     *job_hostlist; /* list of nodes allocated to JOB */
138
150
} slurm_cred_arg_t;
139
151
 
140
152
/* Terminate the plugin and release all memory. */
268
280
 */
269
281
int slurm_cred_get_signature(slurm_cred_t cred, char **datap, int *len);
270
282
 
271
 
 
272
283
/*
273
284
 * Print a slurm job credential using the info() call
274
285
 */
275
286
void slurm_cred_print(slurm_cred_t cred);
276
287
 
277
 
/*
278
 
 * Get count of allocated LPS (processors) by node
279
 
 */
280
 
int slurm_cred_get_alloc_lps(slurm_cred_t cred, char **nodes, 
281
 
                             uint32_t *alloc_lps_cnt, uint32_t **alloc_lps);
282
288
#ifdef DISABLE_LOCALTIME
283
289
extern char * timestr (const time_t *tp, char *buf, size_t n);
284
290
#endif