NAME
sge_gdi_host_attribute, sge_gdi_host_scaling,
sge_gdi_host_nslots, sge_gdi_myhost_attribute,
sge_gdi_myhost_scaling, sge_gdi_myhost_nslots
- Grid Engine/TRM GDI calls
SYNOPSIS
#include "sge_gdi_attributes.h"
char *sge_gdi_host_attribute(
char *hostname,
char *attr_name
);
double sge_gdi_host_scaling(
char *hostname,
char *attr_name
);
int sge_gdi_host_nslots(
char *hostname,
u_long32 jobid
);
char *sge_gdi_myhost_attribute(
char *attr_name
);
double sge_gdi_myhost_scaling(
char *attr_name
);
int sge_gdi_myhost_nslots(
u_long32 jobid
);
DESCRIPTION
The Transparent Resource Manager (TRM) extension to the Grid
Engine Database Interface (GDI) of Grid Engine simplifies
integration of (parallel) applications with Grid Engine.
Access is provided to information which describes the run-
time environment of a Grid Engine job. In many cases this
information can be used to optimize runtime of
jobs/applications by adapting its behavior to runtime
environment or load situation.
The following is a description of the basic functionality of
all Grid Engine TRM GDI functions:
sge_gdi_host_attribute
Returns value of the requested attribute at the host.
Depending on the attribute this can be a load value, a
statically configured value or a consumable resource. On
error NULL is returned. Otherwise a pointer is returned
which points to a static address. Please note that
sge_gdi_host_attribute will fail if the Grid Engine GDI was
not successfully initialized by use of sge_gdi_setup(3).
sge_gdi_host_scaling
Returns the scaling factor which is used to scale the given
load value from the host. The scaling values for a host can
be modified using the qconf(1) command. If no scaling is
active for the attribute a value of 1 is returned. On error
-1 is returned. Please note that sge_gdi_host_scaling will
fail if the Grid Engine GDI was not successfully initialized
by use of sge_gdi_setup(3).
sge_gdi_host_nslots
Returns the number of slots the job got from the Grid Engine
scheduler for the given host. This number can be important
in case of multithreaded parallel applications. If the
jobid is 0 the value of the JOB_ID environment is used
instead. On error 0 is returned. Please note that
sge_gdi_host_nslots will fail if the Grid Engine GDI was not
successfully initialized by use of sge_gdi_setup(3).
sge_gdi_myhost_attribute
Returns the value of the requested attribute at the local
host. Depending on the attribute this can be a load value,
a statically configured value or a consumable resource. On
error NULL is returned. Otherwise a pointer is returned
which points to a static address. sge_gdi_host_attribute
should be called without setting up the Grid Engine GDI
since this is done inside of this function.
sge_gdi_myhost_scaling
Returns the scaling factor which is used to scale the given
load value from the local host. The scaling values for a
host can be modified using the qconf(1) command. If no scal-
ing is active for the attribute a value of 1 is returned.
On error -1 is returned. sge_gdi_myhost_scaling should be
called without setting up the Grid Engine GDI since this is
done inside of this function.
sge_gdi_myhost_nslots
Returns the number of slots the job got from the Grid Engine
scheduler for the local host. This number can be important
in case of multithreaded parallel applications. If the
jobid is 0 the value of the JOB_ID environment is used
instead. On error 0 is returned. sge_gdi_myhost_nslots
should be called without setting up the Grid Engine GDI
since this is done inside of this function.
SEE ALSO
sge_intro(1), sge_gdi_setup(3). qconf(1)
COPYRIGHT
See sge_intro(1) for a full statement of rights and permis-
sions.
Man(1) output converted with
man2html