Reports the total number of job slots that are available for use on a grid.
Valid in: | %SYSFUNC or %QSYSFUNC Macro, DATA step |
Category: | Grid |
specifies the name of the SAS Application Server that has been defined in the SAS Metadata Repository. The SAS Application Server contains the definition for the logical grid server that is used to access the grid environment. The name of the SAS Application Server is passed to Platform Suite for SAS as a required resource. Platform Suite for SAS selects the grid nodes that meet the requirements for the specified SAS Application Server and returns the total number of job slots in the grid.
Alias | SERVER=, RESOURCE= |
Interaction | If SAS-application-server contains one or more spaces, the spaces are converted to underscores before the name is passed to Platform Suite for SAS. |
Example | %let numofnodes%sysfunc(grdsvc_nnodes(server=SASApp)); |
identifies the resource for the type of job to be executed on the grid. This value specifies the workload requirements for which Platform Suite for SAS selects the grid nodes that contain these resources.
Requirement | If you specify WORKLOAD=, you must also specify the SASAPPSERVER= option. Workload values are case sensitive. |
Interaction | If workload-value contains
one or more spaces, the spaces are converted to underscores before
the value is passed to Platform Suite for SAS. If workload-value is
not located in the SAS Application Server definition and no other
errors occur, a 0 result code is returned. A 0 result code means that
no grid nodes contain the requested resources. Also, this note is
displayed: NOTE: Workload value "gridResource" does not exist in the SAS Metadata Repository.If workload-value is undefined to Platform Suite for SAS, the GRDSVC_NNODES function returns the result code 0. |
Tip | For Platform Suite for SAS, this workload-value corresponds with the resource that the LSF administrator has configured in the lsf.cluster.cluster-name file and the lsf.shared file on the grid-control computer. |
Example | %let numofnodes=%sysfunc(grdsvc_nnodes(server=SASApp; workload=em));The workload value, EM , specifies the resource name. EM must be assigned to a grid node in order to process this job. An example is assigning EM to machines that can process SAS Enterprise Miner jobs. |
/*-----------------------------------------------------------------------*/ /* Get the number of grid nodes that have 'SASApp' as a resource */ /*-----------------------------------------------------------------------*/ %let NumNodes=%sysfunc(grdsvc_nnodes(server=SASApp)); /*-----------------------------------------------------------------------*/ /* Get the number of grid nodes that have 'SASApp' 'EM' as resources */ /*-----------------------------------------------------------------------*/ %let numofnodes=%sysfunc(grdsvc_nnodes(server=SASApp;workload=EM));