Skip to content

Macaulay2

Macaulay2 is available as a module on Apocrita.

Usage

To run the default installed version of Macaulay2, simply load the macaulay2 module:

module load macaulay2

Once the module is loaded, Macaulay2 can be run either as a batch job, or as an interactive job in a qlogin session.

Example jobs

Simple batch job

Here is an example Macaulay2 batch job using the --script option, pointing to a script file in .m2 format:

#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe smp 1
#$ -l h_rt=1:0:0
#$ -l h_vmem=2G

module load macaulay2
M2 --script example.m2

Using Macaulay2 interactively on Apocrita

Interactive Macaulay2 sessions can be run in text-only mode using the M2 command.

To run a text-only Macaulay2 session:

  • start a session on a node on the cluster using qlogin
  • load the appropriate Macaulay2 module e.g. module load macaulay2
  • start Macaulay2 using M2

To start a text-only session on a node with 1 core and 2GB of RAM.

qlogin -pe smp 1 -l h_vmem=2G

module load macaulay2
M2

Integration with SageMath

SageMath can be installed on Apocrita via Anaconda or Mamba via Miniconda and includes an interface to Macaulay2.

To use the SageMath interface to Macaulay2, be sure to have a macaulay2 module loaded before activating your Conda env.

References