Magma

      Comments Off on Magma

Ins­tal­led version : 2.23-9, 2.25-7, 2.26-8, 2.27-7, 2.28-10 (défault).
2.26-8, 2.27-7 and 2.28-10 versions financed by MIS.
Official documentation and wikipédia.

Magma can only be run on the magma partition !

Description

Magma is a software package designed for computations in algebra, number theory, algebraic geometry, and algebraic combinatorics. It provides a mathematically rigorous environment for defining and working with structures such as groups, rings, fields, modules, algebras, schemes, curves, graphs, designs, codes, and many others. Magma also supports a number of databases designed to aid computational research in those areas of mathematics which are algebraic in nature.

Setting up the Magma environment

ml math/magma

Tutorials

An example of a magma program – Syracuse sequence

  • Display the Syracuse sequence from a random number between 1 and 100.
  • Edit syracuse.in file :
x := Random(1, 100);
while x gt 1 do
     x;
     if IsEven(x) then
       x div:= 2;
     else
        x := 3*x+1;
     end if;
end while;

Magma job submission with syracuse.in as input

Edit launch_syracuse.sh file

#!/bin/sh
 
#SBATCH --job-name=testmagma
#SBATCH --partition=magma
 
echo "=== TEST 2.27-7 ==="
ml math/magma/2.27-7
magma syracuse.in

launch_syracuse.sh job submission

sbatch launch_syracuse.sh

Magma in interactive

ml math/magma
srun --partition=magma magma
Magma V2.27-7     Thu Feb 23 2023 10:02:20 on bignode11 [Seed = 228148732]
Type ? for help.  Type <Ctrl>-D to quit.
3+4;
7

Documentation