# About implementing a shared Julia environment for HPC clusters at CSC

**URL:** https://discourse.julialang.org/t/about-implementing-a-shared-julia-environment-for-hpc-clusters-at-csc/112217
**Category:** Julia at Scale
**Created:** [March 28, 2024, 8:22am UTC](https://discourse.julialang.org/t/about-implementing-a-shared-julia-environment-for-hpc-clusters-at-csc/112217 "2024-03-28T08:22:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jaantollander](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jaantollander/32/208072_2.png) [@jaantollander](https://discourse.julialang.org/u/jaantollander)
#### Post date: [March 28, 2024, 8:22am UTC](https://discourse.julialang.org/t/about-implementing-a-shared-julia-environment-for-hpc-clusters-at-csc/112217/1 "2024-03-28T08:22:31Z")

</div>

Hello! I’m working at [CSC](https://www.csc.fi/), an HPC center in Finland, and I have been installing a shared Julia environment to our HPC clusters (Puhti, Mahti, and LUMI). These clusters use Lmod for module environments and Slurm as the workload manager. I used Ansible to install and configure the environments. You can find the source here: [**csc-env-julia**](https://github.com/CSCfi/csc-env-julia).

The Julia environment I implemented consists of the following modules:

- `julia` module to set paths to the official Julia binaries, and default values for Julia thread count (`JULIA_NUM_THREADS`), Julia CPU count (`JULIA_CPU_THREADS`), and linear algebra backend thread counts (`OPENBLAS_NUM_THREADS` and `MKL_NUM_THREADS`). The module version corresponds to the Julia version.

- `julia-mpi` module to load global preferences for MPI.jl to use the system MPI installation. The module version corresponds to the MPI.jl version.

- `julia-cuda` module to load global preferences for CUDA.jl to use the system CUDA installation. The module version corresponds to the CUDA.jl version.

- `julia-amdgpu` module to load global preferences for AMDGPU.jl to use the system ROCm installation. The module version corresponds to the AMDGPU.jl version.

I imagine other clusters could use similar module structure and consistency across clusters could help Julia adoption and usage in HPC clusters.

I have also written documentation about how to use the [**Julia application**](https://docs.csc.fi/apps/julia/) and how to [**run Julia batch jobs on the clusters**](https://docs.csc.fi/support/tutorials/julia/).

Also, big thanks to all who have contributed to the [Julia on HPC clusters](https://juliahpc.github.io/JuliaOnHPCClusters/) page. It has been a very useful resource, especially the advice about creating the global preferences for MPI and GPU packages.

Any feedback is appreciated!

---

<div class="post-metadata">

### Author: ![Alexander-Barth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alexander-barth/32/3692_2.png) [@Alexander-Barth](https://discourse.julialang.org/u/Alexander-Barth)
#### Post date: [March 19, 2025, 7:44am UTC](https://discourse.julialang.org/t/about-implementing-a-shared-julia-environment-for-hpc-clusters-at-csc/112217/2 "2025-03-19T07:44:37Z")

</div>

Just wanted to say thank you @jaantollander ! I am using your modules on LUMI on a regular basis. In particular, in particular `julia-mpi` was very helpful to figure out how to use ROCM-aware MPI on Lumi.
