Knowledge Center Contents Previous Next |
lsb_launch()
Launch commands on remote hosts in parallel.
DESCRIPTION
lsb_launch() is a synchronous API call to allow source level integration with vendor MPI implementations. This API will launch the specified command (argv) on the remote nodes in parallel.
LSF must be installed before integrating your MPI implementation with lsb_launch(). The lsb_launch() API requires the full set of liblsf.so, libbat.so (or liblsf.a, libbat.a).
SYNOPSIS
#include <lsf/lsbatch.h> int lsb_launch (char** where, char** argv, int userOptions, char** envp)PARAMETERS
where
[IN] A NULL-terminated list of hosts. A task will be launched for each slot.
If this parameter is NULL then the environment variable LSB_MCPU_HOSTS will be used.
argv
[IN] The command to be executed
userOptions
[IN] Options to modify the behavior of lsb_launch()
Multiple option values can be specified. For example option values can be separated by OR (|):
lsb_launch(where, argv, LSF_DJOB_REPLACE_ENV | LSF_DJOB_DISABLE_STDIN, envp);Valid options are:
- LSF_DJOB_DISABLE_STDIN-Disable standard input and redirect input from the special device /dev/null. This is equivalent to blaunch -n.
- LSF_DJOB_REPLACE_ENV-Replace existing enviornment variable values with envp.
- LSF_DJOB_NOWAIT-Non-blocking mode; the parallel job does not wait once all tasks start. This forces lsb_launch() not to wait for its tasks to finish.
- LSF_DJOB_STDERR_WITH_HOSTNAME-Display standard error messages with a corresponding host name where the message was generated. Cannot be specified with LSF_DJOB_NOWAIT.
- LSF_DJOB_STDOUT_WITH_HOSTNAME-Display standard output messages with a corresponding host name where the message was generated. Cannot be specified with LSF_DJOB_NOWAIT.
- LSF_DJOB_USE_LOGIN_SHELL-Launch commands through user's login shell.
- LSF_DJOB_USE_BOURNE_SHELL-Launch commands through Bourne shell (/bin/sh). If LSF_DJOB_USE_LOGIN_SHELL is also specified, LSF_DJOB_USE_LOGIN_SHELL is used.
- LSF_DJOB_STDERR-Separates stderr from stdout.
envp
[IN] A NULL-terminated list of environment variables specifying the environment to set for each task.
If envp is NULL, lsb_launch() uses the same environment used to start the first task on the first execution host. If non-NULL, envp values are appended to the environment used for the first task.
If the LSF_DJOB_REPLACE_ENV option is specified, envp entries will overwrite all existing environment values except those needed by LSF.
RETURN VALUES
> 0
Function was successful (the number of tasks launched).
< 0
Function failed.
ERRORS
If the function fails, lsberrno is set to indicate the error.
SEE ALSO
Related API
none
Equivalent line command
blaunch
Files
none
Platform Computing Inc.
www.platform.com |
Knowledge Center Contents Previous Next |