Skip to content

Commit e731295

Browse files
committed
improve progress bar
1 parent 143af8e commit e731295

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

juhpc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,38 +191,39 @@ export JULIA_PREFS="$JULIA_PREFDIR/LocalPreferences.toml"
191191
mkdir -p "$JULIA_PREFDIR" || { error "failed to create directory: $JULIA_PREFDIR"; }
192192

193193
progress_bar 1 # Initialize progress bar.
194+
julia_pref 'using Pkg' 10 # Initialize project.
194195

195196
if [[ -n "${JUHPC_CUDA_HOME}" || -n "${JUHPC_ROCM_HOME}" ]]; then
196-
julia_pref 'using Pkg; Pkg.add("Preferences")' 5
197+
julia_pref 'using Pkg; Pkg.add("Preferences")' 30
197198
echo "[extras]" >> "$JULIA_PREF_PROJECT"
198199
fi
199200

200201
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
201202
echo 'CUDA_Runtime_jll = "76a88914-d11a-5bdc-97e0-2f5a05c973a2"' >> "$JULIA_PREF_PROJECT"
202203

203-
julia_pref 'using Preferences; set_preferences!("CUDA_Runtime_jll", "local"=>true)' 10
204+
julia_pref 'using Preferences; set_preferences!("CUDA_Runtime_jll", "local"=>true)' 35
204205
if [ -n "${JUHPC_CUDA_RUNTIME_VERSION}" ]; then
205-
julia_pref 'using Preferences; set_preferences!("CUDA_Runtime_jll", "version"=>join(split(ENV["JUHPC_CUDA_RUNTIME_VERSION"],".")[1:2],"."))'
206+
julia_pref 'using Preferences; set_preferences!("CUDA_Runtime_jll", "version"=>join(split(ENV["JUHPC_CUDA_RUNTIME_VERSION"],".")[1:2],"."))' 40
206207
fi
207208
fi
208209

209210
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
210211
echo 'AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"' >> "$JULIA_PREF_PROJECT"
211212

212-
julia_pref 'using Preferences; set_preferences!("AMDGPU", "use_artifacts"=>false, "eager_gc"=>false)' 15
213+
julia_pref 'using Preferences; set_preferences!("AMDGPU", "use_artifacts"=>false, "eager_gc"=>false)' 45
213214
fi
214215

215216
if [ -n "${JUHPC_CUDA_HOME}" ]; then export CUDA_HOME="$JUHPC_CUDA_HOME"; fi
216217
if [ -n "${JUHPC_ROCM_HOME}" ]; then export ROCM_PATH="$JUHPC_ROCM_HOME"; fi
217218

218-
julia_pref '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]!=""])' 50
219+
julia_pref '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]!=""])' 70
219220

220221
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)
221-
julia_pref '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)' 60
222+
julia_pref '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)' 80
222223
fi
223224

224225
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)
225-
julia_pref 'using AMDGPU; AMDGPU.ROCmDiscovery.use_artifacts!(false)' 70
226+
julia_pref 'using AMDGPU; AMDGPU.ROCmDiscovery.use_artifacts!(false)' 85
226227
fi
227228

228229
if [ -n "${JUHPC_MPI_VENDOR}" ]; then

0 commit comments

Comments
 (0)