Skip to content

Instantly share code, notes, and snippets.

@luraess
Last active May 14, 2021 20:49
Show Gist options
  • Save luraess/24dcd45d25ecacb12f4115ec44254f56 to your computer and use it in GitHub Desktop.
Save luraess/24dcd45d25ecacb12f4115ec44254f56 to your computer and use it in GitHub Desktop.
Steps to set up and run a Julia GPU code on octopus using ParallelStencil.jl module.

Running a Julia code on a single GPU on octopus

In the shell, prepare the Julia environment on an octopus node:

$ ssh <username>@octopus.unil.ch

$ ssh -YC nodeXX

$ cd /scratch/<username>/<path-to-folder>

$ module load julia cuda/11.0

$ export JULIA_CUDA_USE_BINARYBUILDER=false

Lauch Julia:

$ julia

Then in the Julia REPL (and package manager):

julia> ]

(@v1.5) pkg> add Plots

(@v1.5) pkg> add CUDA

(@v1.5) pkg> add ParallelStencil

julia> 

julia> exit()

Then, running the code.

  • From the Julia REPL (bound checks - good for development). Launch julia:

    $ julia

    then in the REPL:

    julia> include("myJuliaCode.jl")
  • Or from the terminal (better perf. - production run):

    $ julia -O3 --check-bounds=no myJuliaCode.jl 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment