Queries job templates.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListJobTemplates

The operation that you want to perform. Set the value to ListJobTemplates

Name String No jobtemplateName

The name of the job template.

PageNumber Integer No 1

The number of the page to return. Pages start from page 1.

Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Maximum value: 50.

Default value: 10.

Response parameters

Parameter Type Example Description
PageNumber Integer 1

The number of the page to return.

PageSize Integer 1

The number of entries returned per page.

RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368

The ID of the request.

Templates Array of JobTemplates

The array of job templates.

JobTemplates
ArrayRequest String 1-10:2

The queue job. The format is 1-10:2.

ClockTime String 12:00:00

The maximum running time of the job.

CommandLine String . /LammpsTest/lammps.pbs

The job command.

Gpu Integer 1

The maximum GPU usage for a single compute node.

Id String ehpc-job-tmpl-6RxO5y****

The ID of the job template.

Mem String 1GB

The maximum memory usage per compute node.

Name String job1

The name of the job template.

Node Integer 2

The number of the compute nodes. Valid values: 1 to 5000.

PackagePath String ./jobfolder

The directory where the job command resides

Priority Integer 0

The priority of the job.

Queue String workq

The queue of the job.

ReRunable Boolean false

Indicates whether the job can be run again.

RunasUser String user1

The name of the user who runs the job.

StderrRedirectPath String . /LammpsTest

The path to which the error output is redirected.

StdoutRedirectPath String . /Lammps

The path to which the standard output is redirected.

Task Integer 2

The number of tasks per compute node. Valid values: 1 to 20000.

Thread Integer 1

The number of threads for a single task. Valid values: 1 to 20000.

Variables String [{Name:,Value:},{Name:,Value:}]

The environment variables of the job.

TotalCount Integer 1

The total number of entries.

Examples

Sample requests

https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListJobTemplates
&<Common request parameters>

Sample success responses

XML format

<ListJobTemplatesResponse>
      <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
      <TotalCount>1</TotalCount>
      <PageNumber>1</PageNumber>
      <PageSize>1</PageSize>
      <Templates>
            <JobTemplates>
                  <Name>LammpsTestPbs</Name>
                  <RunasUser>alibaba</RunasUser>
                  <CommandLine>. /LammpsTest/lammps.pbs</CommandLine>
                  <StdoutRedirectPath>. /Lammps</StdoutRedirectPath>
                  <Id>ehpc-job-tmpl-6RxO5y****</Id>
                  <ReRunable>false</ReRunable>
                  <ClockTime>12:00:00</ClockTime>
                  <Gpu>1</Gpu>
                  <Mem>1GB</Mem>
                  <Node>2</Node>
                  <Task>2</Task>
                  <Thread>1</Thread>
                  <StderrRedirectPath>. /LammpsTest</StderrRedirectPath>
                  <Priority>0</Priority>
            </JobTemplates>
      </Templates>
</ListJobTemplatesResponse>

JSON format

{
    "ListJobTemplatesResponse": {
        "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
        "TotalCount": 1,
        "PageNumber": 1,
        "PageSize": 1,
        "Templates": {
            "JobTemplates": {
                "Name": "LammpsTestPbs",
                "RunasUser": "alibaba",
                "CommandLine": ". /LammpsTest/lammps.pbs",
                "StdoutRedirectPath": ". /Lammps",
                "Id": "ehpc-job-tmpl-6RxO5y****",
                "ReRunable": false,
                "ClockTime": "12:00:00",
                "Gpu": 1,
                "Mem": "1GB",
                "Node": 2,
                "Task": 2,
                "Thread": 1,
                "StderrRedirectPath": ". /LammpsTest",
                "Priority": 0
            }
        }
    }
}

Error codes

HttpCode Error code Error message Description
503 ServiceUnavailable The request has failed due to a temporary failure of the server The error message returned because the request has failed. The server is temporarily unavailable.

For a list of error codes, visit the API Error Center.