-
Notifications
You must be signed in to change notification settings - Fork 8
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
Rebased splice potential #127
base: master
Are you sure you want to change the base?
Rebased splice potential #127
Conversation
This is particularly useful as the potential splicing takes ages to converge.
Restart functionality commented out, needs work.
the default criteria for splicing.
fourier parallel seeding by default. Fixed bug in minres file causing splicing to always be 24 hrs.
I will now always check if the code compiles before pushing, sorry.
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.
Thanks, this looks great. I've added some very cosmetic comments, but if you could run over these that'd be much appreciated.
Also, could you add a test potential splicing scenario, so that we catch any later regression? e.g. you could make a copy of and adapt this test: https://github.com/pynbody/genetIC/tree/master/genetIC/tests/test_24_splicing
Thanks, changes look good - are you OK to add a test as described above? |
Absolutely! I will work on this sometime in the next few days.
…On Mon, Sep 30, 2024 at 20:14 Andrew Pontzen ***@***.***> wrote:
Thanks, changes look good - are you OK to add a test as described above?
—
Reply to this email directly, view it on GitHub
<#127 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUELSFNWVJCJZKQUSWNBEEDZZGIHHAVCNFSM6AAAAABPDH634OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBTHA3DKMRQHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
…ES is undeterministic on multiple threads)
Shouldn't the result be deterministic to within a certain numerical tolerance? If so, I think we should adjust the tolerance rather than force it to run on a single thread (which is perhaps not a realistic test). |
I tried this up to a relative tolerance of 1e-7, with 93% elements matching at that point. The problem is it needs to do 1e4 iterations so when the tester outputs the log, its all there is in the console. I will test and set it to 1e-8 which should match all elements, but outputting the log will have to be done differently. |
I'm not sure I entirely follow - for this test, can't we just ignore what's in the log and examine the final result? |
So instead of trying to set arbitrarily lower tolerances (which were never reached as the minimizer reached 10*res**3 iterations anyways), I've reduced the splicing region to 5 Mpc/h on a 50 Mpc/h box. This makes the number of iterations needed to reach a standard tolerance of 1e-5 around 15, which is not enough for nondeterministic deviations to accumulate. Not only that, but a smaller splicing regions is more in line with the current science case of potential splicing, dark matter halo Lagrangian patches. |
Perfect, thanks. Sorry for asking one more thing but I just realised that all the existing method names in the ICGenerator class (with one mistaken exception) are I promise this is the last thing then we can merge. |
This seems ready to go. To understand for the documentation -- why do you recommend |
The decision to disable |
Perhaps adding a warning in the splicePotential function like in line 325 of linearmodification.hpp for compiling with |
…RIER_SPACE' flag activated
The motivation to disable |
That makes sense, but I don't think it will be a huge issue for most potential users (unless you have tests that show otherwise)? I'd suggest we update the warning message to be something more like
appropriately split across lines... Does that sounds reasonable? |
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.
Well if you are interested in keeping all local linear information about the evolution of your patch the same, then it would be important. Otherwise you wouldn't know if the effect on your evolved patch is from the environment or on the changes made in the initial velocity and density fields while taking the gradient in fourier space. Its not something Corentin and I have quantified but maybe doing a quick check in my free time might be possible. In any case, I'm pretty happy with the changes and suggestions made, thank you Andrew!
This looks good to me! Thanks @AnatoleStorck for the work! Once https://arxiv.org/abs/2409.13010 is accepted and this PR merged, it'd be great to add this to the manual. @apontzen what is the procedure for this? |
@cphyc Agree we need to document it. At the moment the manual is very 'manual'; it's just a latex document. Ideally we should turn it into markdown or something like that and host it in a repository that uses Jekyll or something, hosted in this repository. Do you feel like doing that? Or would you prefer just to edit a latex file and send back to me? |
@cphyc @AnatoleStorck quick ping re the documentation discussion above - we can add something very basic if you like, but we should definitely describe the basics at a minimum. Let me know! It will be good to get this merged and released shortly. |
Here is my code to spliced the potential, rebased onto the current master branch.