Follow the instructions in the following sections, in order, to prepare OOMMF software for use on your computer.
The latest release of the OOMMF software may be retrieved from the OOMMF download page. Each release is available in two formats. The first format is a gzipped tar file containing an archive of all the OOMMF source code. The second format is a .zip compressed archive containing source code and pre-compiled executables for Microsoft Windows 9X/NT running on an x86-based microprocessor system. Each Windows binary distribution is compatible with only a particular sequence of releases of Tcl/Tk. For example, a Windows binary release for Tcl/Tk 8.3.x is compatible with Tcl/Tk 8.3.0, 8.3.1, .... Other release formats, e.g., pre-compiled executables for Microsoft Windows NT running on a Compaq Alpha Systems RISC-based microprocessor system, and/or compatible with older versions of Tcl/Tk, may be made available upon request.
For the first format, unpack the distribution archive using gunzip and tar:
gunzip -c oommf12a3_20021029.tar.gz | tar xvf -
For the other format(s), you will need a utility program to unpack the .zip archive. This program must preserve the directory structure of the files in the archive, and it must be able to generate files with names not limited to the old MSDOS 8.3 format. Some very old versions of the pkzip utility do not have these properties. One utility program which is known to work is UnZip.
Using your utility, unpack the .zip archive, e.g.
For either distribution format, the unpacking sequence creates a subdirectory oommf which contains all the files and directories of the OOMMF distribution. If a subdirectory named oommf already existed (say, from an earlier OOMMF release), then files in the new distribution overwrite those of the same name already on the disk. Some care may be needed in that circumstance to be sure that the resulting mix of files from an old and a new OOMMF distribution combine to create a working set of files.
After downloading and unpacking the OOMMF software distribution, all the OOMMF software is contained in a subdirectory named oommf. Start a command line interface (a shell on Unix, or the MS-DOS Prompt on Microsoft Windows), and change the working directory to the directory oommf. Find the Tcl shell program installed as part of your Tcl/Tk installation. In this manual we call the Tcl shell program tclsh, but the actual name of the executable depends on the release of Tcl/Tk and your platform type. Consult your Tcl/Tk documentation.
In the root directory of the OOMMF distribution is a file named oommf.tcl. It is the bootstrap application which is used to launch all OOMMF software. With the command line argument +platform, it will print a summary of your platform configuration when it is evaluated by tclsh. This summary describes your platform type, your C++ compiler, and your Tcl/Tk installation. As an example, here is the typical output on a Linux/Alpha system:
$ tclsh oommf.tcl +platform oommf.tcl 220.127.116.11 info: OOMMF release 18.104.22.168 Platform Name: linalp Tcl name for OS: Linux 2.2.20 C++ compiler: /usr/bin/g++ Tcl configuration file: /usr/local/lib/tclConfig.sh tclsh: /usr/local/bin/tclsh8.4 Tcl release: 8.4.1 (config) 8.4.1 (running) Tk configuration file: /usr/local/lib/tkConfig.sh wish: /usr/local/bin/wish8.4 Tk release: 8.4.1 (config) 8.4.1 (running)
If oommf.tcl +platform doesn't print a summary similar to the above, it should instead print an error message describing why it can't. For example, if your Tcl installation is older than release 7.5, the error message will report that fact. Follow the instructions provided and repeat until oommf.tcl +platform successfully prints a summary of the platform configuration information.
The first line of the example summary reports that OOMMF recognizes the platform by the name linalp. OOMMF software recognizes many of the more popular computing platforms, and assigns each a platform name. The platform name is used by OOMMF in index and configuration files and to name directories so that a single OOMMF installation can support multiple platform types. If oommf.tcl +platform reports the platform name to be ``unknown'', then you will need to add some configuration files to help OOMMF assign a name to your platform type, and associate with that name some of the key features of your computer. See the section on Managing OOMMF platform names for further instructions.
The second line reports what C++ compiler will be used to build OOMMF from its C++ source code. If you downloaded an OOMMF release with pre-compiled binaries for your platform, you may ignore this line. Otherwise, if this line reports ``none selected'', or if it reports a compiler other than the one you wish to use, then you will need to tell OOMMF what compiler to use. To do that, you must edit the appropriate configuration file for your platform. Continuing the example above, one would edit the file config/cache/linalp.tcl. Editing instructions are contained within the file. On other platforms the name linalp in config/cache/linalp.tcl should be replaced with the platform name OOMMF reports for your platform. For example, on a Windows machine using an x86 processor, the corresponding configuration file is config/cache/wintel.tcl.
The next three lines describe the Tcl configuration OOMMF finds on your platform. The first line reports the name of the configuration file installed as part of Tcl, if any. Conventional Tcl installations on Unix systems and within the Cygwin environment on Windows have such a file, usually named tclConfig.sh. The Tcl configuration file records details about how Tcl was built and where it was installed. On Windows platforms, this information is recorded in the Windows registry, so it is normal to have oommf.tcl +platform report ``none found''. If oommf.tcl +platform reports ``none found'', but you know that an appropriate Tcl configuration file is present on your system, you can tell OOMMF where to find the file by setting the environment variable OOMMF_TCL_CONFIG to its absolute filename. (For information about setting environment variables, see your operating system documentation.) In unusual circumstances, OOMMF may find a Tcl configuration file which doesn't correctly describe your Tcl installation. In that case, use the environment variable OOMMF_TCL_CONFIG to instruct OOMMF to use a different file that you specify, and edit that file to include a correct description of your Tcl installation.
The second line describing your Tcl installation reports the absolute pathname of the tclsh program. If this differs from the tclsh you used to evaluate oommf.tcl +platform, there may be something wrong with your Tcl configuration file. Note that the same tclsh program might be known by several absolute pathnames if there are symbolic links in your Tcl installation. If oommf.tcl +platform reports that it cannot find a tclsh program, yet you know where an appropriate one is installed on your system, you can tell OOMMF where to find the tclsh program by setting the environment variable OOMMF_TCLSH to its absolute location.
The third line describing your Tcl installation reports its release number according to two sources. First is the release number recorded in the Tcl configuration file. Second is the release number of the tclsh program used to evaluate oommf.tcl +platform. If these numbers do not match, it may indicate something is wrong with your Tcl configuration file. If you have multiple releases of Tcl installed under a common root directory on your computer, there can be only one Tcl configuration file. It is important that you use the Tcl release that corresponds to the Tcl configuration file.
The next three lines describe the Tk configuration OOMMF finds on your platform. They are analogous to the three lines describing the Tcl configuration. The environment variables OOMMF_TK_CONFIG and OOMMF_WISH may be used to tell OOMMF where to find the Tk configuration file and the wish program, respectively.
Finally, the output of oommf.tcl +platform may include warnings about possible problems with your Tcl/Tk installation. For example, if you are missing important header files, or if your Tcl/Tk installation is thread-enabled (which OOMMF does not support).
If oommf.tcl +platform indicates problems with your Tcl/Tk installation, it may be easiest to re-install Tcl/Tk taking care to perform a conventional installation. OOMMF deals best with conventional Tcl/Tk installations. If you do not have the power to re-install an existing broken Tcl/Tk installation (perhaps you are not the sysadmin of your machine), you might still install your own copy of Tcl/Tk in your own user space. In that case, if your private Tcl/Tk installation makes use of shared libraries, take care that you do whatever is necessary on your platform to be sure that your private tclsh and wish find and use your private shared libraries instead of those from the system Tcl/Tk installation. This might involve setting an environment variable (such as LD_LIBRARY_PATH). If you use a private Tcl/Tk installation, you also want to be sure that there are no environment variables like TCL_LIBRARY or TK_LIBRARY that still refer to the system Tcl/Tk installation.
A few other configurations should be checked on Windows platforms. First, note that absolute filenames on Windows makes use of the backslash (\) to separate directory names. On Unix and within Tcl the forward slash (/) is used to separate directory names in an absolute filename. In this manual we usually use the Tcl convention of forward slash as separator. In portions of the manual pertaining only to MS Windows we use the backslash as separator. There may be instructions in this manual which do not work exactly as written on Windows platforms. You may need to replace forward slashes with backward slashes in pathnames when working on Windows.
OOMMF software needs networking support that recognizes the host name localhost. It may be necessary to edit a file which records that localhost is a synonym for the loopback interface (127.0.0.1). If a file named hosts exists in your system area (for example, C:\Windows\hosts), be sure it includes an entry mapping 127.0.0.1 to localhost. If no hosts file exists, but a hosts.sam file exists, make a copy of hosts.sam with the name hosts, and edit the copy to have the localhost entry.
In recent releases of Tcl/Tk (version 8.0.3 and later) the directory which holds the tclsh and wish programs also holds several *.dll files that OOMMF software needs to find to run properly. Normally when the OOMMF bootstrap application or mmLaunch is used to launch OOMMF programs, they take care of making sure the necessary *.dll files can be found. As an additional measure, you might want to add the directory which holds the tclsh and wish programs to the list of directories stored in the PATH environment variable. All the directories in the PATH are searched for *.dll files needed when starting an executable.
If you downloaded a distribution with pre-compiled executables, you may skip this section.
When building OOMMF software from source code, be sure the C++ compiler reported by oommf.tcl +platform is properly configured. In particular, if you are running on a Windows system, please read carefully the notes in the Advanced Installation section pertaining to your compiler.
The compiling and linking of the C++ portions of OOMMF software are guided by the application pimake (``Platform Independent Make'') which is distributed as part of the OOMMF release. To begin building OOMMF software with pimake, first change your working directory to the root directory of the OOMMF distribution:
If you unpacked the new OOMMF release into a directory oommf which contained an earlier OOMMF release, use pimake to build the target upgrade to clear away any source code files which were in a former distribution but are not part of the latest distribution:
tclsh oommf.tcl pimake upgrade
Next, build the target distclean to clear away any old executables and object files which are left behind from the compilation of the previous distribution:
tclsh oommf.tcl pimake distclean
Next, to build all the OOMMF software, run pimake without specifying a target:
tclsh oommf.tcl pimakeOn some platforms, you cannot successfully compile OOMMF software if there are OOMMF programs running. Check that all OOMMF programs have terminated (including those in the background) before trying to compile and link OOMMF.
When pimake calls on a compiler or other software development utility, the command line is printed, so that you may monitor the build process. Assuming a proper configuration for your platform, pimake should be able to compile and link all the OOMMF software without error. If pimake reports errors, please first consult Troubleshooting to see if a fix is already documented. If not, please send both the complete output from pimake and the output from oommf.tcl +platform to the OOMMF developers when you e-mail to ask for help.
The current OOMMF release does not support an installation procedure. For now, simply run the executables from the directories in which they were unpacked/built.
To start using OOMMF software, run the OOMMF bootstrap application. This may be launched from the command line interface:
If you prefer, you may launch the OOMMF bootstrap application oommf.tcl using whatever graphical ``point and click'' interface your operating system provides. By default, the OOMMF bootstrap application will start up a copy of the OOMMF application mmLaunch in a new window.
If you publish material created with the aid of OOMMF, please refer to Credits for citation information.
If you encounter problems when installing or using OOMMF, please report them to the OOMMF developers. See Troubleshooting for detailed instructions.