4ti2¶
4ti2 is a software suite for algebraic, geometric, and combinatorial problems on linear spaces. It is available on the cluster via a module.
Loading the Module¶
To load 4ti2 version 1.6.11 and its required dependencies (GLPK and GMP):
Terminal
module load 4ti2/1.6.11
This automatically loads the required modules:
glpk/5.0-6xtss3c
gmp/6.2.1
Once loaded, 4ti2 commands like zsolve
, markov
, groebner
, and others become available in your shell.
Quick Example: Solving an Integer System¶
Create a file named matrix.mat
with the following content:
3 3
1 2 3
0 1 4
3 3 1
Then run:
Terminal
```bash
zsolve matrix.mat ```
This computes the integer kernel of the matrix.
Common Commands in 4ti2¶
Some of the frequently used command-line tools in 4ti2 include:
zsolve
– Solve systems of linear equations over integersgroebner
– Compute toric Gröbner basesmarkov
– Compute Markov baseshilbert
– Compute Hilbert baseshomogenize
– Homogenize a matrixdual
– Compute the dual of a matrixgraver
– Compute Graver bases
You can get command-line help with:
Terminal
<command> --help
For example:
Terminal
```bash
groebner --help ```
SLURM Job Script Example¶
Here’s a sample SLURM batch script for using 4ti2 non-interactively:
Terminal
#!/bin/bash
#SBATCH --job-name=4ti2-test
#SBATCH --time=00:05:00
#SBATCH --mem=1G
#SBATCH --cpus-per-task=1
#SBATCH --output=4ti2-%j.out
module load 4ti2/1.6.11
echo "1 1" > test.mat
echo "1" >> test.mat
zsolve test.mat
Documentation and References¶
Official website: https://4ti2.github.io/
The software is useful for research in:
- Integer programming
- Algebraic statistics
- Toric ideals
- Gröbner and Markov bases