-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fix HybridJumps and Jumps dependencies #714
Conversation
Downgrading the OrdinaryDiffEq version isn’t a reasonable fix here. Do we know why both these benchmarks fail on it? We need to fix the failures on the latest versions. |
Regenerating the jump manifest on 1.9.2 is a good idea though — I hadn’t caught I created it on 1.10… good catch on that one |
Fortunately, the Hawkes benchmark was only failing because of the mismatched Manifest. Otherwise, it completes successfully. So we can cross this out. I dug a bit more on the Synapse. It turns out that the upgrade of OrdinaryDiffEq is fine. The problem is the upgrade on IntervalSets. So, I just added IntervalSets from the REPL as pkg> add IntervalSets@0.73 The moment I tried to add it to ┌ Warning: dt(9.505401976639405e-8) <= dtmin(1.1920928955078125e-7) at t=4268.536639826692, and step error estimate = 0.4435074
450063937. Aborting. There is either an error in your model specification or the true solution is unstable.
└ @ SciMLBase ~/.julia/packages/SciMLBase/l4PVV/src/integrator_interface.jl:599 I don't really know what's going on. The version of the |
Did you regenerate the manifest after adding [email protected] to the Project.toml too? |
Yes, I think I did. At least, I typed |
However, the Manifest resolution changes when you add the version constraint of |
Can you check in the HybridJump Project.toml you are generating with the compat bound? Have you made sure you are forcing it to actually use that version in the project, you need a https://pkgdocs.julialang.org/v1/compatibility/#Tilde-specifiers otherwise it will still install the latest version < 1.0 as compatible (at least on CI). |
Ok, I managed to pin the Upgrading
It is a good idea to port the Synapse benchmark to be self-contained. I just don't have the time right now to do that. |
The broader issue here is some dependency is holding back using the latest versions of IntervalSets and DomainSets, as I have verified one can install both of them together with no issue. |
Ideally we would get that dependency to update their Project.toml so the latest versions can be used, which would hopefully fix the issues. @gzagatti just to confirm, the current code in the PR should now work with the pinned package version? |
Yes, the current code works with the pinned package version as you can see from the BuildKite artifacts. I just did a quick check based on your remark. IntervalSets is a dependency of Catalyst.
The Synapse source code pins Catalyst to versions I could try to upgrade |
Yes, using such an old Catalyst is likely the issue. It would hold back MTK and Symbolics, which would then likely hold back the offending packages. |
Symbolics or ModelingToolkit. |
I played with the dependencies in the Synapse package but I couldn't get it to compile with the latest Catalyst. If you're not in a hurry, I can try on my spare time to do port the complete synapse benchmark over here, but it might take a while. |
I found some time to add a self-contained version of the Synapse benchmark. The file is quite long. For readability we could potentially add collapsible sections. I haven't done that because I don't know if that is supported and desirable. I have noticed that memory usage for both Please let me know where we might need additional explanations, or the code could be simplified. I'm looking forward to your feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is your code copied out of the Synapse repo? Make sure you are giving attribution for that code (it is MIT, but should still get attribution).
Yes, I've copied from my branch of the Synapse repo which has a mix of the original code and some modifications that I've made to allow for the use of I've added at the top of the file the following:
But please advise me if there is a better way to attribute the authorship. |
I would add a comment there that much of this code is adapted from the originally Synapse elife code by (Name et al.), which is available at [link]. Regarding memory use; I haven't looked through everything carefully, but could it be from global variable use? That can cause type instabilities and memory issues in Julia. |
I mean add a comment and link in the first paragraph. |
Yes, const the globals. There's type instabilities here. |
Attributions have been added. I've added const to the globals. But It looks like memory used remains high. I hope you can help me find other sources of memory leakage. |
I have fixed the memory leak using It turns out there was a missing function which is never called by the simulation (so it didn't raise errors) but it caused the leak because every the problem was re-created Julia allocated space for an anonymous function. Now, the benchmark is fully ported to SciMLBenchmarks. |
@ChrisRackauckas is this ok with you to merge? I believe @gzagatti feels it is finished. |
All benchmarks completed successfully and all the assets look correct. It's good to merge on my side. |
This PR attempts to resolve issue #692 in which both the
Synapse.jmd
andMultivariateHawkes.jmd
benchmarks fail to successfully complete after their manifest files were upgraded.