Julia

If you are a windows user – please ensure you create your jobscript ON THE CSF directly using gedit. This will prevent your job going into error (Eqw). Text files created on windows have hidden characters that linux cannot read. For further information please see the guide to using the system from windows, in particular the section about text & batch submission script files.

Overview

Set up procedure

Julia can be accessed by loading ONE of the module files as follows:

module load apps/binapps/julia/1.10.0
module load apps/binapps/julia/1.9.1
module load apps/binapps/julia/1.6.2
module load apps/binapps/julia/1.4.0
module load apps/binapps/julia/1.3.0
module load apps/binapps/julia/1.1.1

Running the application

Please do not run Julia on the login nodes. Jobs should instead be submitted to the compute nodes via the batch system, SGE. Some example jobs are given below.

Interactive job

To use Julia interactively, first load a module and then run an interactive session as follows

[username@login1[csf3] ~]$ module load apps/binapps/julia/1.10.0
[username@login1[csf3] ~]$ srun -p interactive -t 60 --pty julia

You will then be presented with an interactive julia prompt:

julia>
julia> sin(pi/2)
1.0

You can switch to shell mode by pressing the ; key, where you can run standard shell commands:

shell> pwd
/mnt/iusers01/xy01/username

Once you have run the shell command, or simply pressed Return/Enter, you are immediately returned to the julia prompt.

Installing packages

Using an interactive session (see above):

julia> ]
(@v1.10) pkg> add Example
julia> import Example

Further info about Julia package management can be found in the official Julia docs.

Serial batch job submission

An example jobscript for a serial job is shown below:

#!/bin/bash --login
#SBATCH -p serial     # Use the nodes dedicated to 1-core jobs
#SBATCH -t 4-0        # Max wall clock time (4-0 is 4 days, max permitted is 7-0)

module purge
module load apps/binapps/julia/1.10.0

julia myscript.jl

Submit the jobscript using:

sbatch jobscriptname

where jobscriptname is the name of your jobscript.

Single node parallel batch job submission (2-168 cores)

An example jobscript for a single node SMP job is given below:

#!/bin/bash --login
#SBATCH -p multicore  # Use the AMD nodes dedicated to multi-core jobs
#SBATCH -n 8          # (or --ntasks=) Number of cores (can be 2-168)
#SBATCH -t 4-0        # Max wall clock time (4-0 is 4 days, max permitted is 7-0)

module purge
module load apps/binapps/julia/1.10.0

# $SLURM_NTASKS will be set to the number on the -n line above
julia -p $SLURM_NTASKS myscript.jl

Submit the jobscript using:

sbatch jobscriptname

where jobscriptname is the name of your jobscript.

Further info

Updates

None.

Last modified on August 26, 2025 at 4:44 pm by George Leaver