Presentation is loading. Please wait.

Presentation is loading. Please wait.

Grid Computing, Barry Wilkinson, 2004A3.1 Assignment 3 Simple Job Submission Using GRAM.

Similar presentations


Presentation on theme: "Grid Computing, Barry Wilkinson, 2004A3.1 Assignment 3 Simple Job Submission Using GRAM."— Presentation transcript:

1 Grid Computing, Barry Wilkinson, 2004A3.1 Assignment 3 Simple Job Submission Using GRAM

2 Grid Computing, Barry Wilkinson, 2004A3.2 Goals To use the Globus Resource Allocation Manager (GRAM) to submit jobs. GRAM supports job submission on a local or remote host. To learn how to use RSL-2 to specify job requirements. To have more practice writing clients and grid services and to run a job which consists of multiple clients accessing a grid service.

3 Grid Computing, Barry Wilkinson, 2004A3.3 Steps Make sure you are in the correct directory. Find a free TCP port. (Can be done from any directory.) Start a container using a free TCP port. Start a proxy process using a second shell. Submit a pre-existing job using the managed-job- globusrun command. Write, compile, and submit your own simple job using GRAM. Write and deploy a grid service. Write and execute client to access service using GRAM. Modify RSL-2 file to execute multiple clients, and test. End your grid session.

4 Grid Computing, Barry Wilkinson, 2004A3.4 Step 1: Selecting Directory Go to the GLOBUS_LOCATION directory, i.e, with: cd $GLOBUS_LOCATION All pathnames that follow assume that you are in this directory. Note: Globus commands generally must be issued from the GLOBUS_LOCATION directory, which on terra is /usr/local/globus.

5 Grid Computing, Barry Wilkinson, 2004A3.5 Step 2: Determine free TCP ports In Step 3, you will start a container process. That process will listen on a TCP port that must not already be in use. Find a free TCP port using the netstat command: netstat –t –all

6 Grid Computing, Barry Wilkinson, 2004A3.6 Step 3: Start a Container Start a container with: globus-start-container –p portnumber where portnumber is the port number found in step 2.

7 Grid Computing, Barry Wilkinson, 2004A3.7 Step 4: Start a Second Shell Start a second shell for remaining commands since the container process in first shell does not terminate and is running in the foreground. Go to the GLOBUS_LOCATION directory. All pathnames that follow assume that you are in this directory.

8 Grid Computing, Barry Wilkinson, 2004A3.8 Step 5: Start a Proxy To start proxy: grid-proxy-init Then enter your pass phrase.

9 Grid Computing, Barry Wilkinson, 2004A3.9 Step 6: Submit a Job In this step, will use a pre-existing program, echo. Use managed-job-globusrun to submit job: managed-job-globusrun -factory \ http://152.30.5.102:portnumber/ogsa/services/base/gram/ MasterForkManagedJobFactoryService \ -file schema/base/gram/examples/test.xml where: -factory for service to use: MasterForkManagedJobFactoryService -file for file that specifies job and resources including path to job executable. Written in Resource Specification Language 2 (RSL-2), which is a XML schema.

10 Grid Computing, Barry Wilkinson, 2004A3.10 Step 6 (continued) Study the content of the file test.xml as an example of the RSL-2 language used to specify resources needed by a job. Important tags in the RSL-2 XML schema for this assignment include: gram:executable The executable used in test.xml is /bin/echo gram:arguments gram:stdout gram:count

11 Grid Computing, Barry Wilkinson, 2004A3.11 Step 7: Write, compile, and run your own job Write your job in Java (or C or C++) that is our version of the echo program. Requires creating: – A new directory below your home directory that has your echo program files (source and class). – Your xml file, Echo.xml, written in RSL-2. Potential Mistake: In Java, the name of the executable is java and the name of your class file is the first argument!

12 Grid Computing, Barry Wilkinson, 2004A3.12 Step 8: Applying techniques In this step, various techniques so far in the assignments will be used to create client(s) accessing a grid service. Clients are started with managed-job- globusrun.

13 Grid Computing, Barry Wilkinson, 2004A3.13 Task 1 Write and deploy a grid service called Item. Instances of this service provide inventory information about specific item being sold in a store. Service has three methods:  void store(int n) that sets the number of items held to n.  int remaining() that returns the number of items left in the store.  void buy(int m) that decrements the number of items held by m (i.e. subtracts m from the number of items).

14 Grid Computing, Barry Wilkinson, 2004A3.14 Service similar to that in assignment 2 only in a different context. Can use the code in assignment 2 and modify it accordingly. Use service browser to check that service properly deployed and functioning.

15 Grid Computing, Barry Wilkinson, 2004A3.15 Task 2 An instance of the Item class being used by Wal-Mart to decide when to order more "widgets" that they sell from their shelves. Instance of Item for widgets called widget and stores the number of widgets currently unsold in the store. Initially, there are 100 widgets.

16 Grid Computing, Barry Wilkinson, 2004A3.16 Write a client class called Shopper that represents a shopper buying widgets. Number of widgets a shopper buys provided as a command line argument, and number widgets remaining redirected from standard output to a file.

17 Grid Computing, Barry Wilkinson, 2004A3.17 Test the client with the deployed service Item, with a shopper, shopper1, that is buying five widgets using the command line of the form used in assignment 2,step 10:. java -classpath./build/classes/:$CLASSPATH …

18 Grid Computing, Barry Wilkinson, 2004A3.18 Task 3 Using managed-job-globusrun to start job Create a suitable RSL file for shopper. (Use the echo program RSL file as a template.) Then use managed-job-globusrun command to cause shopper program to be executed from this command.

19 Grid Computing, Barry Wilkinson, 2004A3.19 Task 4 Use the managed-job-globusrun command to cause four instances of the shopper program to be executed. (Modify the RSL count parameter.) Print out the output file showing the results of four shoppers each buying widgets.

20 Grid Computing, Barry Wilkinson, 2004A3.20 Disclaimer We have not done Step 8 ourselves yet and there may be missing critical information.

21 Grid Computing, Barry Wilkinson, 2004A3.21 Step 9: End the Grid Session Before logging off terra, kill your container process

22 Grid Computing, Barry Wilkinson, 2004A3.22 What to submit Produce a 4 - 6 page Word document. Include your name and brief explanation of what you did, referring to assignment. Include your modifications and code. Show that you successfully followed the instructions and performs all tasks by taking screen shots. Include these screen shots in the document. Number of screen shots is up to you but it should demonstrate your programs worked.

23 Grid Computing, Barry Wilkinson, 2004A3.23 Where to Submit Submit your document to me electronically using the WCU WebCT submission system. https://online2.wcu.edu PLEASE DO NOT SUBMIT TO ME BY EMAIL UNLESS I ASK YOU TO DO THAT!!

24 Grid Computing, Barry Wilkinson, 2004A3.24 Grading (Tentative) 75% for completing tasks 1 - 7 with proper write-up. 25% for completing task 8, with proper write-up.* Partial credit as appropriate. Screen shots without brief description will incur reduction in grading. * Assumes Task 8 can be done. Grading policy subject to change but only to make it fairer.

25 Grid Computing, Barry Wilkinson, 2004A3.25 Due Date 11:59 pm Tuesday October 5th, 2004 unless there are system problems.

26 Grid Computing, Barry Wilkinson, 2004A3.26 Announcement Class test Thursday October 7th, 2004. The plan is to make this test a take- home test administrated on WebCT. Topics: Everything in slides and in assignments 1-3.


Download ppt "Grid Computing, Barry Wilkinson, 2004A3.1 Assignment 3 Simple Job Submission Using GRAM."

Similar presentations


Ads by Google