diff --git a/doc/man/man3/slurm_admin.3 b/doc/man/man3/slurm_admin.3 index e6148734e647a1359d68b9f8888b79341eceb1c4..aa262bb19e8f5d3903d2c4436477972d9b60e6c8 100644 --- a/doc/man/man3/slurm_admin.3 +++ b/doc/man/man3/slurm_admin.3 @@ -6,6 +6,14 @@ .LP #include <slurm.h> .LP +void \fBslurm_free_key\fR ( +.br + slurm_key_t *\fIslurm_key_ptr\fP +.br +); +.LP +slurm_key_t *\fBslurm_get_key\fR ( ); +.LP int \fBslurm_reconfigure\fR ( ); .LP int \fBslurm_update_job\fR ( @@ -34,6 +42,9 @@ int \fBslurm_update_partition\fR ( .SH "ARGUMENTS" .LP .TP +\fIslurm_key_ptr\fP +Specifies the pointer to a Slurm generated key as returned by \fBslurm_get_key\fR. +.TP \fIupdate_job_msg_ptr\fP Specifies the pointer to a job update request specification. See slurm.h for full details on the data structure's contents. .TP @@ -44,10 +55,14 @@ Specifies the pointer to a node update request specification. See slurm.h for fu Specifies the pointer to a partition update request specification. See slurm.h for full details on the data structure's contents. .SH "DESCRIPTION" .LP -\fBslurm_reconfigure\fR Request that the Slurm controller re-read its configuration file. The new configuration parameters take effect immediately. This function may only be successfully executed by user root. +\fBslurm_free_key\fR Release the storage generated in response to a call of the function \fBslurm_get_key\fR. .LP +\fBslurm_get_key\fR Generate a key authorizing use of some Slurm partitions (depending upon partition configuration. This storage should be released by executing \fBslurm_free_key\fR. This function may only be successfully executed by user root. +.LP \fBslurm_init_part_desc_msg\fR Initialize the contents of a partition descriptor with default values. Execute this function before executing \fBslurm_update_part\fR. .LP +\fBslurm_reconfigure\fR Request that the Slurm controller re-read its configuration file. The new configuration parameters take effect immediately. This function may only be successfully executed by user root. +.LP \fBslurm_update_job\fR Request that the configuration of a job be updated. Note that most, but not all paramters of a job may be changed by this function. Initialize the data structure using the \fBslurm_init_job_desc_msg\fR function to avoid making unanticipated changes to a job's configuration. This function may only be successfully executed by user root. .LP \fBslurm_update_node\fR Request that the state of one or more nodes be updated. Note that the state of a node (e.g. DRAINING, IDLE, etc.) may be changed, but its hardware configuration may not be changed by this function. If the hardware configuration of a node changes, update the Slurm configuration file and execute the \fBslurm_reconfigure\fR function. This function may only be successfully executed by user root. @@ -81,6 +96,10 @@ int main (int argc, char *argv[]) update_node_msg_t update_node_msg; .br partition_desc_msg_t update_part_msg ; +.br + resource_allocation_response_msg_t* slurm_alloc_msg_ptr ; +.br + slurm_key_t *slurm_key_ptr; .LP if (slurm_reconfigure ( )) { .br @@ -126,6 +145,34 @@ int main (int argc, char *argv[]) exit (1); .br } +.LP + slurm_key_ptr = slurm_get_key ( ); +.br + slurm_init_part_desc_msg ( &update_part_msg ); +.br + job_mesg. name = ("job01\0"); +.br + job_mesg. partition = ("reserved\0");; +.br + job_mesg. num_nodes = 400; +.br + job_mesg. slurm_key_ptr = slurm_key_ptr; +.br + if (slurm_allocate_resources(&job_desc_msg,&slurm_alloc_msg_ptr,true)) { +.br + printf ("allocate errno %d\n", slurm_get_errno()); +.br + exit (1); +.br + } +.br + printf ("Allocated nodes %s to job_id %u\n", +.br + slurm_alloc_msg_ptr->node_list, slurm_alloc_msg_ptr->job_id ); +.br + slurm_free_resource_allocation_response_msg ( slurm_alloc_msg_ptr ); +.br + slurm_free_key ( slurm_key_ptr ); .br exit (0); .br @@ -133,4 +180,4 @@ int main (int argc, char *argv[]) .ec .SH "SEE ALSO" .LP -\fBscontrol\fR(1), \fBslurm_get_errno\fR(3), \fBslurm_init_job_desc_msg\fR(3), \fBslurm_perror\fR(3), \fBslurm_strerror\fR(3) +\fBscontrol\fR(1), \fBslurm_allocate_resources\fR(3), \fBslurm_get_errno\fR(3), \fBslurm_init_job_desc_msg\fR(3), \fBslurm_job_will_run\fR(3), \fBslurm_perror\fR(3), \fBslurm_strerror\fR(3), \fBslurm_submit_batch_job\fR(3) diff --git a/doc/man/man3/slurm_job.3 b/doc/man/man3/slurm_job.3 index fe4abe172eaa617c6475b4d7ef970504ff96a6d5..0ea23f28531b260e0c9d08bf43223a9593e5df14 100644 --- a/doc/man/man3/slurm_job.3 +++ b/doc/man/man3/slurm_job.3 @@ -203,4 +203,4 @@ int main (int argc, char *argv[]) .ec .SH "SEE ALSO" .LP -\fBsrun\fR(1), \fBslurm_free_job_info\fR(3), \fBslurm_get_errno\fR(3), \fBslurm_load_jobs\fR(3), \fBslurm_perror\fR(3), \fBslurm_strerror\fR(3) +\fBscancel\fR(1), \fBsrun\fR(1), \fBslurm_free_job_info\fR(3), \fBslurm_free_key\fR(3), \fBslurm_get_errno\fR(3), \fBslurm_load_jobs\fR(3), \fBslurm_get_key\fR(3), \fBslurm_perror\fR(3), \fBslurm_strerror\fR(3)