How to submit a job in Windows HPC server r2

Source: Internet
Author: User

There are several readers in the previous high-performance computingArticleThis topic is too far away from mainstream developers. In fact, Microsoft's DNA is to make complex things simple and spread the capabilities used by a few people to the majority. Therefore, I have excerpted two practical operation chapters in Chapter 3 "using the Job Scheduling System" of "" to share with readers of the blog site. I wish you a pleasant weekend!

The Job Scheduling System provides many job submission and management methods. You can easily submit and manage jobs through a friendly interface. Through application programming interfaces, third-party software vendors can seamlessly integrate with job schedulers. With the script and powershell functions, the administrator can write various script files that are convenient for end users to run applications.

Key points of this Chapter

    • Understand the concept and usage principles of Job Manager
    • Submit a job using the user interface, C # application interface, command line, and powerful script
    • Monitor application running status using the user interface

3.1 concept of Job Scheduling System

A cluster is the top-level unit of Windows HPC Server 2008 R2. A cluster contains the following elements.

    • Node: a single physical or logical computer with one or more processors. A node can be a header node, a computing node, or a WCF broker node.
    • Queue: an element that provides queuing and Job Scheduling functions. Each windows HPC Server 2008 R2 cluster contains only one queue and the queue contains suspended jobs. Completed jobs are cleared regularly from the queue.
    • Job: A group of tasks started by users. A job is used to reserve resources for one or more subsequent tasks.
    • Task: executed on a given computing nodeProgram. It can be a serial Program (single process) or parallel program (using multithreading, message passing interface [MPI] Or OpenMP ).

The Job scheduler queues jobs and their tasks. It allocates resources for these jobs, starts tasks on Cluster Computing nodes, and monitors the statuses of jobs, tasks, and computing nodes.

3.2 install the application

Blogger Note: This book comes with a CD-ROM for Windows HPC Server 2008 R2 trial software installation disk, which provides readers with a free 180-day trial. The installation sequence is omitted here.

3.3 submit a job

Chapter 2 describes how to submit a job in multiple ways. This chapter describes three methods: Use the Job Manager, use command line and powershell, and use the C # program.

3.3.1 Use Job Manager

(1) Start-> all programs → Microsoft HPC Server 2008 R2 → HPC job manager.

(2) In the action box, click Create parameter scan job. The create parameter scan job dialog box is displayed, as shown in Figure 3-2.

Figure 3 create a parameter scan task

(3) In the "Task Name" text box, type the job name "asianoptions valuation by interest rate ".

In step 1, enter the start value as "0" and the end value as "9 ".

In step 3, click the command line to configure asianoptions.exe 1.0 *".

In the "working directory" text box, type "\

(4) preview the parameter clearing task. If the task is not shown in 3-3, make changes and preview it again.

Figure 3 Example 3 set the command line and working directory

Note:

Setting the way for a task to access required data is an important factor in obtaining the best job performance when a job is submitted. This setting should vary with the size and Stability of the dataset. If the dataset does not change frequently and is relatively large, set it as the local data of the task. If the dataset is small, you can access it through file sharing. If the dataset is large and frequently changed, you need to transmit the data to the node. Windows HPC Server 2008 R2 supports parallel and high-performance file systems to improve access performance to very large datasets. By specifying a working directory, users with small and medium-sized datasets can enjoy the best out-of-the-box experience. When the task starts, the compute node will see all the files in the working directory and can correctly process the task.

(5) Click Submit. At this time, the user returns to the Job Manager. In the list of all jobs, you can see that the job is running. Wait a few seconds until the job ends, as shown in Figure 3-4.

Figure 3 4.1.4 monitoring parameter scan job

(6) under the task tab, double-click "Task 1.1-1.10" shown in 3-4 to bring up the "view job" dialog box, as shown in Figure 3-5. The above is a list of all 10 tasks. When selecting a task, you can see the calculation result in the "output" text box. For example, if you select the fourth task, you will see the following output: "option price/interest rate (1.03) = 9.15572854540851" (note: the results are not necessarily consistent, because Monte Carlo is used here.Algorithm, The results are random), as shown in Figure 3-5.

Figure 3 details of a parameter scan task

3.3.2 use the Job scheduler command line program

(1) Start the command prompt.

(2) type job submit/parametric: 0-9/workdir: \ shpc-0110 \ applications asianoptions.exe 1.0 *". This command outputs the job ID, as shown in 3-6.

Figure 3 4.1.6 use command line to submit a parameter scan job

(3) monitor job status: Type "job view 33" in the Command Prompt window, as shown in result 3-7.

Figure 3 job monitoring using command line 7

(4)Display the output result of a task: In the Command Prompt window, type "task view 33.1. <parameter scan serial number> ". For example, to view the output of the fourth task, type "task view 33.1.4" and press enter, as shown in Figure 3-8.

Figure 3 use the command line to display the output result

3.3.3 use powershell

(1) Start HPC powershell: Select Start> all programs → Microsoft HPC pack 2008 R2 → HPC powershell ".

(2) At the HPC powershell prompt, type "new-hpcjob" and press enter, as shown in Figure 3-9.

Figure 3 ‑ using powershell to create a job

(3) then, type "Add-hpctask-jobid 35-parametric-start 0-end 9-workdir \ shpc-0110 \ applications-CommandLine" asianoptions.exe 1.0 * ", Press enter, the result is 3-10.

Figure 3 add a task using powershell

(4) type "Submit-hpcjob-ID 35" and press enter, as shown in result 3-11.

Figure 3 using powershell to submit a job in iis11

(5)Monitor job status: Type "get-hpcjob-ID 35" and press Enter. The result is 3-12.

Figure 3 using powershell to monitor jobs in iis12

(6)Display task result output: To display the results of the fourth task, type "get-hpctask-jobid 35-taskid 1-subtaskid 4 | FL" and press enter, as shown in result 3-13.

Figure 3 using powershell to display job output results

Command Line and powershell Summary

The command line and powershell usage of the Job scheduler are summarized in Table 3-1.

Table 3 Summary of command line and powershell usage of scheduler 1

Operation

Command Line

Powershell

Create and submit jobs

Job submit

New-hpcjob, add-hpctask, submit-hpcjob

Displays the list of active (waiting and running) States

Job list

Get-hpcjob

Displays the job list in all States.

Job list/all

Get-hpcjob-owner *-state all

Displays details of a job.

Job view <jobid>

Get-hpcjob-id <jobid>

Display all tasks of a job

Job listtasks <jobid>

Get-hpctask-jobid <jobid>

Displays details of a parameter scan task.

Task view <jobid>. <taskid>. <Subtaskid>

Get-hpctask-jobid <jobid>-taskid <taskid>-Subtaskid<Subtaskid> | Fl

CLS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.