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

Wflow_sbm run fails with local inertial routing (virtual machine) #360

Closed
2 tasks done
verseve opened this issue Feb 14, 2024 · 1 comment · Fixed by #390
Closed
2 tasks done

Wflow_sbm run fails with local inertial routing (virtual machine) #360

verseve opened this issue Feb 14, 2024 · 1 comment · Fixed by #390
Assignees
Labels
bug Something isn't working
Milestone

Comments

@verseve
Copy link
Contributor

verseve commented Feb 14, 2024

Wflow version checks

  • I have checked that this issue has not already been reported.

  • I have checked that this bug exists on the latest version of Wflow.

Reproducible Example

Run a wflow_sbm model with local inertial routing on a virtual machine.

Current behaviour

The following error is thrown:

┌ Error: Wflow simulation failed
│ exception =
│ TaskFailedException

│ nested task error: InexactError: Int64(NaN)
│ Stacktrace:
│ [1] Int64
│ @ .\float.jl:788 [inlined]
│ [2] unsatzone_flow_layer(usd::Float64, kv_z::Float64, l_sat::Float64, c::Float64)

and we have seen this before when NaN values occur (for example because of missing values).

Desired behaviour

The wflow_sbm runs only fail on a virtual machine. It seems related to the use of LoopVectorization (with Wflow v0.6.3 wflow_sbm runs fine).

Additional Context

No response

@verseve verseve added the bug Something isn't working label Feb 14, 2024
@verseve verseve self-assigned this Feb 14, 2024
@verseve
Copy link
Contributor Author

verseve commented Feb 28, 2024

The internal time step of the local inertial model (stable_timestep(sw::ShallowWaterRiver{T}) and stable_timestep(sw::ShallowWaterLand{T})) can get zero when LoopVectorization is applied (@tturbo) to the for loop of these functions. When reservoirs or lakes are included (division by internal time step of zero), the model run fails. The local inertial solution itself does not fail with a zero time step, but results for overland flow (river flow keeps q) are affected.

This issue occurs on a virtual machine, Windows 10 Enterprise, with Intel(R) Xeon(R) Gold 6144 CPU (2 processors), Julia v1.9.4, running with 4 threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant