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

[me@login [csf3] ~]$ module load apps/binapps/julia/1.10.0
[me@login [csf3] ~]$ qrsh -l short -cwd -V 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/mygroup/me

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/qrsh session:

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
#$ -cwd               # Application will run from current working directory
#$ -N julia_serial    # Name given to batch job (optional)

module load apps/binapps/julia/1.1.1

julia myscript.jl

Submit the jobscript using:

qsub scriptname

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

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

#!/bin/bash --login
#$ -cwd               # Application will run from current working directory
#$ -N julia_smp       # Name given to batch job (optional)
#$ -pe smp.pe 32      # Request 32 cores using SMP parallel environment

module load apps/binapps/julia/1.1.1

julia -p $NSLOTS myscript.jl

Submit the jobscript using:

qsub scriptname

Further info

Updates

None.

Last modified on October 28, 2024 at 8:47 am by Pen Richardson