XGrid Tutorial Part 3: Monte Carlo on the Science Center XGrid

From dftwiki3
Jump to: navigation, search
XgridLogo.png

This tutorial is a short series of steps illustrating how to work on the Smith College Science-center XGrid 88-processor system.

You should go through Tutorial #1 first, and make sure you know how to submit jobs to an XGrid system using the command line.


This is the third of several tutorials on the XGrid at Smith College.

Setup

Account

  • Get an account and password for the 88-processor XGrid
  • Connect to mathgrid0.smith.edu using your new login information.

This section is only visible to computers located at Smith College

Bash Profile

  • In this new account, create a new .bash_profile file:
#export PS1="\w> "
PS1='[\h]\n[\t] \w\$: '
PS2='> '

alias ll='ls -lFtr'
alias ls='ls -F'
alias ltr='ls -ltr'
alias h='history'

export DISPLAY=:0.0
export EDITOR=/usr/bin/emacs
export TERM=xterm-color
 
export XGRID_CONTROLLER_HOSTNAME=mathgrid0.smith.edu
PATH="/Network/Servers/mathgrid0.smith.edu/Volumes/Data/home/xxxxxx/bin:${PATH}:."
where you will replace xxxxxx by your login name.
  • source it!
  source .bash_profile

Repository of Files

  • You need to copy files from your xgridmac account before you can actually run them on the mathgrid0.smith.edu system.
  • Create a new directory in your system, say XGrid, cd to it, and rsync over the files from your monte-carlo lab:
  cd 
  cd XGrid
  rsync -av  352b.xx@xgridmac.dyndns.org:yourMonteCarloDir/*  .
where you should replace xx by your two-letter Id, and yourMonteCarloDir/ by the directory where you have stored your files.
  • The XGrid in Bass uses Kerberos as the network authentication system to allow the root node, mathgrid0, to talk to the other nodes (mathgrid1 to 10). For this reason, the switch -auth Kerberos should be added to all xgrid commands of the type xgrid -job result -id nnnn. This means that you need to update all the python scripts that issue xgrid commands.
Edit the getXGridOutput.py script and add the switch -auth Kerberos to every xgrid command. For example,
   dothis = "xgrid  -job results -id %d" % jobId
should become:
   dothis = "xgrid -auth Kerberos -job results -id %d" % jobId

Right Permissions

Make sure your Python files are readable and executable:

   chmod a+rx *.py

Test

  • The first thing you need to do is to let the Kerberos system know your identity so that you can start issuing xgrid commands. The best way to do this is to just ask for some grid information:
  xgrid -auth Kerberos -grid list
You will be asked to enter your XGrid username and password.
  • From now on (for your session), you will not have to reenter your credentials when you issue xgrid commands.
  • Verify that your new setup works by issuing the following command at the Linux prompt:
   xgrid -auth Kerberos -job submit montecarlo.py 10000 | getXGridOutput.py

   Job 1220 stopped: Execution time: 0.000000 seconds
   ------------------------------ 
   N= 100000
   pi= 3.14028

   Total execution time: 0.000000 seconds



ComputerLogo.png
Lab Experiment #1
Make sure you can go successfully through the same series of steps described above, and that you can run the Monte Carlo evaluation of Pi on mathgrid0.



ComputerLogo.png
Lab Experiment #2
When this works, carry over the files related to the XGrid Lab 2, and repeat Experiments 1, 2, 3, and 4. Run the batch file with varying number of tasks. Remember that the XGrid located in Bass hosts 88 processors!



Monitoring

Ganglia

Ganglia.png
  • Use may want to use the Ganglia package to monitor the grid. Ganglia is an open-source package for monitoring not only xgrid systems, but parallel systems in general.









XGrid Admin

XGridAdminOveriew.png

Because of Kerberos, and the fact that xgridmath0 and its agents run Mac OS X 10.6, the XGrid Admin GUI will work only on a Mac that has OS X 10.6 installed.

The steps are simple:

  1. Open Accounts Systems Preference Pane
  2. Choose Login Options
  3. Click "Join" button under: Network Account Server at bottom of window
  4. enter mathgrid0.smith.edu
  5. it may comeback and offer iCal services etc... but just click "Join only"
  6. Start XGrid Admin
  7. Add mathgrid0.smith.edu as controller, choose SSO and it should start the ticket process.