Click here for zip file containing the above *.nb and *.txt files. Place all files on your Desktop.
The instructions below are unfortunately obsolete and require updating. Please visit this UChicago webpage for the interim (running jobs with SLURM).
We give a sample batch job submission on the cluster using
the Mathematica code "test7c.nb" saved as a text file.
Log into odyssey.fas.harvard.edu and upload the text file
Then issue two commands at the UNIX prompt:
module load math/mathematica-8.0.1 bsub -q short_serial "math < test7c.m > test7c-out.txt"The suffix ".m" is included here (unlike for Matlab).
All text output goes to "test7c-out.txt", but graphics output is much less convenient.
Here are the needed revisions to the text file. It has first line:
AppendTo[$Echo, "stdout"]and last line:
QuitWe selected two plots to save, the initial xy-plot (defined in the file to be Curve) and the linear regression plot (defined in the file to be LnRgrs). Subsequent commands in the file:
Export["curve.m",Curve,"TEXT"] Export["lnrgrs.m",LnRgrs,"TEXT"]create two files, which can later be converted to plots on a local copy of Mathematica (on your laptop, for example), assuming you have this. Question: is there a better way? Answer: I am still looking for this.
Less simple is exporting graphics directly to PDF or JPG files in batch mode, because even though Mathematica is not displaying anything, it still needs the graphical front end running.
On Odyssey, this means that you must have an X display setup. In that case, Mathematica will automatically run the front end and exporting will work. If you are connecting to Odyssey from Linux or a Mac with X11 installed, merely use ssh -Y. If you are connecting from Windows, you must use Cygwin, Xming or X-Win32 to run an X server in order to do the same.
Here is general information on running pre-installed software packages in batch on Odyssey.
To run Mathematica interactively on the cluster, issue two commands at the UNIX prompt:
module load math/mathematica-8.0.1 bsub -Is -n 1 -q interact mathTo exit Mathematica, type Exit or Quit at the Mathematica prompt.
If you wish to display graphic results on the screen, you need to have X-windows server software and enable X11 tunneling in your ssh client, e.g., Cygwin/X, XMing or X-Win32.
Here is general information on interactive use of Odyssey (i.e., not submitting jobs).