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

Low computing efficiency #32

Open
kongdd opened this issue Jun 7, 2022 · 4 comments
Open

Low computing efficiency #32

kongdd opened this issue Jun 7, 2022 · 4 comments

Comments

@kongdd
Copy link

kongdd commented Jun 7, 2022

In R, Xinanjiang model calibration only cost about 40s.
But in MARRMoT, the calibration is quite low efficiency. With the same forings, half hour passed, still no output.

Just wondering which part delays the computing efficiency? ODE or optimization function? Any idea?

@kongdd
Copy link
Author

kongdd commented Jun 8, 2022

Why not write MARRMot in Julia? It should be many times faster.

@ltrotter
Copy link
Collaborator

ltrotter commented Aug 1, 2022

Currently we are not looking to redevelop MARRMoT in a new language. We are aware that it is not the most computationally efficient tool and we refer to the discussion section (Sect. 5.3.2) in Knoben et al. (2019) for a brief discussion on this.

I will leave this issue open, in case someone decides to pick-up the challenge of further speeding up MARRMoT by translating this in a different language. Thanks for the suggestion.

Reference:
Knoben, W.J.M., Freer, J.E., Fowler, K.J.A., Peel, M.C., Woods, R.A., 2019. Modular Assessment of Rainfall-Runoff Models Toolbox (MARRMoT) v1.2: an open-source, extendable framework providing implementations of 46 conceptual hydrologic models as continuous state-space formulations. Geoscientific Model Development 12, 2463–2480. https://doi.org/10.5194/gmd-12-2463-2019

@kongdd
Copy link
Author

kongdd commented Aug 1, 2022

Dear @ltrotter ,

Thanks for your response. I have finished translating Xinanjiang model to Julia.

The Julia version costs 4-5s in the calibration mode, (in comparison 40s in Rcpp, 30 mins in MATLAB). The carefully designed Julia MARRMoT is about 8 times faster than the cpp (i.e., 5s vs. 40s), and 300 times faster than MATLAB MARRMoT.
https://mp.weixin.qq.com/s/Ah8mjXBUhtpIZbvxicnDFA

In the Julia version, all module are same as the MATLAB MARRMoT, except for ODE.
I closed the ODE, as ODE is the speed killer. When closed ODE, MARRMoT may be 30 times faster, meanwhile the KGE only decrease a bit (about 0.05).

Regards
Dongdong

References

  1. Rcpp Xinanjiang, https://github.com/rpkgs/VIC5/blob/master/src/XAJ.cpp, https://github.com/CUG-hydro/hydroTools/blob/master/R/calib_XAJ.R#L55

@kongdd
Copy link
Author

kongdd commented Aug 1, 2022

@ltrotter What do you think the strategy of cloing ODE in every simulation step's water balance solving?

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