OOF: Finite Element Analysis of Microstructures
Installing OOF2 Prerequsites
The hardest part of installing OOF2 can be installing the third party libraries that it uses. This page contains explicit instructions for installing the requisite libraries on several different operating systems.
The easiest way to install the libraries that OOF2 requires is to use a package manager, which will automatically configure, build, and install the libraries and all of the additional software that the libraries require. The tricky bit can be knowing which packages to request. This file gives explicit instructions for using package managers on OS X, NetBSD, and various flavors of Linux.
NOTE: These instructions assume that you are a non-admin user, but have sudo privileges. If you are doing this from an admin or root account you may be able to omit the sudo from many of the commands listed here.
If your variety of Linux isn't listed and you successfully installed OOF2 on it, we would appreciate it if you'd tell us what you did, so that we can include your instructions here. Also, Linux distributions and packages sometimes change, so these instructions may be outdated. If they are, please let us know!
Run these commands:
sudo zypper install python-devel sudo zypper install gtk2-devel python-gtk-devel libgnomecanvas-devel sudo zypper install liblapack3 lapack blas libblas3 sudo zypper install libMagick++-devel sudo zypper install libbz2-devel sudo zypper install libtool(tested with OpenSUSE 11.3.)
Run these commands:
sudo apt-get remove graphicsmagick-libmagick-dev-compat sudo apt-get install python-gtk2-dev sudo apt-get install libgnomecanvas2-dev sudo apt-get install libmagick++-dev sudo apt-get install liblapack-devThe first line is only necessary if already have GraphicsMagick installed, but it's harmless if you don't. (Tested with Ubuntu 10.10 and 11.04.)
See Ubuntu. The same packages should work.
Run these commands:
yum install libgnomecanvas-devel yum install gtk2-devel pygtk2-devel python-devel yum install lapack-devel blas-devel libbz2-devel yum install bzip2-devel ImageMagick-c++-devel yum install libtool yum install gcc-c++(Tested with CentOS 5.5.)
Although using either is much easier than installing all of the OOF2 dependencies by hand, neither fink nor MacPorts works completely smoothly because the default version of ImageMagick provided by each package manager is incompatible with OOF2. These instructions describe how to install ImageMagick as well.
[Update 4/2012: The default version of ImageMagick appears to work with MacPorts on OS X 10.7 (Lion). If you're using 10.7 or later, try following the instructions for 10.7 below. If OOF2 crashes when displaying images, rebuild it after following the instructions for 10.6, and let us know what happened so that we can correct these instructions.]
Neither fink nor MacPorts will install the version of swig that OOF2 requires. See Installing SWIG, below, if you need it to install it. If you aren't building your own OOF2 extensions, and if you use --skip-swig when building OOF2, you don't need to install SWIG.
Before you do anything else, make sure that you have installed X11, which is an optional installation on the Apple system DVDs. (Some old versions of Mac OS X have two packages, X11User.pkg and X11SDK.pkg. Install them both.) In principle, it's possible to use other X11 implementations, but we don't have any experience with them and find that Apple's X11 works well. (If you're using OS X 10.5, the X11 on the Apple system DVDs is broken. The latest development release of X11 is much better, and can be downloaded from Mac OS Forge).
When the instructions below tell you to type a command, type it in a Terminal window. You can copy and paste the lines from this page.
The only obstacle to installing swig 1.1 build 883 on a Mac is that the Mac's file system is not case sensitive, and swig's build procedure tries to make a subdirectory named SWIG and a file named swig in the same directory. You can install swig on a case-insensitive disk, you just can't build it there. There are at least three ways to get around this inconvenience:
OOF2 version 2.0.5 and 2.1.1 or later will work on NetBSD. OOF2 version 2.1.0 does not work. These commands were sufficient to install OOF2 on a 32-bit version of NetBSD 5.1. Execute them from a root account.
echo /usr/X11R7/lib >> /etc/ld.so.conf pkg_add pkg-config pkg_add py-gobject-shared pkg_add py26-gtk2 pkg_add libgnomecanvas pkg_add ImageMagick pkg_add freetype2 pkg_add fontconfigThe first line may not be necessary if you set LD_LIBRARY_PATH.
Installing the prerequisites will provide a program called "python2.6" in /usr/pkg/bin. You can use this to build oof2, but you'll have to invoke it explicitly:
python2.6 setup.py build --skip-swig --library-dirs=/usr/pkg/lib installYou could also create an alias or symbolic link called "python" that points to /usr/pkg/bin/python2.6, and then you can follow the instructions in README without change.