From the SageMath home page: SageMath is a free open-source mathematics software system licensed under the GPL. It builds on top of many existing open-source packages: NumPy, SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more. Access their combined power through a common, Python-based language or directly via interfaces or wrappers.


  • 7.5.1

Authorized Users

  • CIRCE account holders
  • SC account holders


  • CIRCE cluster
  • SC cluster


SageMath requires the following module file to run:

  • apps/sage/7.5.1

Running SageMath on CIRCE

The SageMath user guide is essential to understanding the application and making the most of it. The guide and this page should help you to get started with your simulations. Please refer to the Documentation section for a link to the guide.

  • Note on CIRCE: Make sure to run your jobs from your $WORK directory!
  • Note: Scripts are provided as examples only. Your SLURM executables, tools, and options may vary from the example below. For help on submitting jobs to the queue, see our SLURM User’s Guide.

Using SageMath on CIRCE/SC

Once you add the module above, you can either invoke the SageMath interpreter interactively by typing:

[user@itn0 ~]$ sage


or, you can specify a SageMath source code file, with any applicable arguments:

[user@itn0 ~]$ sage input.sage arg1 arg2…

Jobs Longer than 20 Minutes in Length

Interactive Mode

To run SageMage in an interactive session, use srun to enter an interactive shell. This example is for 30 minutes using 1 cpu core:

[user@itn0 ~]$ srun --time=00:30:00 --ntasks=1 --pty /bin/bash

Once you get dropped into an interactive shell on the execution host, you need to load the SageMath module.

[user@svc-3024-22-6 ~]$ module load apps/sage/7.5.1

You should now be able to execute “sage” (interactive mode) from the command line.

SageMath Batch Jobs from the Command Line

You must create a submit script (for testing, call it “”) like the following to run SageMath:

#SBATCH --comment=sagemath-test
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=2 
#SBATCH --job-name=sagemath-test
#SBATCH --output=output.%j.sagemath-test
#SBATCH --time=00:10:00

#### SLURM task using 1 Node with 2 Processors per Node SageMath test to run for 10 minutes.

module purge
module load apps/sage/7.5.1

sage input.sage

Next, you can change to your job’s directory, and run the sbatch command to submit the job:

[user@login0 ~]$ cd my/jobdir
[user@login0 jobdir]$ sbatch ./
  • You can view the status of your job with the “squeue -u <username>” command


Home Page, User Guides, and Manuals

More Job Information

See the following for more detailed job submission information:

Reporting Bugs

Report bugs with SageMath to the IT Help Desk: