---
title: "Macaulay2"
id: "27049"
type: "epkb_post_type_1"
slug: "macaulay2"
published_at: "2024-05-01T20:37:38+00:00"
modified_at: "2026-05-11T21:19:26+00:00"
url: "https://docs.rc.fas.harvard.edu/kb/macaulay2/"
markdown_url: "https://docs.rc.fas.harvard.edu/kb/macaulay2.md"
excerpt: "Description Macaulay2 is a algebraic geometry and commutative algebra software. Its creation and development has been funded by the National Science Foundation since 1992. Macaulay2 on the cluster Create a Singularity container Macaulay2 is available on the cluster via Singularity..."
taxonomy_epkb_post_type_1_category:
  - "Software"
---

# Macaulay2

## Description

Macaulay2 is a [algebraic geometry](https://en.wikipedia.org/wiki/Algebraic_geometry)
 and [commutative algebra](https://en.wikipedia.org/wiki/Commutative_algebra)
 software. Its creation and development has been funded by the National Science Foundation since 1992.

## Macaulay2 on the cluster

### Create a Singularity container

Macaulay2 is available on the cluster via [Singularity](https://docs.rc.fas.harvard.edu/kb/singularity-on-the-cluster/)
 containers. We recommend working on a compute node. You can get to a compute node by requesting an [interactive job](https://docs.rc.fas.harvard.edu/kb/running-jobs/#Interactive_jobs_and_salloc)
. For example

```
salloc --partition test --time 01:00:00 --cpus-per-task 4 --mem-per-cpu 2G
```

You can pull (i.e. download) the Macaulay2 container from [DockerHub](https://hub.docker.com/r/unlhcc/macaulay2/tags)
 with the command

```
singularity pull docker://unlhcc/macaulay2:latest
```

If you get this error

```
FATAL: While making image from oci registry: error fetching image: failed to get checksum for docker://unlhcc/macaulay2:latest
```

You will need to create a [DockerHub account](https://app.docker.com/signup/)
, then run the following `singularity pull` command. It will prompt for your DockerHub username and password:

```
singularity pull --docker-login docker://unlhcc/macaulay2:latest
Enter Docker/OCI registry username: 
Enter Docker / OCI registry password:
```

### Run Macaulay2

Start a shell inside the Singularity container

```
singularity shell macaulay2_latest.sif
```

The prompt will change to `Singularity>`. Then, type `M2` to start Macualay2. You should see a prompt with `i1`:

```
Singularity> M2
Macaulay2, version 1.24.05
--storing configuration for package FourTiTwo in /n/home01/jharvard/.Macaulay2/init-FourTiTwo.m2
--storing configuration for package Topcom in /n/home01/jharvard/.Macaulay2/init-Topcom.m2
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, PrimaryDecomposition, ReesAlgebra, TangentCone,
Truncations

i1 :
```

For Macaulay2 examples, visit [Macaulay2 documentation](https://macaulay2.com/doc/Macaulay2/share/doc/Macaulay2/Macaulay2Doc/html/)
.

For more details on how to use Singularity on the cluster, see FASRC’s [Singularity](https://docs.rc.fas.harvard.edu/kb/singularity-on-the-cluster/)
 documentation.

## Resources

- FASRC’s [Singularity](https://docs.rc.fas.harvard.edu/kb/singularity-on-the-cluster/) documentation
- [Macaulay2 official website](https://macaulay2.com/)
- [Macaulay2 documentation](https://macaulay2.com/doc/Macaulay2/share/doc/Macaulay2/Macaulay2Doc/html/.)
- [University of Nebraska-Lincoln Holland Computing Center DockerHub](https://hub.docker.com/r/unlhcc/macaulay2)

Bookmarkable Links

- [1. Description](#Description)
- [2. Macaulay2 on the cluster](#Macaulay2_on_the_cluster)
  - [2.1. Create a Singularity container](#Create_a_Singularity_container)
  - [2.2. Run Macaulay2](#Run_Macaulay2)

- [3. Resources](#Resources)

Last UpdatedMay 11, 2026
