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
122
-
julia --project="$JULIA_PREFDIR" -e 'using Pkg; Pkg.add("Preferences")'
123
+
julia --project="$JULIA_PREFDIR" -e 'using Pkg; Pkg.add("Preferences")'>>$TMP_JULIAUP_LOG
123
124
echo"[extras]">>"$JULIA_PREF_PROJECT"
124
125
fi
125
126
126
127
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)'
130
+
julia --project="$JULIA_PREFDIR" -e 'using Preferences; set_preferences!("CUDA_Runtime_jll", "local"=>true)'>>$TMP_JULIAUP_LOG
130
131
if [ -n"${JUHPC_CUDA_RUNTIME_VERSION}" ];then
131
-
julia --project="$JULIA_PREFDIR" -e 'using Preferences; set_preferences!("CUDA_Runtime_jll", "version"=>join(split(ENV["JUHPC_CUDA_RUNTIME_VERSION"],".")[1:2],"."))'
132
+
julia --project="$JULIA_PREFDIR" -e 'using Preferences; set_preferences!("CUDA_Runtime_jll", "version"=>join(split(ENV["JUHPC_CUDA_RUNTIME_VERSION"],".")[1:2],"."))'>>$TMP_JULIAUP_LOG
132
133
fi
133
134
fi
134
135
135
136
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)'
139
+
julia --project="$JULIA_PREFDIR" -e 'using Preferences; set_preferences!("AMDGPU", "use_artifacts"=>false, "eager_gc"=>false)'>>$TMP_JULIAUP_LOG
139
140
fi
140
141
141
142
if [ -n"${JUHPC_CUDA_HOME}" ];thenexport CUDA_HOME="$JUHPC_CUDA_HOME";fi
142
143
if [ -n"${JUHPC_ROCM_HOME}" ];thenexport ROCM_PATH="$JUHPC_ROCM_HOME";fi
143
144
144
-
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]!=""])'
145
+
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]!=""])'>>$TMP_JULIAUP_LOG
145
146
146
147
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)
147
-
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)'
148
+
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)'>>$TMP_JULIAUP_LOG
148
149
fi
149
150
150
151
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)
151
-
julia --project="$JULIA_PREFDIR" -e 'using AMDGPU; AMDGPU.ROCmDiscovery.use_artifacts!(false)'
152
+
julia --project="$JULIA_PREFDIR" -e 'using AMDGPU; AMDGPU.ROCmDiscovery.use_artifacts!(false)'>>$TMP_JULIAUP_LOG
152
153
fi
153
154
154
155
if [ -n"${JUHPC_MPI_VENDOR}" ];then
155
156
check_var "JUHPC_MPI_EXEC"
156
-
julia --project="$JULIA_PREFDIR" -e 'using MPIPreferences; MPIPreferences.use_system_binary(mpiexec=split(ENV["JUHPC_MPI_EXEC"]), vendor=ENV["JUHPC_MPI_VENDOR"])'
157
+
julia --project="$JULIA_PREFDIR" -e 'using MPIPreferences; MPIPreferences.use_system_binary(mpiexec=split(ENV["JUHPC_MPI_EXEC"]), vendor=ENV["JUHPC_MPI_VENDOR"])'>>$TMP_JULIAUP_LOG
157
158
elif [ -n"${JUHPC_MPI_HOME}" ];then
158
159
check_var "JUHPC_MPI_EXEC"
159
-
julia --project="$JULIA_PREFDIR" -e 'using MPIPreferences; MPIPreferences.use_system_binary(mpiexec=split(ENV["JUHPC_MPI_EXEC"]), extra_paths=["$(ENV["JUHPC_MPI_HOME"])/lib"])'
160
+
julia --project="$JULIA_PREFDIR" -e 'using MPIPreferences; MPIPreferences.use_system_binary(mpiexec=split(ENV["JUHPC_MPI_EXEC"]), extra_paths=["$(ENV["JUHPC_MPI_HOME"])/lib"])'>>$TMP_JULIAUP_LOG
160
161
fi
161
162
162
163
if [ -n"${JUHPC_HDF5_HOME}" ];then
163
-
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")'
164
+
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")'>>$TMP_JULIAUP_LOG
164
165
fi
165
166
166
167
if [ !-s"$JULIA_PREFS" ];then error "preferences file is missing or empty.";fi
0 commit comments