Skip to content
Snippets Groups Projects
Commit 04d023f9 authored by Moe Jette's avatar Moe Jette
Browse files

Initial draft of slurm error function man page. Minor revisions to other man pages.

parent d47df15d
No related branches found
No related tags found
No related merge requests found
.TH "Slurm API" "3" "Release 0.0.0" "Morris Jette" "Slurm error calls"
.SH "NAME"
.LP
\fBslurm_job\fR \- Slurm error calls
.SH "SYNTAX"
.LP
#include <slurm.h>
.LP
int \fBslurm_get_errno\fR ( );
.LP
char * \fBslurm_strerror\fR (
.br
int \ferrnum\fP
.br
);
.LP
void \fBslurm_perror\fR (
.br
char *\fImsg\fP
.br
);
.SH "ARGUMENTS"
.LP
.TP
\fIerrnum\fP
A Slurm error code.
.TP
\fImsg\fP
TBD.
.SH "DESCRIPTION"
.LP
\fBslurm_get_errno\fR Return the error code as set by a Slurm API function.
.LP
\fBslurm_strerror\fR Given a Slurm error code, return a descriptive text.
.LP
\fBslurm_perror\fR TBD.
.SH "RETURN VALUE"
.LP
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
.SH "ERRORS"
.LP
\fBSLURM_PROTOCOL_VERSION_ERROR\fR Protocol version has changed, re-link your code.
.SH "EXAMPLE"
.eo
.LP
#include <stdio.h>
.br
#include <slurm.h>
.LP
int main (int argc, char *argv[])
.br
{
}
.ec
...@@ -140,7 +140,7 @@ int main (int argc, char *argv[]) ...@@ -140,7 +140,7 @@ int main (int argc, char *argv[])
.br .br
if ( slurm_load_ctl_conf ((time_t) NULL, &conf_info_msg_ptr ) ) { if ( slurm_load_ctl_conf ((time_t) NULL, &conf_info_msg_ptr ) ) {
.br .br
printf ("slurm_load_ctl_conf errno %d\n", errno); printf ("slurm_load_ctl_conf errno %d\n", slurm_get_errno());
.br .br
exit (1); exit (1);
.br .br
...@@ -156,7 +156,7 @@ int main (int argc, char *argv[]) ...@@ -156,7 +156,7 @@ int main (int argc, char *argv[])
.br .br
if ( slurm_load_jobs ((time_t) NULL, &job_buffer_ptr) ) { if ( slurm_load_jobs ((time_t) NULL, &job_buffer_ptr) ) {
.br .br
printf ("slurm_load_jobs errno %d\n", errno); printf ("slurm_load_jobs errno %d\n", slurm_get_errno());
.br .br
exit (1); exit (1);
.br .br
...@@ -182,7 +182,7 @@ int main (int argc, char *argv[]) ...@@ -182,7 +182,7 @@ int main (int argc, char *argv[])
.br .br
if ( slurm_load_node ((time_t) NULL, &node_buffer_ptr) ) { if ( slurm_load_node ((time_t) NULL, &node_buffer_ptr) ) {
.br .br
printf ("slurm_load_node errno %d\n", errno); printf ("slurm_load_node errno %d\n", slurm_get_errno());
.br .br
exit (1); exit (1);
.br .br
...@@ -206,7 +206,7 @@ int main (int argc, char *argv[]) ...@@ -206,7 +206,7 @@ int main (int argc, char *argv[])
.br .br
if ( slurm_load_partitions ((time_t) NULL, &part_buffer_ptr) ) { if ( slurm_load_partitions ((time_t) NULL, &part_buffer_ptr) ) {
.br .br
printf ("slurm_load_part errno %d\n", errno); printf ("slurm_load_part errno %d\n", slurm_get_errno());
.br .br
exit (1); exit (1);
.br .br
...@@ -258,5 +258,5 @@ int main (int argc, char *argv[]) ...@@ -258,5 +258,5 @@ int main (int argc, char *argv[])
.ec .ec
.SH "SEE ALSO" .SH "SEE ALSO"
.LP .LP
\fBslurm_strerror\fR(3), \fBslurm_perror\fR(3) \fBslurm_get_errno\fR(3), \fBslurm_perror\fR(3), \fBslurm_strerror\fR(3)
...@@ -16,7 +16,7 @@ int \fBslurm_allocate_resources\fR ( ...@@ -16,7 +16,7 @@ int \fBslurm_allocate_resources\fR (
.br .br
); );
.LP .LP
void \fBslurm_cancel_job\fR ( int \fBslurm_cancel_job\fR (
.br .br
uint32_t \fIjob_id\fP uint32_t \fIjob_id\fP
.br .br
...@@ -149,6 +149,8 @@ On success, zero is returned. On error, -1 is returned, and errno is set appropr ...@@ -149,6 +149,8 @@ On success, zero is returned. On error, -1 is returned, and errno is set appropr
\fBESLURM_TRANSITION_STATE_NO_UPDATE\fR the requested job configuration change can not take place at this time. Try again later. \fBESLURM_TRANSITION_STATE_NO_UPDATE\fR the requested job configuration change can not take place at this time. Try again later.
.LP .LP
\fBESLURM_ALREADY_DONE\fR the specified job has already completed and can not be modified. \fBESLURM_ALREADY_DONE\fR the specified job has already completed and can not be modified.
.LP
\fBESLURM_ACCESS_DENIED\fR the requesting user lacks authorization for the requested action (e.g. trying to delete or modify another user's job).
.SH "EXAMPLE" .SH "EXAMPLE"
.eo .eo
.LP .LP
...@@ -176,7 +178,7 @@ int main (int argc, char *argv[]) ...@@ -176,7 +178,7 @@ int main (int argc, char *argv[])
.br .br
if (slurm_allocate_resources(&job_desc_msg,&slurm_alloc_msg_ptr,true)) { if (slurm_allocate_resources(&job_desc_msg,&slurm_alloc_msg_ptr,true)) {
.br .br
printf ("allocate errno %d\n", errno); printf ("allocate errno %d\n", slurm_get_errno());
.br .br
exit (1); exit (1);
} }
...@@ -187,7 +189,7 @@ int main (int argc, char *argv[]) ...@@ -187,7 +189,7 @@ int main (int argc, char *argv[])
.br .br
if ( slurm_job_cancel ( slurm_alloc_msg_ptr->job_id ) ) { if ( slurm_job_cancel ( slurm_alloc_msg_ptr->job_id ) ) {
.br .br
printf ("cancel errno %d\n", errno); printf ("cancel errno %d\n", slurm_get_errno());
.br .br
exit (1); exit (1);
.br .br
...@@ -203,4 +205,4 @@ int main (int argc, char *argv[]) ...@@ -203,4 +205,4 @@ int main (int argc, char *argv[])
.ec .ec
.SH "SEE ALSO" .SH "SEE ALSO"
.LP .LP
\fBslurm_load_jobs\fR(3), \fBslurm_free_job_info\fR(3), \fBslurm_strerror\fR(3), \fBslurm_perror\fR(3) \fBslurm_free_job_info\fR(3), \fBslurm_get_errno\fR(3), \fBslurm_load_jobs\fR(3), \fBslurm_perror\fR(3), \fBslurm_strerror\fR(3)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment