OOMMF Home next up previous contents
Next: OOMMF Launcher/Control Interface: mmLaunch Up: OOMMF Documentation Previous: OOMMF Architecture Overview


Command Line Launching

Some of the OOMMF applications are platform-independent Tcl scripts. Some of them are Tcl scripts which require special platform-dependent interpreters. Others are platform-dependent, compiled C applications. It is likely that some of them will change status in later releases of OOMMF. Each of these types of application requires a different command line for launching. Rather than require all OOMMF users to manage this complexity, we provide a pair of programs which provide simplified interfaces for launching OOMMF applications.

The first of these is used to launch OOMMF applications from the command line. Because its function is only to start another program, we refer to this program as the ``bootstrap application.'' The bootstrap application is the Tcl script app/oommf/oommf.tcl. In its simplest usage, it takes a single argument on the command line, the name of the application to launch. For example, to launch mmGraph, the command line is:

tclsh app/oommf/oommf.tcl mmGraph

If no command line arguments are passed to the bootstrap application, by default it will launch the application mmLaunch.

Some of the OOMMF applications take optional arguments when launched from the command line. Any command line arguments to the bootstrap application after the application name will be passed as command line arguments to the named application.

The bootstrap application also supports some more complicated, more rarely used processing of its command line arguments. By default, the bootstrap application launches the named application and exits. If the first argument to the bootstrap program is the option -nofork, however, the bootstrap program will block until the application it launches (now named in the second command line argument) exits.

If the argument following the application name looks like a version number (containing only digits and dots), then the bootstrap application will interpret it as the minimum version of the named application to launch. If no application satisfying the version requirement can be found, the bootstrap application will report an error.

The bootstrap application should be infrequently used by most users. The application mmLaunch provides a more convenient graphical interface for launching applications. The main uses for the bootstrap application are launching mmLaunch, launching programs which make up the OOMMF Batch System and other programs which are inherently command line driven, and in circumstances where the users wishes to precisely control the command line arguments passed to an OOMMF application.

Platform Issues

The Tcl script app/oommf/oommf.tcl begins with the lines:

#!/bin/sh
# \
exec tclsh "$0" ${1+"$@"}
On most Unix platforms, if app/oommf/oommf.tcl is executable, the interpreter tclsh (on the execution path) will be invoked to interpret the script. If in addition, the directory .../app/oommf is in the execution path, the command line can be as simple as:
oommf.tcl <appName>

On Windows platforms, because app/oommf/oommf.tcl has the file extension .tcl, it is associated by Windows with the wish interpreter. The script app/oommf/oommf.tcl has been specially written so that either tclsh or wish is a suitable interpreter. This means that simply double-clicking on an icon associated with the file app/oommf/oommf.tcl (say, in Windows Explorer) will launch the bootstrap application with no arguments. This will result in the default behavior of launching the application mmLaunch, which is suitable for launching other OOMMF applications.


OOMMF Home next up previous Contents

OOMMF Documentation Team
October 2, 1998