Difference between revisions of "Mathematica"

From Peyton Hall Documentation
Jump to navigation Jump to search
(Updated the OS X Font install instructions)
m (Use Modules)
Line 3: Line 3:
  
 
== Overview ==
 
== Overview ==
We currently have 10 floating licenses for Mathematica in the building; this means that you can run it on any machine, but only 10 copies may be run at the same time.  If you're having trouble with running or using Mathematica, check to see if others are using up all the licenses by running the command 'monitorlm'
+
You can run Mathematica by loading the appropriate [[Modules|module]] if not already loaded with <tt>module load mathematica</tt> then executing <tt>mathematica</tt> from the command line.
 +
 
 +
 
 +
We currently have 10 floating licenses for Mathematica in the building; this means that you can run it on any machine, but only 10 copies may be run at the same time.  If you're having trouble with running or using Mathematica, check to see if others are using up all the licenses by running the command <tt>monitorlm</tt>.
  
  

Revision as of 19:32, 31 October 2011

Mathematica is, according to Wolfram Research, "the world's most powerful mathematical software system." There are many in the building who use it regularly for their research.


Overview

You can run Mathematica by loading the appropriate module if not already loaded with module load mathematica then executing mathematica from the command line.


We currently have 10 floating licenses for Mathematica in the building; this means that you can run it on any machine, but only 10 copies may be run at the same time. If you're having trouble with running or using Mathematica, check to see if others are using up all the licenses by running the command monitorlm.


Font issues

If you're not running Mathematica locally on a department desktop machine (using your laptop, or a machine at home through a SSH connection) you may have some issues with fonts displaying properly. Here's a couple links that may help you out:


OS X fonts

The steps to configuring the Mathematica fonts on a Mac OS X machine are:

  1. Download the Mathematica 5 fonts from http://support.wolfram.com/mathematica/systems/linux/general/files/MathFonts_52_Linux.tar.gz
    This contains three directories... Fonts/AFM, Fonts/BDF and Fonts/Type1. Only BDF and Type1 are really needed.
  2. Put the fonts where the Apple X11 server will find them, in /usr/X11R6/lib/X11/fonts
    You should create a subdirectory in there; the name mathematica would make sense.
  3. Untar the file in the directory you just created: cd /usr/X11R6/lib/X11/fonts/mathematica; tar zxvf /path/to/MathFonts_52_Linux.tar.gz
  4. Regenerate the fonts.dir file (otherwise Mathematica will crash) with 'mkfontdir BDF Type1'
  5. To see what fonts X already knows about, run 'xset q' and look for the directories specified by "Font Path."
  6. Add the font database to X
    Type 'xset fp+ /usr/X11R6/lib/X11/fonts/mathematica/BDF,/usr/X11R6/lib/X11/fonts/mathematica/Type1 ; xset fp rehash' to do this to the current session. You can then use 'xset q' to see that X knows about the Mathematica fonts.
    AFM isn't necessary for this to work.
  7. Edit /etc/X11/xinit/xinitrc to make the change permanent
    To make the new fonts show up all the time, you'll have to tell X11 about them when it starts. Edit the xinitrc file and add the two 'xset fp' commands from above to the file, before the window manager line.

NOTE:

The commands mkfontdir and xset are in /usr/X11R6/bin, which is not usually in the default PATH. In order to run them you have to specify the full path to the binary. Also, most of the above will require root or super user access, so either 'su - root' first (if you've enabled the root account) or use 'sudo' to gain the appropriate privileges.


Crashes

Bad Atom Errors/SIGSEGV Errors

These errors might stem from not using X11ForwardTrusted if you're running it across an SSH session. Have a look here for more information.