- Infos im HLRS Wiki sind nicht rechtsverbindlich und ohne Gewähr -
- Information contained in the HLRS Wiki is not legally binding and HLRS is not responsible for any damages that might result from its use -

Julia: Difference between revisions

From HLRS Platforms
Jump to navigationJump to search
Line 6: Line 6:


==== Create SSH SOCKS proxy to install packages ====
==== Create SSH SOCKS proxy to install packages ====
Follow the instructions [https://discourse.julialang.org/t/installing-packages-via-an-ssh-socks-proxy-on-a-compute-cluster/71735 here] to be able to install Julia packages.
Follow the instructions [https://discourse.julialang.org/t/installing-packages-via-an-ssh-socks-proxy-on-a-compute-cluster/71735 here] to be able to install Julia packages. Log in to Hawk. All following steps should be executed on a login node.


==== Load the Julia module ====
==== Load the Julia module ====
tbd. Right now, just copy-paste the code found below in the [[#Modules setup|Modules setup]] section below.
Right now, just copy-paste the code found below in the [[#Modules setup|Modules setup]] section below.
 
'''TODO: ''' Replace by actual module command.
 
==== Install MPI.jl and CUDA.jl ====
To install MPI.jl, execute
<syntaxhighlight lang="shell">
julia -e 'using Pkg; Pkg.add("MPI")'
</syntaxhighlight>
This will download and precompile MPI.jl and all of its dependencies. If you find that the installation produce is stuck at a very early stage (e.g., after outputting only <code>Updating registry at `~/.julia/registries/General.toml`</code>), it means you have not properly set up your SOCKS proxy or forgot to add the appropriate environment variables.
 
If you also want to use the GPUs with Julia, install CUDA.jl by executing
<syntaxhighlight lang="shell">
julia -e 'using Pkg; Pkg.add("CUDA")'
</syntaxhighlight>


== For admins ==
== For admins ==

Revision as of 22:38, 13 April 2022

If you have questions regarding the use of Julia at HLRS, please get in touch with Michael Schlottke-Lakemper.

For users

Getting started

Create SSH SOCKS proxy to install packages

Follow the instructions here to be able to install Julia packages. Log in to Hawk. All following steps should be executed on a login node.

Load the Julia module

Right now, just copy-paste the code found below in the Modules setup section below.

TODO: Replace by actual module command.

Install MPI.jl and CUDA.jl

To install MPI.jl, execute

julia -e 'using Pkg; Pkg.add("MPI")'

This will download and precompile MPI.jl and all of its dependencies. If you find that the installation produce is stuck at a very early stage (e.g., after outputting only Updating registry at `~/.julia/registries/General.toml`), it means you have not properly set up your SOCKS proxy or forgot to add the appropriate environment variables.

If you also want to use the GPUs with Julia, install CUDA.jl by executing

julia -e 'using Pkg; Pkg.add("CUDA")'

For admins

Module setup

It would be great if we could have a julia/1.7.2 namespacing to support different Julia versions, where the default should be the latest stable version.

The following commands should be executing when loading the Julia module:

# Julia-related settings
export JULIA_DEPOT_PATH="$HOME/.julia/$SITE_NAME/$SITE_PLATFORM_NAME"

# MPI-related settings
module load openmpi
export JULIA_MPI_BINARY=system

# CUDA-related settings
export CUDA_PATH=/usr/local/cuda
export JULIA_CUDA_USE_BINARYBUILDER=false
export JULIA_CUDA_USE_MEMORY_POOL=none

# Other settings
export UCX_WARN_UNUSED_ENV_VARS=n # suppress UCX warnings