Skip to content
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
3 changes: 3 additions & 0 deletions src/run.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
meteo_adjusted = meteo

if DataFormat(meteo_adjusted) == TableAlike()
if get_nsteps(meteo) == 1
return Tables.rows(meteo_adjusted)[1]
end
return Tables.rows(meteo_adjusted)
end

Expand Down Expand Up @@ -207,7 +210,7 @@
is_ts_parallel = which_timestep_parallelizable(dep_graph)
mods_not_parallel = join([i.second.first for i in is_ts_parallel[findall(x -> x.second.second == false, is_ts_parallel)]], "; ")

check && @warn string(

Check warning on line 213 in src/run.jl

View workflow job for this annotation

GitHub Actions / Documentation

A parallel executor was provided (`executor=ThreadedEx()`) but some models cannot be run in parallel: PlantSimEngine.Examples.ToyRUEGrowthModel{Float64}(0.2). The simulation will be run sequentially. Use `executor=SequentialEx()` to remove this warning. maxlog = 1

Check warning on line 213 in src/run.jl

View workflow job for this annotation

GitHub Actions / Documentation

A parallel executor was provided (`executor=ThreadedEx()`) but some models cannot be run in parallel: PlantSimEngine.Examples.ToyAssimGrowthModel{Float64}(0.2, 0.5, 1.2). The simulation will be run sequentially. Use `executor=SequentialEx()` to remove this warning. maxlog = 1

Check warning on line 213 in src/run.jl

View workflow job for this annotation

GitHub Actions / Documentation

A parallel executor was provided (`executor=ThreadedEx()`) but some models cannot be run in parallel: PlantSimEngine.Examples.ToyRUEGrowthModel{Float64}(0.2). The simulation will be run sequentially. Use `executor=SequentialEx()` to remove this warning. maxlog = 1
"A parallel executor was provided (`executor=$(executor)`) but some models cannot be run in parallel: $mods_not_parallel. ",
"The simulation will be run sequentially. Use `executor=SequentialEx()` to remove this warning."
) maxlog = 1
Expand Down
11 changes: 8 additions & 3 deletions test/helper-functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,13 @@ period = [Dates.Date("2021-01-01"), Dates.Date("2021-12-31")]
meteo = get_weather(43.649777, 3.869889, period, sink = DataFrame)=#

function get_simple_meteo_bank()

df = CSV.read(joinpath(pkgdir(PlantSimEngine), "examples/meteo_day.csv"), DataFrame, header=18)


meteos=
[#=nothing,=# Atmosphere(T=20.0, Wind=1.0, P=101.3, Rh=0.65, Ri_PAR_f=300.0),
Weather([Atmosphere(T=20.0, Wind=1.0, P=101.3, Rh=0.65)]),
Weather(
[
Atmosphere(T=20.0, Wind=1.0, Rh=0.65, Ri_PAR_f=300.0),
Expand All @@ -107,9 +112,9 @@ function get_simple_meteo_bank()
Atmosphere(T=20.0, Wind=1.0, Rh=0.6, Ri_PAR_f=200.0),
Atmosphere(T=25.0, Wind=1.0, Rh=0.6, Ri_PAR_f=200.0),
Atmosphere(T=10.0, Wind=0.5, Rh=0.6, Ri_PAR_f=200.0)]),

CSV.read(joinpath(pkgdir(PlantSimEngine), "examples/meteo_day.csv"), DataFrame, header=18),

df,
df[1,:],
DataFrame(df[1,:]),
]
return meteos
end
Expand Down
Loading