Skip to content

julia/1.11

#%Module 1.0
#
#  julia
# 
module-whatis  "Load Julia (configured for XFEL)"

prepend-path            PATH             /gpfs/exfel/sw/software/euxfel-environment-management/scripts/julia
prepend-path            PATH             /gpfs/exfel/sw/software/juliaup/juliaup/julia-1.11.2+0.x64.linux.gnu/bin

# https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_DEPOT_PATH
if { [info exists env(SASE)] } {
    # On the online cluster we don't have scratch so we have to use the default depot
    setenv                  JULIA_DEPOT_PATH       $env(HOME)/.julia:/gpfs/exfel/sw/software/julia-depot:
} else {
    setenv                  JULIA_DEPOT_PATH       /gpfs/exfel/data/scratch/$env(USER)/julia-depot:/gpfs/exfel/sw/software/julia-depot:
}

# https://juliahpc.github.io/user_gettingstarted/#set_julia_cpu_target_appropriately
setenv                  JULIA_CPU_TARGET       "generic;broadwell,clone_all;skylake-avx512,clone_all;cascadelake,clone_all;sapphirerapids,clone_all;znver3,clone_all;znver2,clone_all"

# https://juliapy.github.io/PythonCall.jl/stable/pythoncall/#If-you-already-have-Python-and-required-Python-packages-installed
setenv                  JULIA_CONDAPKG_BACKEND Null
setenv                  JULIA_PYTHONCALL_EXE   /gpfs/exfel/sw/software/mambaforge/22.11/envs/202402/bin/python

# https://timholy.github.io/Revise.jl/stable/config/#Polling-and-NFS-mounted-code-directories:-JULIA_REVISE_POLL
setenv                  JULIA_REVISE_POLL      1

setenv                  JULIA_EXFEL_ENV        /gpfs/exfel/sw/software/euxfel-environment-management/environments/202501

system /gpfs/exfel/sw/software/euxfel-environment-management/scripts/julia/create-julia-depot

proc ModulesHelp {} {
    puts stdout     " "
    puts stdout     "This sets the path and environment variables for Julia 1.11"
    puts stdout     " "
}