1
1
/*****************************************************************************\
2
2
* jobcomp_script.c - Script running slurm job completion logging plugin.
3
* $Id: jobcomp_script.c 16035 2008-12-22 21:46:26Z da $
3
* $Id: jobcomp_script.c 17214 2009-04-09 23:31:28Z jette $
4
4
*****************************************************************************
5
5
* Produced at Center for High Performance Computing, North Dakota State
7
7
* Written by Nathan Huff <nhuff@acm.org>
8
* CODE-OCEC-09-009. All rights reserved.
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.
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
34
35
* You should have received a copy of the GNU General Public License along
35
36
* with SLURM; if not, write to the Free Software Foundation, Inc.,
36
37
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
38
*****************************************************************************
39
* Here is a list of the environment variables set
41
* ACCOUNT Account name
42
* BATCH "yes" if submitted via sbatch, "no" otherwise
43
* END Time of job termination, UTS
44
* GID Group ID of job owner
47
* JOBSTATE Termination state of job (FIXME
48
* NODECNT Count of allocated nodes
49
* NODES List of allocated nodes
50
* PARTITION Partition name used to run job
51
* PROCS Count of allocated CPUs
52
* START Time of job start, UTS
53
* SUBMIT Time of job submission, UTS
54
* UID User ID of job owner
55
* WORK_DIR Job's working directory
57
* BlueGene specific environment variables:
58
* BLOCKID Name of Block ID
59
* CONNECT_TYPE Connection type: small, torus or mesh
60
* GEOMETRY Requested geometry of the job, "#x#x#" where "#"
61
* represents the X, Y and Z dimension sizes
37
62
\*****************************************************************************/
39
64
#ifdef HAVE_CONFIG_H
198
220
j->nprocs = job->total_procs;
199
221
j->nnodes = job->node_cnt;
200
222
j->account = job->account ? xstrdup (job->account) : NULL;
223
if (job->details && job->details->work_dir)
224
j->work_dir = xstrdup(job->details->work_dir);
226
j->work_dir = xstrdup("unknown");
202
228
j->connect_type = select_g_xstrdup_jobinfo(job->select_jobinfo,
203
229
SELECT_PRINT_CONNECTION);
204
j->reboot = select_g_xstrdup_jobinfo(job->select_jobinfo,
205
SELECT_PRINT_REBOOT);
206
j->rotate = select_g_xstrdup_jobinfo(job->select_jobinfo,
207
SELECT_PRINT_ROTATE);
208
j->maxprocs = select_g_xstrdup_jobinfo(job->select_jobinfo,
209
SELECT_PRINT_MAX_PROCS);
210
230
j->geometry = select_g_xstrdup_jobinfo(job->select_jobinfo,
211
231
SELECT_PRINT_GEOMETRY);
212
j->block_start = select_g_xstrdup_jobinfo(job->select_jobinfo,
214
232
j->blockid = select_g_xstrdup_jobinfo(job->select_jobinfo,
215
233
SELECT_PRINT_BG_ID);
338
353
_env_append (&env, "JOBNAME", job->name);
339
354
_env_append (&env, "JOBSTATE", job->jobstate);
340
355
_env_append (&env, "PARTITION", job->partition);
356
_env_append (&env, "WORK_DIR", job->work_dir);
359
_env_append (&env, "BLOCKID", job->blockid);
343
360
_env_append (&env, "CONNECT_TYPE", job->connect_type);
344
_env_append (&env, "REBOOT", job->reboot);
345
_env_append (&env, "ROTATE", job->rotate);
346
_env_append (&env, "MAXPROCS", job->maxprocs);
347
361
_env_append (&env, "GEOMETRY", job->geometry);
348
_env_append (&env, "BLOCK_START", job->block_start);
349
_env_append (&env, "BLOCKID", job->blockid);
352
364
if (job->limit == INFINITE)