Penn State University - Smeal College of Business
PSU search
Student Exchange Smeal site map Contact us Accounting faculty directory

Steven Huddart picture
 
Should I exercise my stock options?
 
 
Research
 
Case Studies
 
Courses
 
 
Stock compensation glossary
 
Compensation links
 
Securities law links
 
Tax links
 
 
Office hours and location
 
Facts About The School
 
Home | Previous | Next | Huddart Site Map

Using Mathematica on hammer.aset.psu.edu


In this course, you will need to be able to perform some mathematical optimization and algebraic manipulation. Although you may use any software package you like, I suggest that you use Mathematica for these purposes.

Smeal's RIIT Group has a license for Mathematica. The software is available to students. Students who would like to use Mathematica on a personal computer should contact Tammy Whitehill, tas1@psu.edu, who will create a work order for the installation.

If you are unable to acquire your own Mathematica license (available here http://computerstore.psu.edu/search/node/mathematica), then I suggest that you make use of the version that the University has licensed for use on the high-performance unix box called hammer.aset.psu.edu (http://rcc.its.psu.edu/hpc/guides/systems/hammer/). To gain access to hammer, you must apply by e-mail to rcc@rcc.its.psu.edu.

It is useful to know a few Unix commands. Here is a link to a quick and basic introduction: http://kb.iu.edu/data/afsk.html.

Configuration instructions

For Windows users:

You should set up your computer to make access to the GUI interface for Mathematica convenient. After completing the suggested configuration below, you should be able to start Mathematica by doing the following:

  1. Launch Xming, which runs in the background.

  2. Launch Putty and then connect to hammer by typing

    ssh -Y YOUR-PSU-USERID@hammer.aset.psu.edu

  3. At the prompt, type

    mXming.sh

    to launch Mathematica.

You must install Xming (or some similar X11 server). You also need to make some configuration adjustments to your X11 server to make it work nicely with hammer and Mathematica:

  1. Download Putty from http://rcc.its.psu.edu/hpc/guides/connectivity/putty/ and follow the instructions on that page.

  2. Download Xming along with the Xming fonts. Follow the instructions on this page: http://rcc.its.psu.edu/hpc/guides/remotedisplay/xming/

  3. Download Mathematica Fonts from http://rcc.its.psu.edu/hpc/software/mathematica/mathematica-fonts.tgz. Extract the fonts and place them in the Xming Fonts folder.

  4. Launch Xming, which runs in the background.

  5. Launch Putty and then connect to hammer by typing

    ssh -Y YOUR-PSU-USERID@hammer.aset.psu.edu

  6. To set up your configuration file on hammer so that Mathematica is available, issue this command:

    echo "module load mathematica" >> ~/.bashrc

    and hit RETURN. Now, log out of hammer by typing

    exit

    and hit RETURN. Finally, use Putty to again log in to hammer and proceed to the next step.

  7. At the prompt, type mXming.sh to launch Mathematica.

For Macintosh users:

You should set up your computer to make access to the GUI interface for Mathematica convenient. After completing the suggested configuration below, you should be able to start Mathematica by doing the following:

  1. Double click on the X11 application icon. x11 picture

  2. In the terminal window, type xhamm and hit RETURN. Now enter your PSU password and hit RETURN.

  3. Type mathematica and hit RETURN. The Mathematica splash screen and a blank Mathematica workbook should open.

On a Mac, an easy way to make these changes is to install TextWrangler textwrangler picture (freeware available at http://www.barebones.com/products/textwrangler/download.shtml) and use this program to edit the files. To edit files on hammer, connect to hammer with Fetch fetch picture(licensed for PSU users and available for download here https://downloads.its.psu.edu/ ---look under the file transfer tab), single-click on the file within Fetch, and press Command-J to edit the file. If the file does not open in TextWrangler, then highlight the file in the main window of Fetch and click the fetchgetinfo picture button. In the window that opens, select "TextWrangler.app" from the drop-down boxes beneath the words "Open files like this with:" and "Edit files like this with:".

  1. On your machine, add these lines to ~/.profile

    #These aliases automate ssh connections to hammer.

    alias ssx='ssh -C -Y -c blowfish'

    alias shamm='ssh YOUR-PSU-USERID@hammer.aset.psu.edu'

    alias xhamm='ssx YOUR-PSU-USERID@hammer.aset.psu.edu'

    #While you are it, make it easy to access WRDS.

    alias swrds='ssh YOUR-WRDS-ID@wrds.wharton.upenn.edu'

    alias xwrds='ssx YOUR-WRDS-ID@wrds.wharton.upenn.edu'

  2. On your machine, in /etc/ssh_config, change

    # StrictHostKeyChecking ask

    to

    StrictHostKeyChecking no

    This prevents blather about man-in-the-middle attacks. You need to use an administrator userid to edit this file. TextWrangler will prompt you for an administrator password.

  3. On your machine, in the /etc/sshd_config, change

    #X11Forwarding no

    to

    X11Forwarding yes

    This prevents BadAtom errors. Again, you need to use an administrator userid and password to edit this file. TextWrangler will prompt you for these.

  4. Place a nice .Xdefaults file in your home directory, ~/, on hammer. To log in to hammer before X11 is configured, open the terminal application on your Mac and type:

    source ~/.profile; shamm

    Enter your password, hit return, and then issue this command:

    cd ~; curl -O http://www.personal.psu.edu/sjh11/.Xdefaults

  5. To set up your configuration file on hammer so that Mathematica is available, issue this command:

    echo "module load mathematica" >> ~/.bashrc

  6. Install the fonts Mathematica needs. This involves several steps, so look here: Installing Mathematica fonts.

  7. If needed, additional information is here http://rcc.its.psu.edu/resources/software/mathematica/


Steven Huddart
Smeal College of Business, Penn State University, University Park, PA 16802-3603 USA
(814) 863-0048
huddart@psu.edu
vCard
Home | Previous | Next | Huddart Site Map

http://personal.psu.edu/sjh11/Courses/ACCTG597E/mathHammer.shtml
was last updated on Tue, Aug 21, 2018.
Today is Wed, Sep 18, 2019.

Unless otherwise noted, all material is:
Copyright ©1995-2018 Steven Huddart. All rights reserved.