Using the Mosel Command Line
The Mosel Command Line is supported on all platforms that Mosel can be run on.
Standard sequence for model execution from the command line:
mosel exec mymodel.mos Execute (=compile/load/run) model 'mymodel.mos' mosel mymodel Short form (works with 'mymodel.mos' or 'mymodel.bim')
Some useful commands (see `Mosel Language Reference manual' for the full list):
- Command line help text:
-
mosel -h
- Mosel version:
-
mosel -V
- Display functionality:
-
mosel exam[ine] [-cspthirvaum]
- Execute a model file:
-
mosel exec[ute]
- Compile a model file:
-
mosel comp[ile] mymodel.mos
- Load and run a BIM file:
-
mosel run mymodel.bim
- Start the debugger:
-
mosel debug mymodel.mos
- Run the profiler:
-
mosel prof[ile] mymodel.mos
- Perfom a code coverage run:
-
mosel cover[age] mymodel.mos
- List available modules/packages:
-
mosel lslib
Examples:
mosel comp mymodel.mos -o mybim.bim Compile to a specified BIM file name/location mosel prof mymodel.mos Perform a profiler run (output in 'mymodel.mos.prof') mosel exam -h Display Mosel version info and paths mosel exam -a mybim.bim Display annotations of a model or package mosel exam -ps mmxprs Display parameters and subroutines of module 'mmxprs'
Setting model runtime parameters:
mosel exec mymodel NT=5 DATAFILE="mynewdata.dat" Source in mymodel.mos mosel run mymodel NT=5 DATAFILE="mynewdata.dat" Loads mymodel.bim mosel mymodel NT=5 DATAFILE="mynewdata.dat" With mymodel.mos or mymodel.bim