I am using a setup on a shared cluster where I work with the vscode remote extension and where Julia is installed using a module system rather than juliaup.
In VSCode settings I set both Julia Executable path and Language Server Executable path to the 1.11.7 binary: /Net/Groups/Services/HPC_22/apps/julia/julia-1.11.7/bin/julia
Starting the Julia REPL correctly uses Julia 1.7:
julia> VERSION, DEPOT_PATH
(v"1.11.7", ["/User/homes/twutz/scratch/twutz/julia_gpu_depots", "/Net/Groups/Services/HPC_22/apps/julia/julia-1.11.7/local/share/julia", "/Net/Groups/Services/HPC_22/apps/julia/julia-1.11.7/share/julia"])
However the language server output pane reports:
 Info: Starting LS with Julia 1.11.6
  Activating project at `/Net/Groups/BGI/scratch/twutz/.vscode-server/extensions/julialang.language-julia-1.149.2/scripts/environments/languageserver/v1.11`
...
Failed to precompile Tokenize [0796e94c-ce3b-5d07-9a54-7f471281c624] to "/User/homes/twutz/.vscode-server/data/User/globalStorage/julialang.language-julia/lsdepot/v1/compiled/v1.11/Tokenize/jl_Qe9nz4".
ERROR: Unable to load dependent library /Net/Groups/BGI/scratch/twutz/julia_cluster_depots/juliaup/julia-1.11.6+0.x64.linux.gnu/bin/../lib/julia/libjulia-codegen.so.1.11
Message:libLLVM-16jl.so: failed to map segment from shared object
From that output I suspect that the LS (language server)
- uses the wrong julia executable (the juliaup version from the shared file system rather than the module version)
- uses a wrong JULIA_DEPOT_PATH (I set it to different value in my .profilewhen running julia from a gpu node:
if [ "$(hostname)" == "node-r6-he01.bgc-jena.mpg.de" ]; then
  export JULIA_DEPOT_PATH="/User/homes/twutz/scratch/twutz/julia_gpu_depots:"
else
  export JULIA_DEPOT_PATH="/User/homes/twutz/scratch/twutz/julia_cluster_depots:"
fi 
I try to only use the module version and to use separate DEPOT_PATH depending on which node on the cluster julia is started (the nodes share the same file system). I suspect that the usage of the wrong julia executable and wrong DEPOT_PATH by the LS seems to mess up my julia installation, e.g. by compiling CUDA with available shared NVIDIA libraries or without them to the wrong DEPOT_PATH.
How do I tell vscode language server to use correct julia executable path and DEPOT_PATH?