-
Notifications
You must be signed in to change notification settings - Fork 3
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
Particle Patches: Fallback #8
Comments
Thanks for pointing out, I will try to fix this now |
Fixed. Tested on openPMD example datasets. Now it seems to work correctly |
Thanks a lot, this is great! |
Thanks a lot! It goes further in the code but I still observe a couple of issues. I'm trying to use the Voronoi algorithm using the following command: The first issue I encounter is that I think the Since I'm testing the code with data from a 2D simulation, I guess that I can temporarily fix this by adding Now if I do this and try the above command line, I obtain the following error:
Do you know where this is coming from? I can run more tests if needed. Thanks again! |
@NeilZaim thanks. i reproduced it |
@NeilZaim now it seems to work. I also add some information about algorithms to a command arguments description |
Thanks a lot @KseniaBastrakova ! I am now able to produce h5 output that I can read (tested with the Voronoi algorithm) so I'll start toying around and see what I can get :) . I've encountered a few issues, listed below:
Thanks again! |
@NeilZaim Thank you very much for the detailed description of the errors. Working on reproduction and fix |
@NeilZaim, I fixed the first issue and, probably, the the secound one(I found a possible problem that could cause it), so now it seems work for all algorithms |
And I assume the third one was fixed with PR by @NeilZaim ? |
yes, I merged it already |
Thanks a lot! I've just given it a try but I get the following error message
I don't have time to look at it in more details today but if you want I can run more tests/provide more details tomorrow. |
@ NeilZaim Do you use 1-d coordinates? I think my problem in improper handling this dataset. (only testing on 2-d and 3-d) |
No this is data from a 2D simulation. Although in this case the coordinates are named |
On a completely unrelated note, what is the current status of the Vranic algorithm? I see that there is a file in the |
could you provide a file? I made a file only with |
Ok thanks. I think the data is a bit large but I'll see if I can produce smaller data with the same error message. |
I still work on the algorithm itself, so it works for a few simple cases, but I did not test it completely and did not measure the metrics |
Hello Ksenia. I attach below a somewhat small h5 (~3MB) file which reproduces the issue. The error appears when In any case, I've also noticed that the line |
@ NeilZaim, thank you for the small example. Yes, I think, it can cause this problem. I working on a small fix |
So I've tested it and it works now, thanks a lot! I still have some random segfaults during some of the calls to I've also noticed that the code feeds many values to the merging algorithms (all the components in
in I also now have a working version of the Vranic algorithm, I'll write a PR soon. |
Thanks for your feedback @NeilZaim . Regarding the loading, I agree that many things are not needed in the algorithms. Unfortunately, they still need to be loaded from and written back to the file, as the structure changes with some macroparticles being deleted. Also, when macroWeighted = 1 the values need to be changed when the weight changes. However, it can be that the implementation does some more data shuffling than necessary. Could you look into that @KseniaBastrakova ? |
I see, thanks. (although I guess that in the general case values other than momentum, position and weight are undefined anyways when we create new particles (with Voronoi for instance)). Note that what I have currently written for the Vranic algorithm just returns position/momentum/weight, I can modify it to include other values if needed. In any case you don't need to worry too much about further optimizing the code as far as I am concerned, what is currently here is fine for me. |
Actually Vranic currently crashes if we don't add the lines
😬 |
Yes, just pushed it |
Hi @KseniaBastrakova,
just a minor issue discovered by @NeilZaim: "particle patches" are an optional feature in openPMD:
particle_reduction/reduction_main.py
Lines 649 to 651 in 8283f3f
Although PIConGPU always writes them, these patches might not exist in other data sets such as the examples here:
https://github.com/openPMD/openPMD-example-datasets/
This currently leads to a segfault when using the scripts with those examples.
Can we please add the following simple fallback logic? If particle species does not declare particle patches, just chunk the particle read by a fixed number of particles, e.g. 1e7 particles at a time.
The text was updated successfully, but these errors were encountered: