Julia 2016

From HPC users
Jump to navigationJump to search


Julia is a high-level general-purpose dynamic programming language. Julia uses multiple dispatch as a paradigm, making it easy to express many object-oriented and functional programming patterns. The standard library provides asynchronous I/O, process control, logging, profiling, a package manager, and more.

Installed version

The currently installed version is 1.0.1 on the environment hpc-env/6.4.

The currently installed versions of Julia are

on environment hpc-env/8.3:


on environment hpc-env/6.4:


Using Julia

If you want to find out more about Julia on the HPC Cluster, you can use the command

module spider Julia

This will show you basic informations e.g. a short description and the currently installed version.

To load the desired version, you must load the module as well as the environment:

module load hpc-env/6.4
module load Julia

Adding packages

Julia has a built in package manager.
You can start the package manager Pkg by starting Julia and typing the closed square bracket: ]

$ julia
julia>  ]
(v1.0) pkg> 

The Terminal will change color and will switch from julia> to (v1.0) pkg>

Now every command you type in controlls Pkg. You can add a package by using the add command:

add example example2          # you can add multiple packages at once

The packages will be installed into your $HOME directory at ~/.julia/packages

The same applies to removing packages with the rm command and updating packages with update:

rm example
update example2

Within Pkg, you can type in ? to get an overview about the commands available.

Adding and using GR

For Julia, you can install GR, a universal framework for cross-platform visualization applications.

Before doing that, you must have established an SSH connection with X11 forwarding enabled. This can be done by adding the option -X to our SSH connection:

ssh abcd1234@carl.hpc.uni-oldenburg.de -X 

Now, you can follow the steps shown above at the section Adding packages to add GR:

julia>  ]
(v1.0) pkg>  add GR

Now you can return to Julia (CTRL + C) and start using GR and maybe add a testing sequence to prove that everything works fine:

julia>  using GR
julia>  histogram(randn(10000))

Now you should see a histogram popping up.


The full documentation about the programming language Julia can be found here.

Further information are also available on the homepage