OSX

From Henkelman Group

Jump to: navigation, search

Example .cshrc, .tcshrc and .alias file.

  • Make sure you have the apple developer tools installed. You can download the latest version from the apple developer site, or download xcode 2.4.
  • In Finder-Applications-Utilities-Net Info Manager-Security, enable the Root User. (this is under the Security pull down at the top)
  • In your home, make a subdirectory called code. Run:
cd ~
mkdir code
cd code
cvs checkout vtstscripts
cvs checkout tsse
cvs checkout bader
sudo ln -s vtstscripts /usr/local/vtstscripts
  • HPC: Get binary files for gfortran and g77, and install them as root using the command
sudo tar -zxvf [package].tar.gz -C /
  • MacPython - install this. Also install the numpy package from that page.
  • For PPC macs, Install the IBM xlf fortran using this package.
  • To make tsse as a part of python add the symbolic link:
cd /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages
sudo ln -s ~/code/tsse tsse
  • Copy this tsse script to your ~/bin directory and .tsserc to your home.
  • Try building tsse's fortran potentials. Open up a terminal, go to your ~/code/tsse directory and enter the command
 make
  • If the build succeeds, you're done. Otherwise, remove your tsse directory and checkout a fresh copy. Before building, a small change needs to be made in the NumPy package. Change line 133 or 164 (or there-abouts) in /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/distutils/fcompiler/gnu.py from
 opt.append('cc_dynamic')

to

 opt.append('SystemStubs')

NOTE: It is very possible (especially if you're on a PowerBook G4 running Leopard) that the file that you need to change is /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/distutils/fcompiler/gnu.py".


Also, make sure that your path includes . and /Library/Frameworks/Python.framework/Versions/Current/bin. To check this, open a terminal and type:

 printenv

If you need to add to your path, instructions can be found here.

  • Now, go to your ~/code/tsse/pot directory and run
make

If all went well, you should be able to run the python scripts in the tsse/examples directories. If there was an error with the build, DO NOT try to build again with the same copy. Make will give you no errors the second time around, but the potentials will not be correctly built. Checkout a new copy from CVS and try again.

Personal tools