-
Notifications
You must be signed in to change notification settings - Fork 39
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
NaNs in E and B after init #334
Comments
We haven't been keeping cfg files really properly up to date in the directories... By eye, I'd say that the phase space threshold is too high and the magnetosphere density too low. |
This one I updated yesterday for master:
|
And corresponding density in the solar wind. |
Yours has the same minValue = 1.0e-13... |
For 2d polar run shouldn't isphere geometry = 3? |
Yes but 100 times higher density if I remember correctly.
…On 2 June 2017 10:25:56 EEST, Ilja ***@***.***> wrote:
Yours has the same minValue = 1.0e-13...
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#334 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
That is possibly wrong too... Urs, Sebastian, we should think of a cfg archive of some sort, we never keep the ones in the code repo up to date.
…On 2 June 2017 10:27:42 EEST, Ilja ***@***.***> wrote:
For 2d polar run shouldn't isphere geometry = 3?
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#334 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
I got closer to finding out what's happening: fieldsolver/derivatives.cpp:104 Zero density in spatial cell 0 I'll have to dig deeper but at least in that function rghtNbrID is never assigned a value so debug print probably has wrong id. |
A bit more progress: fieldsolver/derivatives.cpp:95 Zero density, in -x neighbor of cell 2448, at 1.68e+08, -4e+06, 1.84e+08 My sim is 50x50 cells so 2447 that has 0 density is 4th layer from outer boundary. Does that mean that setVelocityBlock in project.cpp fails to initialize that cell with any blocks? |
Moar progress, now I get: fieldsolver/ldz_volume.cpp:133 Illegal value: -nan |
Currently this is where the nan first appears (fieldsolver/ldz_electric_field.cpp), I'll continue tracking:
|
Most likely some zero-density gets into a denominator. Zero density at the beginning usually means the vspace didn't "catch" your population. |
Nah I got inf for density, current debug checks only work for non-negative densities... |
And using |
I've gotten to point where I see inf density after:
in derivatives.cpp at "Calculate z-derivatives". Do you think cell cache could be responsible? Or maybe this data hasn't been initialized yet? Where would you check next? |
Inf density is a rare thing, I must say, in our experience... How early are you getting this? At initialisation still? What type of a system is this? Are the system boundaries properly set in the config file (cf. periodicity vs. which face gets what type of boundary and such)? |
I'll have to check how early exactly but almost certainly before first dt is computed. Config file is same as I used above but adjusted based on your version. I'll send more details tomorrow. |
This is last thing printed to logfile and there are no result files yet: |
Can you try to check your config file with the tools/check_vlasiator_cfg.sh script? That might give hints at wrong/missing parameters. I really don't see how to get inf density, unless deliberately dividing by 0. Check that spatial sampling rates are 2 or more? |
nSpaceSamples and nVelocitySamples, wherever these parameters are useful. Setting them to 1 or 0 is dangerous. |
Here's what I get, looks like velocitysamples was 1 and changing to 2 the problem seems to go away or at least doesn't occur as early:
|
In some places that sample number is taken (n - 1) in a denominator to determine sampling spacing. So there you'd get a division by zero. The parameters left as default in your post above seem ok to me. |
Nope, using 2 samples instead of 1 just makes initialization take much longer but I still get inf after rght assignment above. |
Problem seems to occur only if |
Can you provide the location or cfg file? |
As above:
in derivatives.cpp at "Calculate z-derivatives". cfg file is
although above I have 40x50 cell simulation and that triggers a nan density in a different place, still investigating. |
With above config I get nan ( |
Note that nan compares false to everything I think so it isn't caught by the check a bit afterwards: |
Well I meant run location if accessible to me. Thx for the cfg. |
Ah run location is my laptop, projects/Magnetosphere/Magnetosphere.cfg. I sent the source by email. |
Cannot reproduce, your cfg runs smoothly on a single cray node. With some random sw1.dat I copied from some of my own. Check that your sw1.dat is sane? |
Check that your sw1.dat is sane?
I used the one in the magnetosphere project directory in package I sent: ```cat sw1.dat
0.0 1.0e6 1.0e5 -7e5 0 0 0 0 -5e-9```
|
OK. I didn't actually open your archive... This looks good to me, I have the same values. I used revision |
Hmm ok, which compiler? I use g++ (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
|
aprun vlasiator --version
|
Hmm library install locations imply gcc 5 but loaded module is for gcc 6. I guess that's close enough to my setup. I might try with a different compiler version. |
Whoopsie, this was not closed yet, but accidentally auto-closed due to a typo in the text of pull request #345 |
In any case, is this still an issue or have you solved it @iljah? |
Haven't solved it but it's not an issue anymore, thanks.
…________________________________
Lähettäjä: Yann Pfau-Kempf <notifications@github.com>
Lähetetty: 7. marraskuuta 2017 17:35:35
Vastaanottaja: fmihpc/vlasiator
Kopio: Honkonen Ilja (FMI); Mention
Aihe: Re: [fmihpc/vlasiator] NaNs in E and B after init (#334)
In any case, is this still an issue or have you solved it @iljah<https://github.com/iljah>?
-
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#334 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACAEtB-iQD6GCpSf4agt3ZbdZWNuslN1ks5s0HjHgaJpZM4NrZ7X>.
|
Using this code:
I get NaNs from the bulk.0000000.vlsv file. I'm using this config and pretty sure I haven't touched anything related to field solver, how should I debug this?
When plotting later times I see an expanding white diamond from earth which is the nans expanding to fill everything. The sum for isnan(B) is 522.
The text was updated successfully, but these errors were encountered: