Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coll_krook heat flux closure, updated PI_controller for density, and added PI_controller for temperature #283

Closed
wants to merge 6 commits into from
Closed
5 changes: 5 additions & 0 deletions docs/src/post_processing_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ julia> makie_post_process("runs/example-run1/", "runs/example-run2/", "runs/exam
What this function does is controlled by the settings in an input file, by
default `post_processing_input.toml`.

!!! note "Example input file"
You can generate an example input file, with all the options shown (with
their default values) but commented out, by running
`makie_post_processing.generate_example_input_file()`.

To run from the command line
```julia
julia --project run_makie_post_processing.jl dir1 [dir2 [dir3 ...]]
Expand Down
26 changes: 16 additions & 10 deletions machines/shared/add_dependencies_to_project.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,31 +151,38 @@ end

println("\n** Setting up to use system HDF5\n")

function get_hdf5_lib_names(dirname)
if Sys.isapple()
libhdf5_name = joinpath(dirname, "libhdf5.dylib")
libhdf5_hl_name = joinpath(dirname, "libhdf5_hl.dylib")
else
libhdf5_name = joinpath(dirname, "libhdf5.so")
libhdf5_hl_name = joinpath(dirname, "libhdf5_hl.so")
end
return libhdf5_name, libhdf5_hl_name
end

if machine_settings["hdf5_library_setting"] == "system"
hdf5_dir = joinpath(ENV["HDF5_DIR"], "lib") # system hdf5
using HDF5
HDF5.API.set_libraries!(joinpath(hdf5_dir, "libhdf5.so"),
joinpath(hdf5_dir, "libhdf5_hl.so"))
HDF5.API.set_libraries!(get_hdf5_lib_names(hdf5_dir)...)
elseif machine_settings["hdf5_library_setting"] == "download"
artifact_dir = joinpath(repo_dir, "machines", "artifacts")
hdf5_dir = joinpath(artifact_dir, "hdf5-build", "lib")
using HDF5
HDF5.API.set_libraries!(joinpath(hdf5_dir, "libhdf5.so"),
joinpath(hdf5_dir, "libhdf5_hl.so"))
HDF5.API.set_libraries!(get_hdf5_lib_names(hdf5_dir)...)
elseif machine_settings["hdf5_library_setting"] == "prompt"
# Prompt user to select what HDF5 to use
if mk_preferences["build_hdf5"] == "y"
local_hdf5_install_dir = joinpath("machines", "artifacts", "hdf5-build", "lib")
local_hdf5_install_dir = realpath(local_hdf5_install_dir)
# We have downloaded and compiled HDF5, so link that
hdf5_dir = local_hdf5_install_dir
hdf5_lib = joinpath(local_hdf5_install_dir, "libhdf5.so")
hdf5_lib_hl = joinpath(local_hdf5_install_dir, "libhdf5_hl.so")
hdf5_lib, hdf5_lib_hl = get_hdf5_lib_names(hdf5_dir)
elseif !prompt_for_lib_paths
hdf5_dir = mk_preferences["hdf5_dir"]
if hdf5_dir != "default"
hdf5_lib = joinpath(hdf5_dir, "libhdf5.so")
hdf5_lib_hl = joinpath(hdf5_dir, "libhdf5_hl.so")
hdf5_lib, hdf5_lib_hl = get_hdf5_lib_names(hdf5_dir)
end
else
println("\n** Setting up to use system HDF5\n")
Expand Down Expand Up @@ -206,8 +213,7 @@ elseif machine_settings["hdf5_library_setting"] == "prompt"
if isdir(hdf5_dir)
hdf5_dir = realpath(hdf5_dir)
end
hdf5_lib = joinpath(hdf5_dir, "libhdf5.so")
hdf5_lib_hl = joinpath(hdf5_dir, "libhdf5_hl.so")
hdf5_lib, hdf5_lib_hl = get_hdf5_lib_names(hdf5_dir)
if isfile(hdf5_lib) && isfile(hdf5_lib_hl)
break
else
Expand Down
2 changes: 1 addition & 1 deletion machines/shared/machine_setup_stage_two.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ batch_system = mk_preferences["batch_system"]
if mk_preferences["use_plots"] == "y"
python_venv_path = joinpath(repo_dir, "machines", "artifacts", "mk_venv")
activate_path = joinpath(python_venv_path, "bin", "activate")
run(`bash -c "python -m venv --system-site-packages $python_venv_path; source $activate_path; PYTHONNOUSERSITE=1 pip install matplotlib"`)
run(`bash -c "/usr/bin/env python3 -m venv --system-site-packages $python_venv_path; source $activate_path; PYTHONNOUSERSITE=1 pip install matplotlib"`)
if batch_system
open("julia.env", "a") do io
println(io, "source $activate_path")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ function _setup_single_input!(this_input_dict::OrderedDict{String,Any},
include_patterns=String[],
exclude_patterns=String[],
ranks=mk_int[],
figsize=(600,800)
figsize=[600,800]
)

# We allow top-level options in the post-processing input file
Expand Down Expand Up @@ -8492,7 +8492,7 @@ function timing_data(run_info::Tuple; plot_prefix=nothing, threshold=nothing,

if figsize === nothing
if input !== nothing
figsize = input.figsize
figsize = Tuple(input.figsize)
else
figsize = (600,800)
end
Expand Down Expand Up @@ -8602,7 +8602,7 @@ function timing_data(run_info; plot_prefix=nothing, threshold=nothing,

if figsize === nothing
if input !== nothing
figsize = input.figsize
figsize = Tuple(input.figsize)
else
figsize = (600,800)
end
Expand Down
Loading