Installing TUFLOW on Linux: Difference between revisions

Content deleted Content added
mNo edit summary
a few minor corrections, and reformatting of code examples
Line 1:
== Introduction ==
TUFLOW is installed on Linux using the <code>.rpm</code> and <code>.deb</code> installer packages, which can be [https://www.tuflow.com/downloads/#tuflow downloaded here]. There's also a tar.gz archive available from the same location, which can beserve downloadedas froma portable application, similar to the same.zip locationarchive available for Windows.
 
The installers have been tested on Rocky Linux 9 and Ubuntu 22.04, but should work on other modern Red Hat and Debian distributions.
Line 13:
TUFLOW uses a year.minor.patch versioning convention as follows.
 
* The year corresponds to the major version number e.g. 2026.0.0. Major releases are the only releases that will admit the possibility of breaking changes, (changingwhich are changes in defaults or features that may change model results between versions). There is one major release per year
 
* Minor releases contain new features and bug fixes, but no breaking changes and increment the minor version number, e.g. 2026.1.0
Line 19:
 
== RPM Install ==
<olul>
<li> Download the <code>.rpm</code> for the specific TUFLOW build from https://www.tuflow.com/downloads/#tuflow
<li> Save the <code>.rpm</code> locally. A common location is the home folder for the current user <code>~/</code>
<li> Run the preferred installation command. For example, if installing the TUFLOW 2026.0.0 release:</lisyntaxhighlight lang="bash">
sudo rpmdnf -ivhinstall ~/tuflow-2026.0-2026.0.0-1.x86_64x86_x64.rpm
</syntaxhighlight></li></ul>
or
<olul>
sudo yum install ~/tuflow-2026.0-2026.0.0-1.x86_64.rpm.
<li>This installs a version-specific copy of the TUFLOW binaries and libraries under <code>/opt/tuflow/&lt;version&gt;/bin</code> and <code>/opt/tuflow/&lt;version&gt;/lib</code>. TheA symbolic link to the executable is symlinkedcreated in to <code>/usr/bin</code>, allowing the required version to be run directlywith froma theversioned commandshortcut, linee.g. <code>tuflow-2026.0-isp</code>.
</ol>
<li>There is also a launcher script in <code>/opt/tuflow/tuflow-<version>/bin/tuflow-<version>-idp.sh</code> for use cases where some environment variables needs to be set before execution. If you need to edit these, we recommend copying these into <code>/usr/local/bin</code>, as they will be overwritten if a patch release is installed.
<ol>
<li>To uninstall run the preferred uninstaller command. For example:</lisyntaxhighlight lang="bash">
<li>This installs a version-specific copy of the TUFLOW binaries and libraries under <code>/opt/tuflow/&lt;version&gt;/bin</code> and <code>/opt/tuflow/&lt;version&gt;/lib</code>. The executable is symlinked to <code>/usr/bin</code>, allowing the required version to be run directly from the command line.
sudo yumdnf remove tuflow-2026.0-2026.0.0-1.x86_64
<li>There is also a launcher script in <code>/opt/tuflow/tuflow-<version>/bin/tuflow-<version>-idp.sh</code> for use cases where some environment variables needs to be set before execution. If you need to edit these, we recommend copying these into /usr/local/bin, as they will be overwritten if a patch release is installed.
</olsyntaxhighlight></li><li>To return a list of previously installed versions and review the correct uninstall version use <code>dnf list installed</code>'', or <code>dnf list installed 'tuflow*'</code>''</li></ul>''Note: Major and minor releases are installed with a new directory under <code>/opt/tuflow</code>. For example, TUFLOW 2026.0.0 is installed under <code>/opt/tuflow/tuflow-2026.0</code>. Patch releases overwrite the existing installation that shares the same major and minor release number. For example, TUFLOW 2026.0.1 will update 2026.0.0 if present.''
<li>To uninstall run the preferred uninstaller command. For example:</li>
sudo rpm -e tuflow-2026.0-2026.0.0-1.x86_64
or
sudo yum remove tuflow-2026.0-2026.0.0-1.x86_64
To return a list of previously installed versions and review the correct uninstall version run:
rpm -qa | grep tuflow
or
yum list installed | grep tuflow
</ol>''Note: Major and minor releases are installed with a new directory under <code>/opt/tuflow</code>. For example, TUFLOW 2026.0.0 is installed under <code>/opt/tuflow/tuflow-2026.0</code>. Patch releases overwrite the existing installation that shares the same major and minor release number. For example, TUFLOW 2026.0.1 will update 2026.0.0 if present.''
 
== DEB Install ==
Line 44 ⟶ 36:
 
To install:
sudo apt-get install ./tuflow-2026.0_2026.0.0-1_amd64.deb
 
To uninstall:
Line 55 ⟶ 47:
If you are running a Linux installation with Microsoft Windows under WSL (Windows Subsystem for Linux), things should run as expected. If you want to use NVIDIA hardware with CUDA support with TUFLOW under WSL, you need to add the correct folder to the LD_LIBRARY_PATH environment variable, so that TUFLOW can find the correct CUDA shared libraries that works in WSL:
export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH
In that folder there's a utility <code>/usr/lib/wsl/lib/nvidia-smi</code> which will indicate if the Linux installation can connect to the NVIDIA hardware otherwise managed by the Microsoft Windows driver.
 
== Running A Model ==
For either Linux distribution TUFLOW can be run by calling <code>tuflow-2026.0-isp</code> (replacethis withexample would the requiredcurrently installed patch for version 2026.0 and single precision) orand by passing it a configuration file name:<syntaxhighlight lang="bash">
 
tuflow-2026.0-isp my_run.tcf
</syntaxhighlight>Model-specific commands such as the <code>export OMP_NUM_THREADS</code> environment variable can either be added via the command line, or in your own custom run script that calls the configuration file name, for example ''<code>run_model.sh</code>'':<syntaxhighlight lang="bash">
 
#!/bin/bash
Model-specific commands such as the <code>export OMP_NUM_THREADS</code> environment variable can either be added via the command line, or in your own custom run script that calls the configuration file name, for example run_model.sh:
export OMP_NUM_THREADS=8
<nowiki>#</nowiki>!/bin/bash
export OMP_NUM_THREADS=8
tuflow-2026.0-idp my_run.tfc
 
</syntaxhighlight>Once saved the script 'run_model.sh' will need to be configured to run as an executable as follows:<syntaxhighlight lang="bash">
chmod +x run_model.sh
</syntaxhighlight>
 
== Return To Home Page ==