OOMMF Home next up previous index
Next: Optimization Up: Advanced Installation Previous: Reducing Disk Space Usage

Local Customizations

OOMMF software supports local customization of some of its features. The files controlling these options are config/options.tcl and config/platforms/<platform>.tcl, where ``<platform>'' is the identifier for the platform, e.g., windows-x86_64 for Windows, linux-x86_64 for Linux, and darwin for macOS. Although you may edit these files directly, it is better to create a subdirectory named local and create a file with the same name containing your changes. (Separating your changes from the distributed versions of these files makes it easier to port your changes to new versions of OOMMF.) For example, to change the settings in the options.tcl file, create the file config/local/options.tcl. To modify the platform file on Windows, create the file config/platforms/local/windows-x86_64.tcl.

The options.tcl and platform files are Tcl script files, and you may use any of the standard Tcl commands and constructs inside them. There are also OOMMF-specific commands available in these files, in particular Oc_Option for options.tcl, and $config SetValue for platform files.

The options.tcl file controls settings which are platform agnostic. For example, this file sets the default network port for the host service directory application, the location of Oxs log files, and the width of curves in mmGraph. Editing instructions are provided in options.tcl. As an example, the setting

Oc_Option Add mmGraph Ow_GraphWin default_curve_width 1
in options.tcl can be overridden in local/options.tcl with
Oc_Option Add mmGraph Ow_GraphWin default_curve_width 2
if wider lines are desired. The options.tcl file also controls some build and optimization controls, as discussed in the next section.

The platform configuration files control settings that are platform dependent, such as the location for temporary files, compiler selection, and compiler and linker search paths. These files contain a block of code demarcated by the string LOCAL CONFIGURATION that lists end-user configuration options. These controls are all commented out (i.e., deactivated by a leading # character, which is the comment marker in Tcl), so you can copy this entire block into your local/<platform>.tcl file and uncomment only the options you want to change. For example, if you are using MacPorts on macOS, then you may want to edit your config/platforms/local/darwin.tcl file to have the lines

## Extra include directories for compiling:
$config SetValue program_compiler_extra_include_dirs /opt/local/include
## Extra directories to search for libraries.
$config SetValue program_linker_extra_lib_dirs /opt/local/lib
to allow the compiler and linker to search in the MacPorts default install area.

There are a number of environment variables that can be set to override the values in the above configuration files, including

Two item list specifying the C++ compiler and the option to compile only (no link); e.g., for a Bourne compatible shell
  export OOMMF_CPP=g++ -c
selects the GNU C++ compiler. To select the Visual C++ compiler at the Windows command prompt, use
  set OOMMF_CPP=cl /c
Overrides the <platform>.tcl program_compiler_c++_override setting.
Host server listen port. Overrides the options.tcl ``Net_Host port'' value.
Output file directory for Oxs runs; overrides default which is the directory holding the run .mif simulation specification file.
Directory for Oxs log files. Overrides options.tcl setting ``OxsLogs directory''.
Directory for temporary files. Overrides auto-selection.
Default number of execution threads for Oxs runs. Overrides <platform>.tcl thread_count setting.
Be aware that environment variable settings hold only for applications launched from the given shell instance, unless the value is set in the shell start-up configuration.

Where applicable, command line options override both configuration file and environment variable settings. For example, oxsii and boxsi support the -threads option that specifies the number of execution threads.

The OOMMF installation can also be customized by the installation of third party and experimental extensions to the OOMMF eXtensible Solver (Oxs). These are maintained using the oxspkg package management tool.

OOMMF Home next up previous index

OOMMF Documentation Team
September 30, 2022