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 a MiG account with a personal user
certificate. Please refer to our
certificate renewal
page if you already have an account, but can no longer access the grid,
because your certificate is more than a year old and thus expired.
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
Bohrium install procedure.
- Sign up for MiG and await email notification
- Import your certificate and make sure you can access your personal entry page at https://dk-cert.migrid.org
Basic Use Exercises
- Request membership of relevant virtual organizations from your VGrids page
- View the VGrid entries again after receiving acceptance notification by email
- Inspect your MiG home Files and upload a file there
- Find the VGrid shared folder and make a new sub-folder there
- Edit and save a new file directly in your new shared sub-folder
- Find the direct URL to your new file so that you can e.g. send a mail to point colleagues to it (hint: open the file and copy the address).
- Copy the file you uploaded to your new shared sub-folder
- Find the direct URL to your new shared VGrid sub-folder so that you can e.g. easily point your colleagues to the set of files there (hint: right-click the rightmost 'breadcrumbs' entry at the top of the Files page when the folder is open).
- Open the CINEMA or P-Cubed tracker from VGrids and add a dummy wiki subpage under the temporary test zone on the VGrid wiki there. Perhaps upload an image to the shared vgrid folder and see if you can add it on the wiki page (hint: find the image URL as above).
- Find out which resources are available for the VGrid and how many of them provide the Numpy and Bohrium runtime environments respectively (hint: VGrids -> View Monitor for the VGrid. View the runtime environments on the Runtime Envs page).
- Run a basic hello world job on MiG from the Submit Job page and find the result files.
- 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.
- 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.
- Run the checknumpy.mRSL job on MiG with the checknumpy.py in your MiG home.
- 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).
- Run the checkbohrium.mRSL job on MiG with the checkbohrium.py in your MiG home.
- Run a basic Bohrium job on MiG (hint: request the BOHRIUM-ANY-1 runtime environment and sensible job values like above).
- 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, sometimes in the form of software installation or command-line use.
- Work seamlessly with your MiG home files/folders directly in your desktop file manager using WebDAVS (hint: Settings -> WebDAVS settings and the WebDAVS section in the related ERDA user guide)
- Access MiG home with SFTP (hint: Settings -> ssh settings and the job files wiki page. Requires an SFTP client.)
- (Optional on Mac / Linux) Access MiG home with SSHFS (hint: see SFTP hint above and the remote file access wiki page. Requires a functional sshfs and fuse installation.)
- 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)
- Download the user scripts from Downloads and run a job that way (requires curl)
- Use the example in trunk/mig/user/xmlrpcsslclient.py for scripted MiG control from the command line.
- 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.