Knowledge Center         Contents    Previous  Next    
Platform Computing Corp.

ls_eligible()

Checks to see if a task is eligible for remote execution.

DESCRIPTION

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.

SYNOPSIS

#include <lsf/lsf.h> 
int ls_eligible(char *taskname, char *resreq, char mode) 

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.

RETURN VALUES

character:TRUE

Returned if the task can be remotely executed.

character:FALSE

Returned if the task can not be remotely executed.

ERRORS

If the function fails, lserrno is set to indicate the error.

SEE ALSO

Related APIs

ls_resreq()

ls_listrtask()

ls_listltask()

ls_insertrtask()

ls_inesrtltask()

ls_deletertask()

ls_deleteltask()

Equivalent line command

none

Files

$LSF_CONFDIR/lsf.task

$LSF_CONFDIR/lsf.task.cluster_name

$HOME/.lsftask


Platform Computing Inc.
www.platform.com
Knowledge Center         Contents    Previous  Next