IExcelClient::OpenSession method

Starts a new SOA session that uses the specified resource settings to perform calculations from the specified Excel workbook on the HPC cluster with the specified head node.

Syntax

HRESULT OpenSession(
  [in]           BSTR    headNode,
                 String  headNode,
  [in]           BSTR    remoteWorkbookPath,
  [in]           String  remoteWorkbookPath,
  [in, optional] VARIANT minResources,
  [in, optional] Variant minResources,
  [in, optional] VARIANT maxResources,
  [in, optional] Variant maxResources,
  [in, optional] VARIANT resourceType,
  [in, optional] Variant resourceType,
  [in, optional] BSTR    jobTemplate,
  [in, optional] String  jobTemplate,
  [in, optional] BSTR    serviceName,
  [in, optional] String  serviceName,
  [out, retval]  long    *pRetVal,
  [retval]       Long    pRetVal
);
pRetValpRetVal = .OpenSession( _
  ByVal headNode As BSTR, _
  ByVal headNode As String, _
  ByVal remoteWorkbookPath As BSTR, _
  ByVal remoteWorkbookPath As String, _
  [ ByVal minResources As VARIANT ], _
  [ ByVal minResources As Variant ], _
  [ ByVal maxResources As VARIANT ], _
  [ ByVal maxResources As Variant ], _
  [ ByVal resourceType As VARIANT ], _
  [ ByVal resourceType As Variant ], _
  [ ByVal jobTemplate As BSTR ], _
  [ ByVal jobTemplate As String ], _
  [ ByVal serviceName As BSTR ], _
  [ ByVal serviceName As String ] _
) As HRESULT

Parameters

  • headNode [in]

    C++

    The name of the head node of the cluster on which you want to create the SOA session.

    VB

    The name of the head node of the cluster on which you want to create the SOA session.

  • remoteWorkbookPath [in]

    C++

    The path to the Excel workbook for which the session should perform calculations. This path is relative to the compute nodes of the HPC cluster, and the path can refer to a shared folder. This location must be accessible from the compute nodes.

    VB

    The path to the Excel workbook for which the session should perform calculations. This path is relative to the compute nodes of the HPC cluster, and the path can refer to a shared folder. This location must be accessible from the compute nodes.

  • minResources [in, optional]

    C++

    VARIANT that specifies an integer that indicates the minimum number of resource units that are specified in the resourceType parameter that the HPC Job Scheduler Service should allocate to the service job for the SOA session. This value should be greater than 0, but less than or equal to the value of the maxResources parameter and less than or equal to the number of resources of the specified type that are available in the HPC cluster.

    VB

    Variant that specifies an integer that indicates the minimum number of resource units that are specified in the resourceType parameter that the HPC Job Scheduler Service should allocate to the service job for the SOA session. This value should be greater than 0, but less than or equal to the value of the maxResources parameter and less than or equal to the number of resources of the specified type that are available in the HPC cluster.

  • maxResources [in, optional]

    C++

    VARIANT that specifies an integer that indicates the maximum number of resource units that are specified in the resourceType parameter that the HPC Job Scheduler Service should allocate to the service job for the SOA session. This value should be greater than 0 and greater than or equal to the value of the minResources parameter.

    VB

    Variant that specifies an integer that indicates the maximum number of resource units that are specified in the resourceType parameter that the HPC Job Scheduler Service should allocate to the service job for the SOA session. This value should be greater than 0 and greater than or equal to the value of the minResources parameter.

  • resourceType [in, optional]

    C++

    VARIANT that specifies an integer value from the SessionUnitType enumeration that indicates the type of resource that the HPC Job Scheduler Service should use to allocate resources to the service job for the session.

    VB

    Variant that specifies an integer value from the SessionUnitType enumeration that indicates the type of resource that the HPC Job Scheduler Service should use to allocate resources to the service job for the session.

  • jobTemplate [in, optional]

    C++

    The template to use for the service job.

    VB

    The template to use for the service job.

  • serviceName [in, optional]

    C++

    The name of the service to run on the nodes of the cluster.

    VB

    The name of the service to run on the nodes of the cluster.

  • pRetVal [out, retval]

    C++

    The identifier of the SOA session that the method created.

    VB

    The identifier of the SOA session that the method created.

Return value

C++

Returns S_OK unless an exception occurs.

VB

The identifier of the SOA session that the method created.

Remarks

You must call the IExcelClient::Initialize method before you call the IExcelClient::OpenSession method.

Requirements

Product

HPC Pack 2008 R2 Client Utilities

Type library

Microsoft.Hpc.Excel.tlb

See also

IExcelClient

IExcelClient::Initialize

IExcelClient::CloseSession