330 likes | 580 Views
Sun Grid Engine Grid Computing Assignment – Fall 2005. James Ruff Senior Department of Mathematics and Computer Science Western Carolina University. Discover what Sun Grid Engine is and what it accomplishes. Find out the advantages and disadvantages of Sun Grid Engine.
E N D
Sun Grid EngineGrid Computing Assignment – Fall 2005 James Ruff Senior Department of Mathematics and Computer Science Western Carolina University
Discover what Sun Grid Engine is and what it accomplishes. Find out the advantages and disadvantages of Sun Grid Engine. Submit an example job submission using the command line. Submit and monitor a job using the Graphical User Interface. Discover a real application of Sun Grid Engine. (Using Scheme) We will:
What is Sun Grid Engine? • Sun Grid Engine, basically speaking, is software designed for cluster computing. • Sun Grid Engine has two main versions: a professional version that may be purchased and a free open source implementation.
What Does Sun Grid Engine Allow Me to do? • Run jobs on a cluster (1+ nodes) that may include parallel jobs. • Submit job(s) to a cluster, which will then select which machine the job(s) will run on. • Basically, SGE allows a user to run jobs on remote machines.
Relatively easy installation. Wide usage, thus large knowledge base. Allows for GUI interface. Requires NFS. Large network strain. (Worst Case) Requires each user’s account to be mounted across the cluster. Pros/Cons of Sun Grid Engine ProsCons
Master Host Execution Host / Administration Host Submission Host Shadow Master Host Execution Host / Administration Host / Submission Host Execution Host / Administration Host / Submission Host Execution Host / Administration Host / Submission Host An Example Setup of Sun Grid Engine
Demonstration: Finding Hosts • Sun Grid Engine allows any user to see how many hosts are available to run jobs. This is done using the ‘qhost’ command.% qhost • This should result with several different hosts, along with how many processors each node has, the amount of ram, the amount of swap space and the usage of those resources.
Execution Host Selection • The particular node your job runs on depends on the scheduling policies for your cluster. • In general, no single node job should execute on the same node twice in a row. (Given there are at least two execution nodes.)
Demonstration: qrsh (Sun Grid Engine Remote Shell Execution) • The binary ‘/bin/hostname’ displays the hostname of the current machine. • Example:% qrsh /bin/hostname • Try running this command several times. Notice that the execution changes to different nodes.
Batch Jobs in Sun Grid Engine • Batch jobs are submitted in the form of a shell script. (ex: bash) • The script should be viewable by the entire cluster. (Unless other arrangements have been made to transfer between nodes.)
Demonstration: A Sleepy Job • Execution Script:#$ -S /bin/sh# print date and timedatesleep 60# print date and time againdatesleep 60# See which host we are running onhostname
Demonstration: A Sleepy Job (Con’t) • Checking the status of our job:% qstat • The ‘qstat’ command will return the queue that the job is executing on. (The execution host name.) The status will also be listed in the output.
Other Useful Commands for Sun Grid Engine Job Submission • qdel – Deletes a specified job. • qhold – Holds a specified job. • qrls - Releases a specified job from previous hold state. • qresub – Submit a copy of a currently executing job.
Demonstration: A Sleepy Job – Gathering Output • The filenames for the output (using a default submission) are the following: • (scriptfilename).sh.o(jobID) – The standard output that was produced by your job. • (scriptfilename).sh.e(jobID) – The standard error output that was produced by your job. • To view your files, use the following:% cat filename.sh.?(jobID)
Beyond the Command Line – Sun Grid Engine’s Graphical User Interface • Sun Grid Engine provides a Graphical User Interface that can complete everything that we did during the previous examples.
Demonstration: Starting the Graphical User Interface • Please enter the following command to start the graphical user interface:% qmon >/dev/null 2>&1 &
Exploring the Graphical User Interface • The Graphical User Interface has a wide variety of options. We will only concern ourselves with the following icons: Exit GUI View the Status of a Job View the Status of a Job
Demonstration: Running A Job through a GUI in Sun Grid Engine • To bring up the submission window, please click on the submission icon. (Shown to the left)
Demonstration: Checking the status of the job • Please click ‘Done’ and select the ‘Job Status’ button. • Click on the tab called ‘Running Jobs’.
Demonstration: Closing qmon • Please click on the ‘Done’ button. • To close qmon, click on the ‘Exit’ button.
Demonstration: Creating our own submission script • An existing binary, cal, is used to print out the current month. • We can create a submission script to submit the binary to Sun Grid Engine (Filename: CalSubmission.sh):/usr/bin/cal $1
Demonstration (Con’t) • We can submit this script with command line arguments.%qsub CalSubmission.sh 2006%qsub CalSubmission.sh 2000 • The output will appear shortly in files as previously shown.
Submission to Sun Grid Engine Through GRAM • Gridwise technologies, with other groups, have created an adapter where users can use the Sun Grid Engine as a scheduler for GRAM job submissions. • Thus, the master node of Sun Grid Engine can now become the master node for GRAM submissions to SGE.
Demonstration: Submitting a Job to SGE through GRAM • First, we must have a proxy. (As described in the GRAM presentation.)% grid-proxy-init(Enter YOUR password here.) • We already have a container running on port 8443 (Secure).
Demonstration (Con’t) • The GRAM job submission for SGE is almost identical to Fork.% globusrun-ws –submit \-streaming –Ft SGE \-c /usr/bin/uptime • The submission may take up to a couple of minutes.
SGE Job Submissions are not limited to pre-existing binaries • We have created two scripts thus far: simple.sh and CalSubmission.sh • These scripts may be submitted to GRAM:%globusrun-ws –submit \-streaming –Ft SGE \-c /home/yourusername/simple.sh
How This Works • GRAM is responsible for authorization. • After authorization, SGE is used to choose the node to execute on. • The streaming capability requires the use of RFT (Reliable File Transfer).
Conclusion • We have: • Explored the Pros/Cons of using Sun Grid Engine. • Used the command line and graphical user interface to submit a wide variety of jobs to the Sun Grid Engine. • Used GRAM to submit jobs to the cluster using Sun Grid Engine.
Questions? Please ask!