Reservoir engineering students who want to run MRST in GNU Octave are usually after a free toolchain they can use on their own laptop, without waiting for a university licence or a lab seat. MRST, the MATLAB Reservoir Simulation Toolbox developed at SINTEF, aims to be compatible with Octave, and its developers report that the automatic differentiation solvers, compiled linear solvers and 3D visualisation all work there, although the graphical user interfaces do not (SINTEF, n.d.-b).
Install a recent version of GNU Octave
Download Octave from the official site, where Windows users get a 64-bit installer, macOS users are pointed to the Octave wiki and package managers such as Homebrew, and Linux users install the package provided by their distribution (GNU Octave, n.d.). The MRST team recommends Octave 5.2.0 or newer (SINTEF, n.d.-b), so an older copy already on a lab machine is worth checking with version at the Octave prompt before you start.
Download and extract MRST
Get the current release as a zip file from the MRST download page, which also notes that development now takes place on GitHub, where the release can be downloaded or cloned (SINTEF, n.d.-a). Extract the archive to a folder with a short path that you can type easily, such as one in your home directory, because you will return to it at the start of every session.
Run startup.m from the MRST folder
Open Octave, change directory into the folder that contains startup.m and run it, as the MRST documentation instructs (SINTEF, n.d.-a):
cd ~/mrst-2026a startup
A welcome message beginning "Welcome to the Matlab Reservoir Simulation Toolbox (MRST)!" confirms that the paths are set (SINTEF, n.d.-b). MRST does not permanently change your path or your installation, so startup has to be run again in every new Octave session, and the FAQ shows that you can also call it by full path from a script with run, which saves navigating each time.
How to run MRST in GNU Octave with a first example
Before building anything of your own, run a supplied example to confirm that the toolbox works, and the FAQ suggests typing flowSolverTutorial1, which should solve and plot a simple gravity-driven pressure problem (SINTEF, n.d.-b). If that runs and a figure appears, Octave, the solvers and the plotting are all working together, and any later error is far more likely to sit in your own script than in the setup.
Load the modules your model needs
Most functionality beyond the core sits in modules that you activate with mrstModule, and the MRST user guide uses commands such as mrstModule add ad-core ad-blackoil to load the automatic differentiation framework and black-oil solvers before running a simulation (Lie, 2019). The FAQ also notes that some users need the Octave compatibility module, which is worth trying when a function that works in MATLAB fails in Octave (SINTEF, n.d.-b).
The user guide by Lie (2019), published by Cambridge University Press and released as open access, explains both the practical commands and the mathematics behind them, and the MRST FAQ describes it as a freely available open access book (SINTEF, n.d.-b). If your course also uses decks in the commercial format, the article on Eclipse data file sections explains what each part of an input file controls.
Keep your coursework in a separate script
Save your own work as an .m script in a separate assignment folder rather than inside the MRST directory, and begin it with the run call to startup and the mrstModule add lines it needs, so that the whole analysis can be rerun from a clean session. Keeping the toolbox untouched also makes it easy to upgrade to the next release, which the download page says appears twice a year (SINTEF, n.d.-a).
If a model refuses to run or the results look wrong, reservoir simulation support and MATLAB and Simulink support can work through your own script and explain the fixes.
Frequently asked questions
Is everything in MRST available in Octave?
Most of it is, since the solvers and 3D plotting work, but the graphical user interfaces are not supported in Octave (SINTEF, n.d.-b).
Why does MRST stop working when I reopen Octave?
MRST is activated only for the current session, so startup must be run each time you start Octave (SINTEF, n.d.-a, n.d.-b).
Do I need any MATLAB toolboxes?
The download page states that no other MATLAB toolboxes are required (SINTEF, n.d.-a), and Octave users need only Octave itself and the MRST download.
References
GNU Octave. (n.d.). Download.
Lie, K.-A. (2019). An introduction to reservoir simulation using MATLAB/GNU Octave: User guide for the MATLAB Reservoir Simulation Toolbox (MRST). Cambridge University Press.
SINTEF. (n.d.-a). Download. MRST.
SINTEF. (n.d.-b). FAQ. MRST.



