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

ERROR: LoadError: ArgumentError: Package Wflow does not have Distributed #251

Closed
BastianT22 opened this issue Apr 3, 2023 · 3 comments
Closed

Comments

@BastianT22
Copy link

image
When I was trying to use Distributed package to accelerate wflow model, this error has occured. I have tried Pkg.instantiate() and Pkg.resolve(), but it still doesn't work. How can I fix this problem or try another way to accelerate wflow? Thank you!

@verseve
Copy link
Member

verseve commented Apr 3, 2023

Wflow supports the use of multiple threads, see also;
https://deltares.github.io/Wflow.jl/dev/model_docs/lateral/kinwave/#Multi-Threading
https://docs.julialang.org/en/v1/manual/multi-threading/#Starting-Julia-with-multiple-threads

Distributed is a dependency of the Graphs package, so it should be available. Is Distributed part of the Manifest.toml file?
You could try to run Pkg.update() to check if this resolves the issue.

Note that we do not make use of Distributed in Wflow directly (it is not an explicit dependency).

@BastianT22
Copy link
Author

Since calibration of model parameters requires hundreds of simulations, the speed of the model is critical. I am using the wflow_hbv model. After setting nthreads=10, the speed and cpu usage of the model is not significantly improved. So I try to modify the update function in the surface_routing function to parallelize the operation to improve the speed. But I got an error when using the distributed package. I can find distributed in the Manifest.toml file, but not in the Graphs package, and I still can't use distributed after trying Pkg.update().

@verseve
Copy link
Member

verseve commented Apr 6, 2023

If you want to use Distibuted as part of your Wflow environment, you have to add this package:

julia> import Pkg
julia> Pkg.add("Distributed")

and then also add it to the Wflow.jl file (using Distributed).

@verseve verseve closed this as completed May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants