A3.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.
A3.3 Steps Find a free TCP port. Start a container using a free TCP port. Start a proxy process using a second shell. Submit a pre-existing job using the globusrun-ws command.
A3.4 Steps continued Write, compile, and submit your own simple job using GRAM. End your grid session.
A3.5 Extra credit Write client to access a service. Execute the client using GRAM. Modify RSL-2 file to execute 4 clients. Execute 4 identical clients using GRAM. End your grid session.
A3.6 Step 1: Preliminaries Log on to assigned server and create assignment3 directory. cd into that directory. In Globus 3.2, Globus commands had to issued from $GLOBUS_LOCATION directory but this constraint is lifted with GT 4
A3.7 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
A3.8 Step 3: Start a Container Switch to user globus and start a container with: sudo –u globus \ globus-start-container –p portnumber where portnumber is the port number found in Step 2. Switching to user globus is a security issue. Currently the UNC-C system does not have this requirement We have experimented with using a single container for everyone, as a container has a very big footprint, and multiple containers can cause trashing.
A3.9 Step 3: Start a Container Switch to user globus to start a container with: sudo –u globus \ globus-start-container –p portnumber where portnumber is the port number found in Step 2. Switching to user globus is a security issue. Currently, the UNC-C system does not have this requirement.
A3.10 We have experimented with using a single container for everyone, as a container has a very big footprint, and multiple containers can cause trashing. But then when one closes the container, everyone is effected.
A3.11 Step 5: Start a Proxy To start proxy: grid-proxy-init Then enter your pass phrase.
A3.12 Step 6: Submit a Job In this step, will use a pre-existing program, echo. Use globusrun-ws to submit job: globusrun-ws -submit –F localhost:portnumber -f $GLOBUS_LOCATION/test/globus_wsrf_gram _service_java_test_unit/test.xml where test.xml specifies job and resources including path to job executable. Written in Resource Specification Language 2 (RSL-2), which is a XML schema.
A3.13 Step 6 (continued) Study contents of 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: The executable used in test.xml is /bin/echo
A3.14 Step 7: Write, compile, and run your own job Write your job in Java (or C or C++) that is your version of the echo program. (This step is written purposely in an obscure fashion!) Create a new directory below your home directory that has your echo program files (source and class). Also need an RSL file, myecho.xml say, to specify job. Potential Mistake: In Java, the name of the executable is java and the name of your class file is its first argument!
A3.15 Step 8: Ending your session Stop the container: sudo –u globus stopcontainer.sh portnumber s The last argument, s, is missing in the write-up (unless now corrected). For the UNC-C system, we altered the script so as not to use this argument.
A3.16 Extra work For graduate students and extra credit for undergraduates
A3.17 In assignment 2, a client accesses a web service. The client was started on the command line. Demonstrate starting the client using globusrun-ws rather than directly. Demonstrate starting four such clients using globusrun-ws.
A3.18 How this could be used in a client-server application “widget” shopper at Walmart
A3.19 Consider a web service accessing an inventory about specific items being sold in a store. The inventory is resource. The web service represents a cash register, or cashier. Consider a specific item called a “widget.” Clients exist representing “widget” buyers.
A3.20 Inventory widgets: number Clients Cashier (web service)
A3.21 Web Service has three methods: void store(int n) that sets the number of widgets held to n. int remaining() that returns the number of widgets left in the store. void buy(int m) that decrements the number of widgets held by m (i.e. subtracts m from the number of widgets).
A3.22 Service similar to that in assignment 2 only in a different context. Can use the code in assignment 2 and modify it accordingly.
A3.23 Create the web service and resource. Set the initial number of widgets (say 100 widgets).
A3.24 Write a client class say called Shopper that represents a shopper buying widgets. Number of widgets a shopper buys provided as a command line argument.
A3.25 Test the client with the deployed web service 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 …
A3.26 Using globusrun-ws to start job Create a suitable RSL file for shopper. (Use the echo program RSL file as a template.) Then use globusrun-ws command to cause shopper program to be executed from this command.
A3.27 Use the globusrun-ws command to cause four instances of the shopper program to be executed. (Modify the RSL count parameter.) Print out the results of four shoppers each buying widgets.
A3.28 Disclaimer We have not done this ourselves yet and there may be missing critical information.
A3.29 What to submit Produce a 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.
A3.30 Where to Submit Submit your document to WebCT by the posted due date.
A3.31 PLEASE DO NOT SUBMIT TO ME BY UNLESS I SPECIFICALLY ASK YOU TO DO THAT!!
A3.32 Grading (Tentative) 50% for completing tasks with proper write-up. 50% for completing task 7, with proper write-up.* Partial credit as appropriate. No screen shots will incur big reduction in grading. * Grading policy subject to change but only to make it fairer.