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 1in options.tcl can be overridden in local/options.tcl with
Oc_Option Add mmGraph Ow_GraphWin default_curve_width 2if 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
## EXTERNAL PACKAGE SUPPORT: ## 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/libto 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
export OOMMF_CPP=g++ -cselects the GNU C++ compiler. To select the Visual C++ compiler at the Windows command prompt, use
set OOMMF_CPP=cl /cOverrides the <platform>.tcl program_compiler_c++_override setting.
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.