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

Update step_launch API description based upon info from

Chris Morrone.
parent c430edca
No related branches found
No related tags found
No related merge requests found
.TH "Slurm API" "3" "December 2006" "Morris Jette" "Slurm job step launch functions" .TH "Slurm API" "3" "July 2008" "Morris Jette" "Slurm job step launch functions"
.SH "NAME" .SH "NAME"
...@@ -19,6 +19,8 @@ void \fBslurm_step_launch_params_t_init\fR ( ...@@ -19,6 +19,8 @@ void \fBslurm_step_launch_params_t_init\fR (
int \fBslurm_step_launch\fR ( int \fBslurm_step_launch\fR (
.br .br
slurm_step_ctx \fIctx\fP, slurm_step_ctx \fIctx\fP,
.br
char * \fIlauncher_host\fP,
.br .br
const slurm_step_launch_params_t *\fIlaunch_req\fP, const slurm_step_launch_params_t *\fIlaunch_req\fP,
.br .br
...@@ -57,6 +59,12 @@ function calls, and destroyed by \fBslurm_step_ctx_destroy\fR. ...@@ -57,6 +59,12 @@ function calls, and destroyed by \fBslurm_step_ctx_destroy\fR.
\fIlaunch_req\fP \fIlaunch_req\fP
Pointer to a structure allocated by the user containing specifications of Pointer to a structure allocated by the user containing specifications of
the job step to be launched. the job step to be launched.
.TP
\fIlauncher_host\fP
Host name or address to be used to identify the destination of PMI communications
for MPICH2. We intend to imbed this information within \fIlaunch_req\fP in the
next major release of SLURM, when changes to the protocol can be more easily
addressed.
.SH "DESCRIPTION" .SH "DESCRIPTION"
.LP .LP
...@@ -73,6 +81,34 @@ default values. This function will NOT allocate any new memory. ...@@ -73,6 +81,34 @@ default values. This function will NOT allocate any new memory.
.LP .LP
\fBslurm_step_launch_abort\fR Abort an in-progress launch, or terminate \fBslurm_step_launch_abort\fR Abort an in-progress launch, or terminate
the fully launched job step. Can be called from a signal handler. the fully launched job step. Can be called from a signal handler.
.LP
Use the \fIlocal_fds\fR entry in the \fIslurm_step_launch_params_t\fR
to specify file descriptors to be used for standard input, output
and error. Any \fIlocal_fds\fR not specified will result in the launched
tasks using the calling process's standard input, output and error.
Threads created by the \fBslurm_step_launch\fR will completely handle
copying data between the remote processes and the specified local file
descriptors.
.LP
Use the substructure in \fIslurm_step_io_fds_t\fR ti restrict the
redirection of I/O to a specific node or task ID. For example, to
redirect standard output only from task 0, set
\fIparams.local_fs.out.taskid=0;\fR
.LP
Use the \fIremote_*_filename\fR fields in \fIslurm_step_launch_params_t\fR
to have the lauched tasks read and/or write directly to local files
rather than transferring it over the network to the calling process.
These strings support many of the same format options as the \fBsrun\fR
command. Any \fIremote_*_filename\fR fields set will supersede the
corresponding \fIlocal_fds\fR entries. For example, the following
code will direct each task to write standard output and standard
error to local files with names containing the task ID (e.g.
"run1.out.0" and "run.1.err.0" for task 0).
.LP
.nf
params.remote_output_filename = "/home/bob/test_output/run1.out.%t"
params.remote_error_filename = "/home/bob/test_output/run1.err.%t"
.fi
.SH "RETURN VALUE" .SH "RETURN VALUE"
.LP .LP
...@@ -154,7 +190,7 @@ int main (int argc, char *argv[]) ...@@ -154,7 +190,7 @@ int main (int argc, char *argv[])
params.argv = argv + 1; params.argv = argv + 1;
callbacks.task_start = _task_start; callbacks.task_start = _task_start;
callbacks.task_finish = _task_finish; callbacks.task_finish = _task_finish;
if (slurm_step_launch(step_ctx, &params, &callbacks) if (slurm_step_launch(step_ctx, NULL, &params, &callbacks)
!= SLURM_SUCCESS) { != SLURM_SUCCESS) {
slurm_perror("slurm_step_launch"); slurm_perror("slurm_step_launch");
exit(1); exit(1);
...@@ -181,7 +217,8 @@ which must be linked to your process for use ...@@ -181,7 +217,8 @@ which must be linked to your process for use
(e.g. "cc \-lslurm myprog.c"). (e.g. "cc \-lslurm myprog.c").
.SH "COPYING" .SH "COPYING"
Copyright (C) 2006 The Regents of the University of California. Copyright (C) 2006-2007 The Regents of the University of California.
Copyright (C) 2008 Lawrence Livermore National Security.
Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
LLNL\-CODE\-402394. LLNL\-CODE\-402394.
.LP .LP
......
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