Julia
Simple Julia
Interactive Mode
SSH onto the mercury login node
ssh <BoothID>@mercury.chicagobooth.edu
Request an interactive session on a compute node
srun --account=<account> --pty bash --login
Browse the software modules to find the appropriate version
module avail
Load the module with the desired version
module load julia/1.8
Start the command-line REPL by typing:
julia
Batch Mode
The following Julia script (hello_world.jl) is a simple script.
1println("Hello, World!")
The previous script can be run on Mercury by creating a submit script (submit.sh) that contains job-specific information.
Typing sbatch submit.sh
will add your job to the queue.
1#!/bin/bash
2
3#SBATCH --account=phd
4
5#SBATCH --partition=standard
6#SBATCH --mem=2G
7#SBATCH --time=0-01:00:00
8
9#SBATCH --job-name=simple_program
10
11# load the Julia module
12module load julia/1.8
13
14# execute Julia script
15srun julia hello_world.jl