Skip to content

Commit

Permalink
Explicitly declare some local/global variables to avoid warnings/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
johnomotani committed Apr 30, 2024
1 parent bcfd62a commit e6379a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions machines/shared/add_dependencies_to_project.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ elseif Sys.isapple()
MPIPreferences.use_system_binary()
catch
println("Failed to auto-detect path of MPI library...")

local mpi_library_path

default_mpi_library_path = get(mk_preferences, "mpi_library_path", "")
mpi_library_path = get_input_with_path_completion(
"\nEnter the full path to your MPI library (e.g. something like "
Expand All @@ -111,6 +114,8 @@ elseif Sys.isapple()

MPIPreferences.use_system_binary(library_names=mpi_library_path)

global mk_preferences, local_preferences

# Just got the value for the setting, now write it to LocalPreferences.toml
mk_preferences["mpi_library_path"] = mpi_library_path
open(local_preferences_filename, "w") do io
Expand Down

0 comments on commit e6379a2

Please sign in to comment.