Install OOMMF 1.2a5 without root

By | June 24, 2013

Installing OOMMF in linux without root access can be difficult. The basic install procedure for OOMMF is quite straight forward: check you have tcl/tk, download the oommf source then run oommf.tcl pimake. This is fine when you have root access and can easily run the package manager to install the dev versions of tcl and tk.

If we only have user level access it can be a bit more tricky. Without access to a package manager we must compile tcl and tk from source. In this post I will go through the full install of oommf, including compiling tcl/tk from source. The install guides for tcl, tk and oommf are all really good. They do still however require some decisions to be made, so hopefully spelling out what worked for me here can be of use.

1. Download tcl, tk.

We will be following the general compile instructions here: These instructions are generally very good, but I will try to highlight any areas of uncertainty I had.

First download the tcl and tk source from

(wget can be useful for downloading things from the command line. Just type
wget file_to_download.txt.)

Extract the archives to your (a subdirectory of) your home folder.

mkdir ~/downloads
tar -zxvf tcl8.5.14-src.tar.gz -C ~/downloads/
tar -zxvf tk8.5.14-src.tar.gz -C ~/downloads/

We specify the install location during the compilation stage.

2. Make/configure/install tcl

cd ~/downloads/tcl8.5.14/unix
./configure --prefix=/home/user_name/tcl --enable-threads
make test
make install

A whole load of text will scroll by.

3. Make/configure/install tk.

The process is very similar to compiling tcl, but we also tell tk where to find our tcl installation.

Before configuring tk: If you are connected to your oommf machine via ssh it is important that X-11 forwarding is setup and that you have a suitable X server (e.g. Exceed) running on your system and your ssh connection allows X forwarding.

When configurint tk it is important to set the –prefix flag to be the same as you used to install tcl. If not then you will get version conflicts.

cd ~/downloads/tk8.5.14/unix
./configure --with-tcl=/home/user_name/tcl/lib --prefix=/home/user_name/tcl
make test
make install

Add the tcl install to the path, so you can easily access it (e.g. to run oommf):
export PATH=/path/to/tcl/bin/:$PATH

(Add these export command lines to your .bashrc so that they load automatically when you login.)

4. You might need to set environment variables for oommf.

export PATH=$PATH:/home/user_name/tcl/bin
export OOMMF_TCL_INCLUDE_DIR=/path/to/tcl/include
export OOMMF_TK_INCLUDE_DIR=/path/to/tcl/include
export OOMMF_TCL_CONFIG=/path/to/lib/
export OOMMF_TK_CONFIG=/path/to/lib/

If you have trouble at this stage please check the oommf basic installation page.

5. Install/compile oommf.

Please see OOMMF install guide for full install details.
If you haven’t already done so download and extract oommf from
Extract archive to a separate folder

mkdir ~/oommf/
tar -zxvf oommf12a5rc_20120928.tar.gz -C ~/oommf/

Go to the oommf directory e.g. ~/oommf/oommf1-2a5/
Check that the tcl/tk install and oommf are compatible.
tclsh8.5 oommf.tcl +platform
If this is ok then run

path/to/tclsh8.5 oommf.tcl pimake upgrade
path/to/tclsh8.5 oommf.tcl pimake distclean
path/to/tclsh8.5 oommf.tcl pimake

Then you can just run oommf:
path/to/tclsh8.5 oommf.tcl

I like to make a script “” which has:

/path/to/tclsh8.5 /path/to/oommf/oommf.tcl $@

The “$@” takes all command line arguments from the terminal. This is useful for having quick access to the various useful command line utilities built in to OOMMF, such as any2ppm.

4 thoughts on “Install OOMMF 1.2a5 without root

  1. Michael Donahue

    As outlined above, it is not difficult to build Tcl/Tk from source on Linux. An alternative, however, is to install one of the binary releases of Tcl/Tk from ActiveState ( These can be installed as non-root, and include everything needed to build and run OOMMF. I just tested this, and I did not need to set any environment variables for OOMMF.

    1. deparkes

      If that is the case then that’s very handy indeed. When I wrote this post I was having real trouble installing OOMMF on a remote system and this was what I eventually got to work. If I need to re-install OOMMF I’ll give your suggestion a go – thanks!

  2. samanth chilukuri

    help ! how to convert mif 1.1 to 2.1 format ?

Comments are closed.