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

rm modular/ #541

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 49 additions & 49 deletions .buildkite/longruns/pipeline.yml

Large diffs are not rendered by default.

126 changes: 63 additions & 63 deletions .buildkite/pipeline.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .dev/up_deps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dirs = (
joinpath(root, ".dev"),
joinpath(root, "perf"),
joinpath(root, "docs"),
joinpath(root, "experiments/AMIP/modular"),
joinpath(root, "experiments/AMIP"),
)

cd(root) do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
run_name: "coarse_single_modular_ft32"
run_name: "coarse_single_ft32"
moist: "equil"
vert_diff: "true"
rad: "gray"
Expand All @@ -15,4 +15,4 @@ dt_save_restart: "10days"
precip_model: "0M"
apply_limiter: false
FLOAT_TYPE: "Float32"
job_id: "coarse_single_modular_ft32"
job_id: "coarse_single_ft32"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
run_name: "coarse_single_modular_ft64"
run_name: "coarse_single_ft64"
moist: "equil"
vert_diff: "true"
rad: "gray"
Expand All @@ -14,5 +14,4 @@ h_elem: 6
dt_save_restart: "10days"
precip_model: "0M"
apply_limiter: false
job_id: "coarse_single_modular_ft64"

job_id: "coarse_single_ft64"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
run_name: "coarse_single_modular_ft64_hourly_checkpoints"
run_name: "coarse_single_ft64_hourly_checkpoints"
hourly_checkpoint: true
moist: "equil"
vert_diff: "true"
Expand All @@ -15,4 +15,4 @@ h_elem: 6
dt_save_restart: "10days"
precip_model: "0M"
apply_limiter: false
job_id: "coarse_single_modular_ft64_hourly_checkpoints"
job_id: "coarse_single_ft64_hourly_checkpoints"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
run_name: "coarse_single_modular_ft64_hourly_checkpoints_co2"
run_name: "coarse_single_ft64_hourly_checkpoints_co2"
hourly_checkpoint: true
moist: "equil"
vert_diff: "true"
Expand All @@ -15,4 +15,4 @@ h_elem: 6
dt_save_restart: "10days"
precip_model: "0M"
apply_limiter: false
job_id: "coarse_single_modular_ft64_hourly_checkpoints_co2"
job_id: "coarse_single_ft64_hourly_checkpoints_co2"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
run_name: "default_modular_unthreaded"
run_name: "default_unthreaded"
moist: "equil"
vert_diff: "true"
rad: "gray"
Expand All @@ -13,4 +13,4 @@ h_elem: 4
precip_model: "0M"
anim: true
apply_limiter: false
job_id: "default_modular_unthreaded"
job_id: "default_unthreaded"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
run_name: "perf_coarse_single_modular_ft64"
run_name: "perf_coarse_single_ft64"
moist: "equil"
vert_diff: "true"
rad: "gray"
Expand All @@ -14,4 +14,4 @@ h_elem: 6
dt_save_restart: "10days"
precip_model: "0M"
apply_limiter: true
job_id: "perf_coarse_single_modular_ft64"
job_id: "perf_coarse_single_ft64"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
run_name: "perf_default_modular_unthreaded"
run_name: "perf_default_unthreaded"
moist: "equil"
vert_diff: "true"
rad: "gray"
Expand All @@ -13,4 +13,4 @@ h_elem: 4
precip_model: "0M"
anim: true
apply_limiter: true
job_id: "perf_default_modular_unthreaded"
job_id: "perf_default_unthreaded"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
run_name: "perf_diff_coarse_single_modular_ft64"
run_name: "perf_diff_coarse_single_ft64"
moist: "equil"
vert_diff: "true"
rad: "gray"
Expand All @@ -14,4 +14,4 @@ h_elem: 6
dt_save_restart: "10days"
precip_model: "0M"
apply_limiter: true
job_id: "perf_diff_coarse_single_modular_ft64"
job_id: "perf_diff_coarse_single_ft64"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
run_name: "perf_diff_default_modular_unthreaded"
run_name: "perf_diff_default_unthreaded"
moist: "equil"
vert_diff: "true"
rad: "gray"
Expand All @@ -13,4 +13,4 @@ h_elem: 4
precip_model: "0M"
anim: true
apply_limiter: true
job_id: "perf_diff_default_modular_unthreaded"
job_id: "perf_diff_default_unthreaded"
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const OUTPUT_DIR = joinpath(@__DIR__, "src/generated")

# sea breeze tutorial
TUTORIAL_DIR_SB = joinpath(EXPERIMENTS_DIR, "ClimaCore/sea_breeze/")
TUTORIAL_DIR_AMIP = joinpath(EXPERIMENTS_DIR, "AMIP/modular/")
TUTORIAL_DIR_AMIP = joinpath(EXPERIMENTS_DIR, "AMIP/")

# Pkg.activate(TUTORIAL_DIR)
# Pkg.instantiate()
Expand All @@ -19,7 +19,7 @@ TUTORIAL_DIR_AMIP = joinpath(EXPERIMENTS_DIR, "AMIP/modular/")

# execute Literate on all julia files
tutorial_files_sb = filter(x -> last(x, 3) == ".jl", readdir(TUTORIAL_DIR_SB))
tutorial_files_amip = filter(x -> last(x, 17) == "driver_modular.jl", readdir(TUTORIAL_DIR_AMIP))
tutorial_files_amip = filter(x -> last(x, 9) == "driver.jl", readdir(TUTORIAL_DIR_AMIP))

# Literate generates markdown files and stores them in docs/src/generated/sea_breeze
map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ version = "0.3.11"

[[deps.ClimaCoupler]]
deps = ["CLIMAParameters", "ClimaAtmos", "ClimaComms", "ClimaCore", "ClimaCoreTempestRemap", "ClimaLSM", "Dates", "DocStringExtensions", "Insolation", "JLD2", "NCDatasets", "Plots", "SciMLBase", "StaticArrays", "Statistics", "SurfaceFluxes", "TempestRemap_jll", "Thermodynamics"]
path = "../../.."
path = "../.."
uuid = "4ade58fe-a8da-486c-bd89-46df092ec0c7"
version = "0.1.0"

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ evolving_ocean = config_dict["evolving_ocean"]
if isinteractive()
COUPLER_OUTPUT_DIR = joinpath("output", joinpath(mode_name, run_name)) # TempestRemap fails if interactive and paths are too long
else
COUPLER_OUTPUT_DIR = joinpath(pkg_dir, "experiments/AMIP/modular/output", joinpath(mode_name, run_name))
COUPLER_OUTPUT_DIR = joinpath(pkg_dir, "experiments/AMIP/output", joinpath(mode_name, run_name))
end
mkpath(COUPLER_OUTPUT_DIR)

Expand Down
10 changes: 5 additions & 5 deletions perf/flame.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ using YAML

cc_dir = joinpath(dirname(@__DIR__));
config_dir = joinpath(cc_dir, "config", "model_configs");
include(joinpath(cc_dir, "experiments", "AMIP", "modular", "cli_options.jl"));
include(joinpath(cc_dir, "experiments", "AMIP", "cli_options.jl"));

# assuming a common driver for all tested runs
filename = joinpath(cc_dir, "experiments", "AMIP", "modular", "coupler_driver_modular.jl")
filename = joinpath(cc_dir, "experiments", "AMIP", "coupler_driver.jl")

# currently tested jobs and their allowed allocation limits
allocs_limit = Dict()
allocs_limit["perf_default_modular_unthreaded"] = 8638304
allocs_limit["perf_coarse_single_modular_ft64"] = 18280800
allocs_limit["perf_default_unthreaded"] = 8638304
allocs_limit["perf_coarse_single_ft64"] = 18280800
allocs_limit["perf_target_amip_n32_shortrun"] = 172134848

# number of time steps used for profiling
Expand All @@ -30,7 +30,7 @@ global parsed_args = parse_commandline(argparse_settings())
# select the configuration file and extract the run-name
config_file =
parsed_args["config_file"] =
isinteractive() ? "../config/perf_configs/perf_default_modular_unthreaded.yml" : parsed_args["config_file"]
isinteractive() ? "../config/perf_configs/perf_default_unthreaded.yml" : parsed_args["config_file"]
run_name = parsed_args["run_name"] = split(basename(config_file), ".")[1]

# import config setup
Expand Down
6 changes: 3 additions & 3 deletions perf/flame_diff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ cwd = pwd()

cc_dir = joinpath(dirname(@__DIR__));
config_dir = joinpath(cc_dir, "config", "model_configs");
include(joinpath(cc_dir, "experiments", "AMIP", "modular", "cli_options.jl"));
include(joinpath(cc_dir, "experiments", "AMIP", "cli_options.jl"));

# assuming a common driver for all tested runs
filename = joinpath(cc_dir, "experiments", "AMIP", "modular", "coupler_driver_modular.jl")
filename = joinpath(cc_dir, "experiments", "AMIP", "coupler_driver.jl")

# number of time steps used for profiling
n_samples = 2
Expand All @@ -45,7 +45,7 @@ parsed_args = parse_commandline(argparse_settings())
# select the configuration file and extract the run-name
config_file =
parsed_args["config_file"] =
isinteractive() ? "../config/perf_configs/perf_default_modular_unthreaded.yml" : parsed_args["config_file"]
isinteractive() ? "../config/perf_configs/perf_default_unthreaded.yml" : parsed_args["config_file"]
run_name = parsed_args["run_name"] = split(basename(config_file), ".")[1]

# import config setup
Expand Down
4 changes: 2 additions & 2 deletions test/component_model_tests/bucket_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import ClimaCoupler
using ClimaCoupler.TestHelper: create_space
using ClimaCore: Fields, Spaces

include(pkgdir(ClimaCoupler, "experiments/AMIP/modular/components/land/bucket_init.jl"))
include(pkgdir(ClimaCoupler, "experiments/AMIP/modular/components/land/bucket_utils.jl"))
include(pkgdir(ClimaCoupler, "experiments/AMIP/components/land/bucket_init.jl"))
include(pkgdir(ClimaCoupler, "experiments/AMIP/components/land/bucket_utils.jl"))

for FT in (Float32, Float64)
@testset "dss_state! BucketSimulation for FT=$FT" begin
Expand Down
2 changes: 1 addition & 1 deletion test/component_model_tests/climaatmos_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using ClimaCoupler.Interfacer: AtmosModelSimulation
using ClimaCoupler.TestHelper: create_space
using ClimaCore: Fields, Spaces

include(pkgdir(ClimaCoupler, "experiments/AMIP/modular/components/atmosphere/climaatmos_init.jl"))
include(pkgdir(ClimaCoupler, "experiments/AMIP/components/atmosphere/climaatmos_init.jl"))

for FT in (Float32, Float64)
@testset "dss_state! ClimaAtmosSimulation for FT=$FT" begin
Expand Down
4 changes: 2 additions & 2 deletions test/component_model_tests/eisenman_seaice_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import CLIMAParameters as CP
import Thermodynamics as TD
import Thermodynamics.Parameters as TP

include("../../experiments/AMIP/modular/components/ocean/eisenman_seaice_init.jl")
include("../../experiments/AMIP/components/ocean/eisenman_seaice_init.jl")


for FT in (Float32, Float64)
Expand Down Expand Up @@ -322,7 +322,7 @@ for FT in (Float32, Float64)
@test all(parent(Y.h_ice) .< parent(h_ice_0))
end

include("../../experiments/AMIP/modular/components/slab_utils.jl")
include("../../experiments/AMIP/components/slab_utils.jl")
@testset "step! update + total energy calculation for FT=$FT" begin
Δt = Float64(1000)

Expand Down
2 changes: 1 addition & 1 deletion test/component_model_tests/prescr_seaice_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using ClimaCore: Fields, Spaces
import CLIMAParameters as CP
import Thermodynamics.Parameters as TDP

include(pkgdir(ClimaCoupler, "experiments/AMIP/modular/components/ocean/prescr_seaice_init.jl"))
include(pkgdir(ClimaCoupler, "experiments/AMIP/components/ocean/prescr_seaice_init.jl"))

for FT in (Float32, Float64)
@testset "test sea-ice energy slab for FT=$FT" begin
Expand Down
2 changes: 1 addition & 1 deletion test/component_model_tests/slab_ocean_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using ClimaCore: Fields, Spaces
import CLIMAParameters as CP
import Thermodynamics.Parameters as TDP

include(pkgdir(ClimaCoupler, "experiments/AMIP/modular/components/ocean/slab_ocean_init.jl"))
include(pkgdir(ClimaCoupler, "experiments/AMIP/components/ocean/slab_ocean_init.jl"))

for FT in (Float32, Float64)
@testset "dss_state! SlabOceanSimulation for FT=$FT" begin
Expand Down
2 changes: 1 addition & 1 deletion test/debug/debug_amip_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct BucketSimulation{C} <: SurfaceModelSimulation
end
name(sim::BucketSimulation) = "BucketSimulation"

include("../../experiments/AMIP/modular/user_io/debug_plots.jl")
include("../../experiments/AMIP/user_io/debug_plots.jl")

get_field(sim::BucketSimulation, ::Val{:surface_field}) = sim.cache.surface_field
get_field(sim::SurfaceStub, ::Val{:stub_field}) = sim.cache.stub_field
Expand Down
12 changes: 6 additions & 6 deletions test/mpi_tests/local_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export CLIMACORE_DISTRIBUTED="MPI"
export JULIA_HDF5_PATH=""

export RUN_NAME=amip_restart_mpi_test
export RESTART_DIR=experiments/AMIP/modular/output/amip/${RUN_NAME}_artifacts/
export RESTART_DIR=experiments/AMIP/output/amip/${RUN_NAME}_artifacts/
export RESTART_T=200

julia -e 'using Pkg; Pkg.add("MPIPreferences"); using MPIPreferences; use_system_binary()'
Expand All @@ -23,9 +23,9 @@ julia --project -e 'using Pkg; Pkg.build("MPI")'
julia --project -e 'using Pkg; Pkg.build("HDF5")'
julia --project -e 'using Pkg; Pkg.API.precompile()'

julia --project=experiments/AMIP/modular/ -e 'using Pkg; Pkg.instantiate(;verbose=true)'
julia --project=experiments/AMIP/modular/ -e 'using Pkg; Pkg.precompile()'
julia --project=experiments/AMIP/modular/ -e 'using Pkg; Pkg.status()'
julia --project=experiments/AMIP/ -e 'using Pkg; Pkg.instantiate(;verbose=true)'
julia --project=experiments/AMIP/ -e 'using Pkg; Pkg.precompile()'
julia --project=experiments/AMIP/ -e 'using Pkg; Pkg.status()'

julia --project=artifacts -e 'using Pkg; Pkg.instantiate(;verbose=true)'
julia --project=artifacts -e 'using Pkg; Pkg.precompile()'
Expand All @@ -34,8 +34,8 @@ julia --project=artifacts artifacts/download_artifacts.jl

# run spin up
# - specify `--hourly_checkpoint true` to save monthly checkpoints of all model prognostic states
mpiexec julia --color=yes --project=experiments/AMIP/modular/ experiments/AMIP/modular/coupler_driver_modular.jl --run_name $RUN_NAME --coupled true --start_date 19790101 --hourly_checkpoint true --anim true --surface_setup PrescribedSurface --dt_cpl 200 --energy_check false --mode_name amip --mono_surface false --vert_diff true --moist equil --rad clearsky --precip_model 0M --z_elem 35 --dz_bottom 50 --h_elem 12 --kappa_4 3e16 --rayleigh_sponge true --alpha_rayleigh_uh 0 --dt 200secs --t_end 0.1days --job_id $RUN_NAME --dt_save_to_sol 1000days --dt_save_to_disk 10days --apply_limiter false --FLOAT_TYPE Float64
mpiexec julia --color=yes --project=experiments/AMIP/ experiments/AMIP/coupler_driver.jl --run_name $RUN_NAME --coupled true --start_date 19790101 --hourly_checkpoint true --anim true --surface_setup PrescribedSurface --dt_cpl 200 --energy_check false --mode_name amip --mono_surface false --vert_diff true --moist equil --rad clearsky --precip_model 0M --z_elem 35 --dz_bottom 50 --h_elem 12 --kappa_4 3e16 --rayleigh_sponge true --alpha_rayleigh_uh 0 --dt 200secs --t_end 0.1days --job_id $RUN_NAME --dt_save_to_sol 1000days --dt_save_to_disk 10days --apply_limiter false --FLOAT_TYPE Float64

# init using a restart
# - specify the directory of the `checkpoint/` folder (i.e., `--restart_dir`) and time (in secs; `--restart_t`) of the restart file
mpiexec julia --color=yes --project=experiments/AMIP/modular/ experiments/AMIP/modular/coupler_driver_modular.jl --run_name $RUN_NAME --coupled true --restart_dir $RESTART_DIR --restart_t $RESTART_T --start_date 19790102 --anim true --surface_setup PrescribedSurface --dt_cpl 200 --energy_check false --mode_name amip --mono_surface false --vert_diff true --moist equil --rad clearsky --precip_model 0M --z_elem 35 --dz_bottom 50 --h_elem 12 --kappa_4 3e16 --rayleigh_sponge true --alpha_rayleigh_uh 0 --dt 200secs --t_end 0.1days --job_id $RUN_NAME --dt_save_to_sol 1000days --dt_save_to_disk 10days --apply_limiter false --FLOAT_TYPE Float64
mpiexec julia --color=yes --project=experiments/AMIP/ experiments/AMIP/coupler_driver.jl --run_name $RUN_NAME --coupled true --restart_dir $RESTART_DIR --restart_t $RESTART_T --start_date 19790102 --anim true --surface_setup PrescribedSurface --dt_cpl 200 --energy_check false --mode_name amip --mono_surface false --vert_diff true --moist equil --rad clearsky --precip_model 0M --z_elem 35 --dz_bottom 50 --h_elem 12 --kappa_4 3e16 --rayleigh_sponge true --alpha_rayleigh_uh 0 --dt 200secs --t_end 0.1days --job_id $RUN_NAME --dt_save_to_sol 1000days --dt_save_to_disk 10days --apply_limiter false --FLOAT_TYPE Float64
Loading