You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [[ -n"${JUHPC_CUDA_HOME}"||-n"${JUHPC_ROCM_HOME}" ]];then
133
-
julia --project=$JULIA_PREFDIR -e 'using Pkg; Pkg.add("Preferences")'
134
-
echo"[extras]">>$JULIA_PREF_PROJECT
133
+
julia --project="$JULIA_PREFDIR" -e 'using Pkg; Pkg.add("Preferences")'
134
+
echo"[extras]">>"$JULIA_PREF_PROJECT"
135
135
fi
136
136
137
137
if [ -n"${JUHPC_CUDA_HOME}" ];then# Set preference for using the local CUDA runtime before any installation of CUDA.jl to avoid downloading of artifacts
julia --project=$JULIA_PREFDIR -e 'using Preferences; set_preferences!("CUDA_Runtime_jll", "local"=>true)'
140
+
julia --project="$JULIA_PREFDIR" -e 'using Preferences; set_preferences!("CUDA_Runtime_jll", "local"=>true)'
141
141
if [ -n"${JUHPC_CUDA_RUNTIME_VERSION}" ];then
142
-
julia --project=$JULIA_PREFDIR -e 'using Preferences; set_preferences!("CUDA_Runtime_jll", "version"=>join(split(ENV["JUHPC_CUDA_RUNTIME_VERSION"],".")[1:2],"."))'
142
+
julia --project="$JULIA_PREFDIR" -e 'using Preferences; set_preferences!("CUDA_Runtime_jll", "version"=>join(split(ENV["JUHPC_CUDA_RUNTIME_VERSION"],".")[1:2],"."))'
143
143
fi
144
144
fi
145
145
146
146
if [ -n"${JUHPC_ROCM_HOME}" ];then# Set preference for using the local ROCm runtime before any installation of AMDGPU.jl to avoid downloading of artifacts
julia --project=$JULIA_PREFDIR -e 'using Preferences; set_preferences!("AMDGPU", "use_artifacts"=>false, "eager_gc"=>false)'
149
+
julia --project="$JULIA_PREFDIR" -e 'using Preferences; set_preferences!("AMDGPU", "use_artifacts"=>false, "eager_gc"=>false)'
150
150
fi
151
151
152
-
if [ -n"${JUHPC_CUDA_HOME}" ];thenexport CUDA_HOME=$JUHPC_CUDA_HOME;fi
153
-
if [ -n"${JUHPC_ROCM_HOME}" ];thenexport ROCM_PATH=$JUHPC_ROCM_HOME;fi
152
+
if [ -n"${JUHPC_CUDA_HOME}" ];thenexport CUDA_HOME="$JUHPC_CUDA_HOME";fi
153
+
if [ -n"${JUHPC_ROCM_HOME}" ];thenexport ROCM_PATH="$JUHPC_ROCM_HOME";fi
154
154
155
-
julia --project=$JULIA_PREFDIR -e 'using Pkg; Pkg.add([p for (p,l) in [("MPIPreferences", "JUHPC_MPI_VENDOR"), ("MPIPreferences", "JUHPC_MPI_HOME"), ("CUDA", "JUHPC_CUDA_HOME"), ("AMDGPU", "JUHPC_ROCM_HOME"), ("HDF5", "JUHPC_HDF5_HOME")] if haskey(ENV,l) && ENV[l]!=""])'
155
+
julia --project="$JULIA_PREFDIR" -e 'using Pkg; Pkg.add([p for (p,l) in [("MPIPreferences", "JUHPC_MPI_VENDOR"), ("MPIPreferences", "JUHPC_MPI_HOME"), ("CUDA", "JUHPC_CUDA_HOME"), ("AMDGPU", "JUHPC_ROCM_HOME"), ("HDF5", "JUHPC_HDF5_HOME")] if haskey(ENV,l) && ENV[l]!=""])'
156
156
157
157
if [ -n"${JUHPC_CUDA_HOME}" ];then# Set preference for using the local CUDA runtime in a more stable way (in case the previous would not be valid anymore)
158
-
julia --project=$JULIA_PREFDIR -e 'using CUDA; CUDA.set_runtime_version!((VersionNumber(join(split(ENV[key],".")[1:2],".")) for key in ["JUHPC_CUDA_RUNTIME_VERSION"] if haskey(ENV,key) && ENV[key]!=="")...; local_toolkit=true)'
158
+
julia --project="$JULIA_PREFDIR" -e 'using CUDA; CUDA.set_runtime_version!((VersionNumber(join(split(ENV[key],".")[1:2],".")) for key in ["JUHPC_CUDA_RUNTIME_VERSION"] if haskey(ENV,key) && ENV[key]!=="")...; local_toolkit=true)'
159
159
fi
160
160
161
161
if [ -n"${JUHPC_ROCM_HOME}" ];then# Set preference for using the local ROCm runtime in a more stable way (in case the previous would not be valid anymore)
162
-
julia --project=$JULIA_PREFDIR -e 'using AMDGPU; AMDGPU.ROCmDiscovery.use_artifacts!(false)'
162
+
julia --project="$JULIA_PREFDIR" -e 'using AMDGPU; AMDGPU.ROCmDiscovery.use_artifacts!(false)'
163
163
fi
164
164
165
165
if [ -n"${JUHPC_MPI_VENDOR}" ];then
166
166
check_var "JUHPC_MPI_EXEC"
167
-
julia --project=$JULIA_PREFDIR -e 'using MPIPreferences; MPIPreferences.use_system_binary(mpiexec=split(ENV["JUHPC_MPI_EXEC"]), vendor=ENV["JUHPC_MPI_VENDOR"])'
167
+
julia --project="$JULIA_PREFDIR" -e 'using MPIPreferences; MPIPreferences.use_system_binary(mpiexec=split(ENV["JUHPC_MPI_EXEC"]), vendor=ENV["JUHPC_MPI_VENDOR"])'
168
168
elif [ -n"${JUHPC_MPI_HOME}" ];then
169
169
check_var "JUHPC_MPI_EXEC"
170
-
julia --project=$JULIA_PREFDIR -e 'using MPIPreferences; MPIPreferences.use_system_binary(mpiexec=split(ENV["JUHPC_MPI_EXEC"]), extra_paths=["$(ENV["JUHPC_MPI_HOME"])/lib"])'
170
+
julia --project="$JULIA_PREFDIR" -e 'using MPIPreferences; MPIPreferences.use_system_binary(mpiexec=split(ENV["JUHPC_MPI_EXEC"]), extra_paths=["$(ENV["JUHPC_MPI_HOME"])/lib"])'
171
171
fi
172
172
173
173
if [ -n"${JUHPC_HDF5_HOME}" ];then
174
-
julia --project=$JULIA_PREFDIR -e 'using HDF5; HDF5.API.set_libraries!("$(ENV["JUHPC_HDF5_HOME"])/lib/libhdf5.so", "$(ENV["JUHPC_HDF5_HOME"])/lib/libhdf5_hl.so")'
174
+
julia --project="$JULIA_PREFDIR" -e 'using HDF5; HDF5.API.set_libraries!("$(ENV["JUHPC_HDF5_HOME"])/lib/libhdf5.so", "$(ENV["JUHPC_HDF5_HOME"])/lib/libhdf5_hl.so")'
175
175
fi
176
176
177
-
info_end $INFO_MSG
177
+
info_end "$INFO_MSG"
178
178
179
179
180
180
# Create a wrapper for juliaup that installs juliaup (and latest julia) on scratch if it is not already installed
info "This is the first call to juliaup; juliaup and the latest julia will now be installed. After that, you can use juliaup and julia normally. Installing in $(ENV["JULIAUP_INSTALLDIR"])..."
206
206
sleep 3
207
-
PATH_OLD=\$PATH
207
+
PATH_OLD="\$PATH"
208
208
export PATH=\$(echo \$PATH | perl -pe "s|[^:]*juliaup(?:_wrapper)?[^:]*:?||g") # Remove all juliaup paths from PATH
0 commit comments