TUFLOW on Linux: Difference between revisions
No edit summary |
|||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 10: | Line 10: | ||
It is recommended that admins use <code>dnf</code> or <code>apt</code> respectively, to ensure that dependencies are automatically downloaded and installed as needed. |
It is recommended that admins use <code>dnf</code> or <code>apt</code> respectively, to ensure that dependencies are automatically downloaded and installed as needed. |
||
For detailed installation, licensing, version management and WSL instructions, see [[Installing TUFLOW on Linux]]. |
|||
= How to use = |
= How to use = |
||
After installation, TUFLOW will be available from the command line as <code>tuflow_2026.0</code>. Users may define an alias like <code>alias tuflow='tuflow_2026.0'</code> or use the specific versioned command directly in their scripts. Command-line options are passed just as in Windows. |
After installation, TUFLOW will be available from the command line as <code>tuflow_2026.0-isp</code> for single precision and <code>tuflow_2026.0-idp</code> for double precision. Users may define an alias like <code>alias tuflow='tuflow_2026.0'</code> or use the specific versioned command directly in their scripts. Command-line options are passed just as in Windows. |
||
However, because Linux often runs without a graphical environment, TUFLOW on Linux runs as if the <code>-nmb</code> option was provided. |
However, because Linux often runs without a graphical environment, TUFLOW on Linux runs as if the <code>-nmb</code> option was provided. |
||
= Use across both Microsoft Windows and Linux = |
= Use across both Microsoft Windows and Linux = |
||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
<ol> |
|||
| ⚫ | *'''Slashes and backslashes'''<br/>Windows uses backslashes in file and directory paths |
||
| ⚫ | *'''Drive letters'''<br/>Drive letters |
||
| ⚫ | *'''Character case in names'''<br/>Windows is case-insensitive, |
||
| ⚫ | *'''Encoding and special characters'''<br/>On older versions of Windows in English-speaking countries, text files |
||
</ol> |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | * '''Slashes and backslashes'''<br/>Windows uses backslashes in file and directory paths, such as <code>D:\Project\results\</code>. Linux uses forward slashes, such as <code>~/Project/results</code>, and will often interpret characters following backslashes as special characters. TUFLOW will usually handle either format in configuration files on either system. However, when writing scripts or commands in PowerShell, a terminal or similar tools, users should remain aware of the differences. Logs and outputs that refer to files will use the format appropriate to the operating system on which TUFLOW is running. |
||
| ⚫ | As a general principle, TUFLOW will |
||
| ⚫ | * '''Drive letters'''<br/>Drive letters such as <code>D:</code> are specific to Windows. Configuration files that need to be used across both systems should avoid drive letters and instead use relative paths, such as <code>../Model/Materials_001.csv</code>, or paths that assume the file is on the current drive, such as <code>/Project/model/Materials_001.csv</code>. |
||
| ⚫ | * '''Character case in names'''<br/>Windows is generally case-insensitive, meaning files named <code>Hello.TXT</code> and <code>hello.txt</code> are treated as having the same name and cannot exist in the same location. Linux is case-sensitive and treats uppercase and lowercase characters as different, allowing both files to exist side by side. This is important where different capitalisation is used in separate references. Windows may interpret both references as pointing to the same file, while Linux may treat them as different files. Similarly, Windows may locate a file even when the capitalisation does not match exactly, while Linux may not. |
||
| ⚫ | * '''Encoding and special characters'''<br/>On older versions of Windows in English-speaking countries, text files, including TUFLOW configuration files, commonly used Windows-1252 encoding. On modern Windows systems, UTF-8 with BOM is commonly used, while Linux typically uses UTF-8 without BOM. TUFLOW accepts these encodings and will generally write files using UTF-8 without BOM. Windows text files commonly use carriage return and line feed characters for line endings, known as CR/LF, while Linux uses a single LF character. TUFLOW accepts both formats and writes the format appropriate to the system on which it is running. |
||
| ⚫ | |||
| ⚫ | |||
= Common Questions Answered (FAQ)= |
= Common Questions Answered (FAQ)= |
||
== Why use TUFLOW on Linux at all? == |
== Why use TUFLOW on Linux at all? == |
||
TUFLOW on Linux is not just for users |
TUFLOW on Linux is not just for users who use Linux as their primary work environment, although those users certainly exist. Other reasons to consider it include: |
||
<ol> |
|||
*'''Performance'''<br/> |
* '''Performance'''<br/>Servers or workstations dedicated to running models can be configured to run TUFLOW and the necessary supporting software, such as CodeMeter and NVIDIA GPU drivers, with very little else installed. There may also be small performance differences between executables built and optimised for Windows and Linux. |
||
| ⚫ | |||
*'''HPC tooling'''<br/> Automation of running TUFLOW models across many computers or in the cloud can be greatly simplified with tooling designed for that purpose. Many such tools are available "off the shelf", but mostly on Linux (e.g. SLURM, PBS/Torque, etc.). Similarly, containerisation (e.g. Docker, Podman, LXC) typically requires running on Linux as well. |
|||
| ⚫ | |||
: ''Note:'' HPC tooling refers to job scheduling and automation software for managing large numbers of model runs. Containerisation packages applications and their dependencies into portable and reproducible runtime environments. |
|||
</ol> |
|||
* '''HPC tooling'''<br/>Automating TUFLOW model runs across many computers or in the cloud can be simplified using tools designed for this purpose. Many of these tools are available off the shelf, primarily for Linux, such as SLURM and PBS/Torque. Containerisation tools, such as Docker, Podman and LXC, also typically run on Linux. <br>''Note:'' HPC tooling refers to job scheduling and automation software used to manage large numbers of model runs. Containerisation packages applications and their dependencies into portable and reproducible runtime environments. |
|||
== Must TUFLOW users on Linux use the command line interface? == |
== Must TUFLOW users on Linux use the command line interface? == |
||
| Line 46: | Line 52: | ||
Like Windows, Linux offers a variety of scripting options that can help minimise the direct use of the command line by users, if that is desirable. Bash shell scripts are as easy to write and run as batch files are on Windows. Running Python or even PowerShell on Linux is easy to set up as well. |
Like Windows, Linux offers a variety of scripting options that can help minimise the direct use of the command line by users, if that is desirable. Bash shell scripts are as easy to write and run as batch files are on Windows. Running Python or even PowerShell on Linux is easy to set up as well. |
||
However, |
However, due to the nature of Linux and TUFLOW, users are encouraged to understand the basics of running TUFLOW from the command line. The TUFLOW Support team can assist with this. |
||
Latest revision as of 11:08, 13 July 2026
Introduction
Since the 2026.0.0 release, TUFLOW Classic/HPC is available for Linux, just like TUFLOW FV has been since its inception. Although the application functions the same on either Microsoft Windows or Linux, there are some caveats to consider especially when working across both platforms within a single project.
How to install
TUFLOW for Linux is available in two types of packages, .deb for Debian family distributions (like Debian, Ubuntu, Mint, etc.) and .rpm for RHEL family distributions (Red Hat, CentOS, Rocky, etc.).
To install TUFLOW for Linux, download the appropriate package for the Linux distribution from the TUFLOW Downloads page and install the package using the appropriate package manager for the distribution. For example, on Ubuntu, the following command can be used in the terminal (making sure to use the correct path to the downloaded .deb file):
sudo apt install ./tuflow_2026.0.0~beta.1-1_amd64.deb
It is recommended that admins use dnf or apt respectively, to ensure that dependencies are automatically downloaded and installed as needed.
For detailed installation, licensing, version management and WSL instructions, see Installing TUFLOW on Linux.
How to use
After installation, TUFLOW will be available from the command line as tuflow_2026.0-isp for single precision and tuflow_2026.0-idp for double precision. Users may define an alias like alias tuflow='tuflow_2026.0' or use the specific versioned command directly in their scripts. Command-line options are passed just as in Windows.
However, because Linux often runs without a graphical environment, TUFLOW on Linux runs as if the -nmb option was provided.
Use across both Microsoft Windows and Linux
Some of the differences between Windows and Linux will affect users who want to use TUFLOW across both systems.
This is not a complete overview, but some aspects to consider include:
- Slashes and backslashes
Windows uses backslashes in file and directory paths, such asD:\Project\results\. Linux uses forward slashes, such as~/Project/results, and will often interpret characters following backslashes as special characters. TUFLOW will usually handle either format in configuration files on either system. However, when writing scripts or commands in PowerShell, a terminal or similar tools, users should remain aware of the differences. Logs and outputs that refer to files will use the format appropriate to the operating system on which TUFLOW is running.
- Drive letters
Drive letters such asD:are specific to Windows. Configuration files that need to be used across both systems should avoid drive letters and instead use relative paths, such as../Model/Materials_001.csv, or paths that assume the file is on the current drive, such as/Project/model/Materials_001.csv.
- Character case in names
Windows is generally case-insensitive, meaning files namedHello.TXTandhello.txtare treated as having the same name and cannot exist in the same location. Linux is case-sensitive and treats uppercase and lowercase characters as different, allowing both files to exist side by side. This is important where different capitalisation is used in separate references. Windows may interpret both references as pointing to the same file, while Linux may treat them as different files. Similarly, Windows may locate a file even when the capitalisation does not match exactly, while Linux may not.
- Encoding and special characters
On older versions of Windows in English-speaking countries, text files, including TUFLOW configuration files, commonly used Windows-1252 encoding. On modern Windows systems, UTF-8 with BOM is commonly used, while Linux typically uses UTF-8 without BOM. TUFLOW accepts these encodings and will generally write files using UTF-8 without BOM. Windows text files commonly use carriage return and line feed characters for line endings, known as CR/LF, while Linux uses a single LF character. TUFLOW accepts both formats and writes the format appropriate to the system on which it is running.
To ensure maximum model compatibility across systems, TUFLOW will do its best to match names in model files consistently between Windows and Linux.
As a general principle, TUFLOW will try to run a model across both platforms with as few changes as possible, while writing results in the format appropriate to the platform on which it is running.
Common Questions Answered (FAQ)
Why use TUFLOW on Linux at all?
TUFLOW on Linux is not just for users who use Linux as their primary work environment, although those users certainly exist. Other reasons to consider it include:
- Performance
Servers or workstations dedicated to running models can be configured to run TUFLOW and the necessary supporting software, such as CodeMeter and NVIDIA GPU drivers, with very little else installed. There may also be small performance differences between executables built and optimised for Windows and Linux.
- Infrastructure cost
This is especially relevant when running virtual machines dedicated to TUFLOW, or many virtual machines in the cloud. Most Linux distributions do not require a licence, whereas Windows does, which can substantially reduce infrastructure costs.
- HPC tooling
Automating TUFLOW model runs across many computers or in the cloud can be simplified using tools designed for this purpose. Many of these tools are available off the shelf, primarily for Linux, such as SLURM and PBS/Torque. Containerisation tools, such as Docker, Podman and LXC, also typically run on Linux.
Note: HPC tooling refers to job scheduling and automation software used to manage large numbers of model runs. Containerisation packages applications and their dependencies into portable and reproducible runtime environments.
Must TUFLOW users on Linux use the command line interface?
Linux offers a variety of desktop environments and TUFLOW can be used from those just like users would using Microsoft Windows. However, in either case TUFLOW itself is always running as a so-called console application and that makes it uniquely suited to running in lightweight non-graphical environments as well.
Like Windows, Linux offers a variety of scripting options that can help minimise the direct use of the command line by users, if that is desirable. Bash shell scripts are as easy to write and run as batch files are on Windows. Running Python or even PowerShell on Linux is easy to set up as well.
However, due to the nature of Linux and TUFLOW, users are encouraged to understand the basics of running TUFLOW from the command line. The TUFLOW Support team can assist with this.