blob: c8cff8356fa1b8d232867b7907c41347ffed4159 [file] [log] [blame] [edit]
.TH "Slurm API" "3" "February 2010" "Morris Jette" "Slurm job and step update functions"
.SH "NAME"
slurm_init_job_desc_msg, slurm_init_update_step_msg,
slurm_update_job, slurm_update_step
\- Slurm job and step update functions
.SH "SYNTAX"
.LP
#include <slurm/slurm.h>
.LP
void \fBslurm_init_job_desc_msg\fR (
.br
job_desc_msg_t *\fIjob_desc_msg_ptr\fP
.br
);
.LP
void \fBslurm_init_update_step_msg\fR (
.br
step_update_request_msg_t * \fIstep_msg\fP
.br
);
.LP
int \fBslurm_update_job\fR (
.br
job_desc_msg_t * \fIjob_msg\fP
.br
);
.LP
int \fBslurm_update_step\fR (
.br
step_update_request_msg_t * \fIstep_msg\fP
.br
);
.SH "ARGUMENTS"
.LP
.TP
\fIjob_msg\fP
Specifies the pointer to a job descriptor.
See slurm.h for full details on the data structure's contents.
.TP
\fIstep_msg\fP
Specifies the pointer to a step descriptor.
See slurm.h for full details on the data structure's contents.
.SH "DESCRIPTION"
.LP
\fBslurm_init_job_desc_msg\fR Initialize the contents of a job descriptor with default values.
Execute this function before issuing a request to submit or modify a job.
.LP
\fBslurm_init_update_step_msg\fR Initialize the contents of a job step update
descriptor with default values.
Execute this function before issuing a request to modify a job step.
.LP
\fBslurm_update_job\fR Update a job with the changes made to the data
structure passed as an argument to the function.
.LP
\fBslurm_update_step\fR Update a job step with the changes made to the data
structure passed as an argument to the function.
.SH "RETURN VALUE"
.LP
On success, zero is returned. On error, \-1 is returned, and the Slurm error
code is set appropriately.
.SH "ERRORS"
.LP
\fBSLURM_PROTOCOL_VERSION_ERROR\fR Protocol version has changed, re\-link your
code.
.LP
\fBESLURM_ACCESS_DENIED\fR The requesting user lacks authorization for
the requested action (e.g. trying to modify another user's job).
.LP
\fBESLURM_INVALID_JOB_ID\fR Invalid job or step ID value.
.LP
\fBESLURM_INVALID_TIME_VALUE\fR Invalid time value.
.SH "EXAMPLE"
.LP
#include <stdio.h>
.br
#include <slurm/slurm.h>
.br
#include <slurm/slurm_errno.h>
.LP
int main (int argc, char *argv[])
.br
{
.br
job_desc_msg_t update_job_msg;
.br
step_update_request_msg_t update_step_msg;
.LP
slurm_init_job_desc_msg( &update_job_msg );
.br
update_job_msg.job_id = 1234;
.br
update_job_msg time_limit = 200;
.br
if (slurm_update_job (&update_job_msg)) {
.br
slurm_perror ("slurm_update_job error");
.br
exit (1);
.br
}
.LP
slurm_init_update_step_msg( &update_step_msg );
.br
update_step_msg.job_id = 1234;
.br
update_step_msg.step_id = 2;
.br
update_step_msg time_limit = 30;
.br
if (slurm_update_step (&update_step_msg)) {
.br
slurm_perror ("slurm_update_step error");
.br
exit (1);
.br
}
.br
exit (0);
.br
}
.SH "NOTE"
These functions are included in the libslurm library,
which must be linked to your process for use
(e.g. "cc \-lslurm myprog.c").
.SH "COPYING"
Copyright (C) 2009\-2010 Lawrence Livermore National Security.
Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
CODE\-OCEC\-09\-009. All rights reserved.
.LP
This file is part of SLURM, a resource management program.
For details, see <http://slurm.schedmd.com/>.
.LP
SLURM is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
.LP
SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
.SH "SEE ALSO"
.LP
\fBscontrol\fR(1), \fBslurm_get_errno\fR(3),
\fBslurm_perror\fR(3), \fBslurm_strerror\fR(3)