Julia

Software name: 
Julia
Policy 

Julia is freely available to users at HPC2N. 

General 

Julia is a high-level, high-performance, dynamic programming language.

Description 

While Julia is a general-purpose language and can be used to write any application, many of its features are well suited for numerical analysis and computational science.

The Julia community has registered over 7,400 Julia packages for community use. These include various mathematical libraries, data manipulation tools, and packages for general purpose computing. In addition to these, you can easily use libraries from Python, R, C/Fortran, C++, and Java.

Availability 

On HPC2N we have Julia available as a module on Kebnekaise.

Usage at HPC2N 

To use the Julia module, add it to your environment. Use:

module spider julia

to see which versions are available.

The Julia modules do not have any prerequisites and you can load a module directly with:

ml Julia/<version>

Example, loading Julia version 1.7.1

ml Julia/1.7.1-linux-x86_64

You can read more about loading modules on our Accessing software with Lmod page and our Using modules (Lmod) page.

Loading the module should set any needed environmental variables as well as the path.

See the Julia language documentation page for more information about the usage of Julia.

Running Julia on Kebnekaise

You should run Julia through a batch script. Here are some simple examples of Julia batch scripts:

Serial

#!/bin/bash
# Your project id
#SBATCH -A SNICXXXX-YY-ZZZ
#SBATCH -n 1

# Asking for walltime (HH:MM:SS) - change to what you need, here 30 min
#SBATCH --time=00:30:00

# Split output and error files - suggestion
#SBATCH --error=job.%J.err
#SBATCH --output=job.%J.out

# Purge modules before you load the Julia module
ml purge > /dev/null 2>&1
ml Julia/1.7.1-linux-x86_64

# Launch your julia script
julia my_julia_test.jl

Submit the batch script with (change to the name you gave your script):

sbatch my_submit-script.sh

More memory (all memory in the node)

#!/bin/bash
# Your project id
#SBATCH -A SNICXXXX-YY-ZZZ

# Asking for a full node
#SBATCH -N 1

# 28 cores per task, so we get all memory from all cores
#SBATCH -c 28

# Asking for walltime (HH:MM:SS) - change to what you need, here 1 hour and 30 min
#SBATCH --time=01:30:00

# Split output and error files - suggestion
#SBATCH --error=job.%J.err
#SBATCH --output=job.%J.out

# Purge modules before you load the Julia module
ml purge > /dev/null 2>&1
ml Julia/1.7.1-linux-x86_64

# Launch your julia script
julia my_julia_test.jl

Submit the batch script with (change to the name you gave your script):

sbatch my_submit-script.sh
Additional info 

More information about Julia can be found on the Julia homepage.

Updated: 2022-08-05, 10:24