ls_eligible
Checks to see if a task is eligible for remote execution.LSLIB library routine for manipulating task lists stored by LSLIB. Task lists contain information about the eligibility of tasks for remote execution and their resource requirement characteristics. LSLIB maintains two task lists: local and remote. The local list contains tasks (i.e. UNIX processes) that must be executed on the local host (for example, ps, uptime, hostname). The remote list contains tasks that are suitable for remote execution (for example, compress), together with their resource requirements.
Task lists are generated and stored in memory by reading the system task file() and the .lsftask file in the user's home directory. The task lists can be updated and displayed using the command lsrtasks(). See the LSF User's Guide for detailed information on the use of task lists and resource requirements.
ls_eligible checks whether or not taskname is eligible for remote execution and, if so, obtains its resource requirements. ls_eligible returns TRUE if taskname is eligible for remote execution, FALSE otherwise.
resreq is an output parameter; you supply the character array. If taskname is eligible for remote execution, the resource requirements associated with taskname in the remote task lists are copied into resreq. If no resource requirements are associated with taskname, an empty string is copied into resreq.
#include <lsf/lsf.h>
int ls_eligible(char *taskname, char *resreq, char mode)
Data Structures:
- Parameters:
*taskname The task that is being checked to see if it can be remotely executed. *resreq The resource requirements associated with the task taskname. If no resource requirements are associated with taskname, an empty string is copied into resreq. mode One of two constants defined in <lsf/lsf.h>.
If mode is LSF_LOCAL_MODE, the routine searches through the remote task lists to see if taskname is on a list. If found, the task is considered eligible for remote execution, otherwise the task is considered ineligible.
If mode is LSF_REMOTE_MODE, the routine searches through the local task lists to see if taskname is on a list. If found, the task is considered ineligible for remote execution, otherwise the task is considered eligible.Define Statements:
- none
- none
Errors:
- Returns:
- int:TRUE
Returned if the task can be remotely executed.int:FALSE
Returned if the task can not be remotely executed.Equivalent line commands:
- If the function fails, lserrno is set to indicate the error.
Files:
- none
- $LSF_CONFDIR/lsf.task
$LSF_CONFDIR/lsf.task.cluster_name
$HOME/.lsftask
Date Modified: 14 Nov 2013
Copyright © 1994-2013 International Business Machines Corp.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.