Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
carstenbauer committed Jul 21, 2024
1 parent 1bda63d commit d435502
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
8 changes: 8 additions & 0 deletions website/user_faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Set [`JULIA_CPU_TARGET`](https://docs.julialang.org/en/v1.10-dev/manual/environm

This compiles all functions (`clone_all`) for Intel Skylake (`skylake-avx512`), AMD Zen 2 (`znver2`), and a generic fallback (`generic`).

For more information, see [this section of the Julia documentation](https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_CPU_TARGET) and [this section of the developer documentation](https://docs.julialang.org/en/v1/devdocs/sysimg/#Specifying-multiple-system-image-targets).

[_**back to Content**_](#content)

## Should I use Distributed.jl or MPI.jl for large-scale parallelism?
Expand Down Expand Up @@ -118,4 +120,10 @@ Try setting `JULIA_CUDA_MEMORY_POOL=none` (see the [CUDA.jl documentation](https

By default, Julia uses many parallel tasks during precompilation. On the login nodes of some HPC clusters, parallel processes might be subject to resource restrictions. In these cases, you might want to set [`JULIA_NUM_PRECOMPILE_TASKS`](https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_NUM_PRECOMPILE_TASKS) to a low value, e.g. `export JULIA_NUM_PRECOMPILE_TASKS=1` (single task).

[_**back to Content**_](#content)

## Can I precompile GPU code on a login node without a GPU?

Yes, at least for CUDA.jl. See [this part](https://cuda.juliagpu.org/stable/installation/overview/#Precompiling-CUDA.jl-without-CUDA) of the CUDA.jl documentation.

[_**back to Content**_](#content)
29 changes: 23 additions & 6 deletions website/user_gettingstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,41 @@ Getting started with Julia on a new cluster can sometimes be a challenge. Below

---

## Julia binaries or Julia module
## Use the regular Julia binaries or a Julia module (if available)

When starting on a new HPC cluster the first thing you should do is figure out if there is a pre-configured Julia module ([Lmod module](https://lmod.readthedocs.io/en/latest/010_user.html)) available on the cluster. To that end, `module key julia` or `module spider julia` might be helpful commands.

If there isn't a Julia module available that you can load, you should use the regular, pre-built Julia binaries. You can either download (e.g. `wget` or `curl`) them directly [from the website](https://julialang.org/downloads/) or use [juliaup](https://github.com/JuliaLang/juliaup). In any case, you should **not** build Julia from source (unless you have a very good reason and know that you're doing).
If there is no Julia module available that you can load, you should download and use the regular, precompiled Julia binaries. We strongly recommend to use [juliaup](https://github.com/JuliaLang/juliaup) for this. Alternatively, you can also manually download the binaries directly [from the website](https://julialang.org/downloads/).

In any case, you should generally **not** build Julia from source (unless you have a very good reason).

[_**back to Content**_](#content)

## Placing the Julia depot
## Place the Julia depot on the parallel file system.

One you have Julia installed and you can run `julia` from the command line, you should place the Julia depot - the `.julia` folder where Julia stores all dependencies, logs, etc. - on an appropriate file system. By default, it will be stored in `$HOME/.julia`. This may or may not be a good choice, but more often than not it isn't.

One you have `julia`, you must make sure that the Julia depot is placed on an appropriate file system. By default, it will be stored in `$HOME/.julia`. This may or may not be a good choice. What you want is a place on a file system with the following properties
You want to choose a file system with the following properties
* no tight quotas (at least >= 20 GB)
* read and write access (ideally also from compute nodes)
* good (parallel) I/O
* no automatic deletion of unused files (or otherwise you have to find a workaround)

Often times these criterion are best fit on a parallel file system (often `$SCRATCH`). For this reason it might be necessary to set `JULIA_DEPOT_PATH=$SCRATCH/.julia`.
**On most clusters these criterion are best fit on a parallel file system (often `$SCRATCH`).** In this case, you should put `JULIA_DEPOT_PATH=$SCRATCH/.julia` into your `.bashrc`.

Note that if the last point (automatic deletion of unused files) is an issue for you, a pragmatic workaround could be a cronjob that touches all files in the Julia depot every once in a while.
**Note:** If the last point (automatic deletion of unused files) is an issue for you, a pragmatic workaround could be a cronjob that touches all files in the Julia depot every once in a while.

[_**back to Content**_](#content)


## Set `JULIA_CPU_TARGET` appropriately.

On many clusters, the sections above are all you need to get a solid Julia setup. However, if your on a **heterogeneous HPC cluster**, that is, if different nodes have different CPU (micro-)architectures, you should/need to do a few more preparations. Otherwise, you might encounter nasty error messages like "`Illegal instruction`".

To make Julia produce efficient code that works on different CPUs, you need to set [`JULIA_CPU_TARGET`](https://docs.julialang.org/en/v1.10-dev/manual/environment-variables/#JULIA_CPU_TARGET). For example, if you want Julia to compile all functions (`clone_all`) for Intel Skylake (`skylake-avx512`), AMD Zen 2 (`znver2`), and a generic fallback (`generic`), for safety, you could put the following into your `.bashrc`:

`export JULIA_CPU_TARGET="generic;skylake-avx512,clone_all;znver2,clone_all"`.

For more information, see [this section of the Julia documentation](https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_CPU_TARGET) and [this section of the developer documentation](https://docs.julialang.org/en/v1/devdocs/sysimg/#Specifying-multiple-system-image-targets).

[_**back to Content**_](#content)
2 changes: 2 additions & 0 deletions website/user_vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ Microsoft provides ["Remote tunnels"](https://code.visualstudio.com/docs/remote/
* Requires a GitHub / Microsoft account.
* Microsoft serves as the tunnel provider (man in the middle).

**How to do it?**

1. Download the VS Code command line interface from [https://code.visualstudio.com/Download](https://code.visualstudio.com/Download) (search for **CLI**).

2. Copy the single `code` binary to the cluster (and put the directory on `PATH`).
Expand Down

0 comments on commit d435502

Please sign in to comment.