Exercises for the Bohrium and MiG Workshop

We propose that you get acquainted with MiG and Bohrium to the extent you think it makes sense for you. The list of exercises below can be used for inspiration, but feel to explore for yourself.

For those of you familiar with Matlab the NumPy for Matlab users intro may come in handy.

Prerequisites

In order to access the grid you need an account with a personal user certificate. If you want to run code on your own laptop instead of going through MiG you will need to install at least Python and NumPy there. You can still run the code with Bohrium on MiG, if you don't want to go through the not so user-friendly Bohrium build and install procedure.

  1. Sign up for MiG and await email notification
  2. Import your certificate and make sure you can access your personal entry page at https://dk-cert.migrid.org

Basic Use Exercises

  1. Request membership of relevant virtual organizations from your VGrids page
  2. View the VGrid entries again after receiving acceptance notification by email
  3. Inspect your MiG home Files and upload or edit a file there
  4. Find the VGrid shared folder and upload or edit a file there
  5. Open the VGrid tracker and add a dummy wiki subpage on the VGrid wiki there (hint: click Login first). Perhaps upload an image to the shared vgrid folder and see if you can add it on the wiki page.
  6. Find out which resources are available for the VGrid and how many of them provide the Numpy and Bohrium runtime environments respectively.
  7. Run a basic hello world job on MiG from the Submit Job page and find the result files.
  8. Run the Fibonacci job on MiG like it was briefly shown on the intro slides. First upload the corresponding python program fib.py to your MiG home. Then either upload and submit the raw job specification or use it to manualy fill in the Submit Job fields.
  9. Optionally run a NumPy example on your own laptop. E.g. the basic numpy validation code or the simple matrix multiplication code which just multiplies two arbitrary numpy matrices.
  10. Run the checknumpy.mRSL job on MiG with the checknumpy.py in your MiG home.
  11. Run a basic Numpy job on MiG reusing the mxmult example above (hint: upload mxmult.py to your MiG home and submit a job requesting the NUMPY-1.X-1 runtime environment, at least 60 seconds of CPUTIME, at least 256 MB of memory and selecting 'ANY' as VGrid. The pyfib.mRSL or checknumpy.mRSL job description may be useful again).
  12. Run the checkbohrium.mRSL job on MiG with the checkbohrium.py in your MiG home.
  13. Run a basic Bohrium job on MiG (hint: request the BOHRIUM-ANY-1 runtime environment and sensible job values like above)
  14. Run the Jacobi stencil benchmark both as Numpy and Bohrium job on MiG. You need the jacobi_stencil.py and util.py files in your MiG home (hint: you can take a look at the proposed solution jacobi-bohrium.mRSL if you run into problems).

Advanced Use Exercises

These exercises are mainly for users who want more efficient access to MiG than what the web interface provides. They typically require a bit more preparation in the form of software installation or command-line use.

  1. Access MiG home with SFTP (hint: Settings -> ssh settings and the job files wiki page)
  2. Access MiG home with SSHFS (hint: see SFTP hint above and the remote file access wiki page)
  3. Make a check out of the VGrid code repository and modify a test file there (hint: open the VGrid tracker, browse source and find instructions in the readme file there. Requires Mercurial)
  4. Download the user scripts from Downloads and run a job that way (requires curl)
  5. Use the example in trunk/mig/user/xmlrpcsslclient.py for scripted MiG control from the command line.
  6. Use the example in trunk/mig/user/migsftp.py for scripted MiG file access from the command line (requires paramiko).

Your own code?

In case you brought some of your own scientific code you can try to run it on the grid as such if possible or port it to Bohrium so that it will run there.