Sender | Message | Time |
---|---|---|
24 Jul 2024 | ||
In reply to @chprouv:matrix.orgI would like to know, why do you use more than one cpu in --cpus-per-task=4 here https://github.com/SmileiPIC/Smilei/issues/674#issuecomment-2102799502 Does it improve computing performance? | 14:55:36 | |
In reply to @kimurin:matrix.orgI understand. Yes that is an input file i use for testing. ballpark, if you want to fill a GPU you should have several 10e6 particles in total per GPU. here you have about 12812812882 = 33e6. That said i do not use this for comparison with CPU, i would deactivate the IOs first. | 15:10:08 | |
In reply to @kimurin:matrix.orgThe idea is that we use a mpi rank per numa domain, in which case we assign all the cpu cores of the numa domain to the task. in practice it might improve a bit the performance since there is at least the python runtime that is working as well, but i would not be able to give you numbers as i did not test that thorougly. | 15:15:51 | |
In reply to @kimurin:matrix.org* I understand. Yes that is an input file i use for testing. ballpark, if you want to fill a GPU you should have several 10e6 particles in total per GPU. here you have about 128 x 128 x 128 x 8 x 2 = 33e6. That said i do not use this for comparison with CPU, i would deactivate the IOs first. | 15:29:02 | |
Hi, I was using ParticleBinning to calculate the ion charge in a given cell of the simulation box in a 2D simulation to make a 2D heatmap of ion charge states in the simulation box. My understanding is that deposited_quantity = "weight_charge" will further need to be multiplied by the cell volume for every cell (or area for 2D case). Is this correct or any further prefactors need to be kept in mind ? | 17:02:56 | |
There are two approaches. You can have 1 diagnostic with an axis charge to distinguish between charge states. Or you can have 2 diagnostics one with deposited quantity = weight_charge and the other with deposited quantity = weight. Then divide the first by the second | 17:11:43 | |
i see. So far, ive been using this like so :
in hopes that this will give me the charge state at every (x,y) point. What's the advantage of the second approach, if any ? | 19:31:55 | |
The second one gives you the average charge state. The first one gives a distribution of charge states | 19:59:12 | |
What you did does not achieve much. If you want the average charge state, you need the density at each point | 20:00:13 | |
understood. Thanks. Indeed when i tried my approach i was not getting correct values of the charge state. | 20:02:09 | |
i take it that the same concept holds true if one needs to plot weight_p or weight_ekin to get average momentum or kinetic energy per cell then. | 20:40:27 | |
yes | 21:02:16 | |
25 Jul 2024 | ||
Hi, I also have a question regarding weights: How do I get the actual weight of a particle (in SI) from the weights that are written to the hdf5 files by the TrackParticleDiagnostics?I defined a certain number_density for a species in the namelist. The size of my cells is defined in the Main block by cell_length . The particles_per_cell are defined in the Species block.Based on https://smileipic.github.io/Smilei/Understand/units.html#macro-particle-weights I tried to reconstruct the density by calculating weight * particles_per_cell / cell_length[0]*cell_length[1], however this does not yield the same result as the one I set in the namelist. I also tried multiplying with the unitSI attribute that is also dumped in the hdf5 file. | 08:27:48 | |
* Hi, I also have a question regarding weights: How do I get the actual weight of a particle (in SI) from the weights that are written to the hdf5 files by the TrackParticleDiagnostics?I defined a certain number_density for a species in the namelist. The size of my cells is defined in the Main block by cell_length . The particles_per_cell are defined in the Species block.Based on https://smileipic.github.io/Smilei/Understand/units.html#macro-particle-weights I tried to reconstruct the density by calculating weight * particles_per_cell / (cell_length[0]*cell_length[1]) , however this does not yield the same result as the one I set in the namelist.I also tried multiplying with the unitSI attribute that is also dumped in the hdf5 file. | 08:29:06 | |
How did you get the value of weights? | 09:02:07 | |
| 09:03:38 | |
*
| 09:04:42 | |
Don't use unitSI . I think there is a mistake there. This attribute is only used for openPMD compatibility, and this has not been checked in a while | 09:07:43 | |
Even if I am not using unitSI, the result is multiple orders of magnitude away from what I specified in the namelist.
| 09:30:52 | |
Is there something wrong with my formula? | 09:31:29 | |
what is refl ? | 09:32:00 | |
Ah I guess it is Lr in SI? | 09:32:23 | |
the reference length (https://smileipic.github.io/Smilei/Understand/units.html?highlight=units#arbitrary-reference-quantities) | 09:32:52 | |
w * ppc / hypervolume should give you a density in code units | 09:33:22 | |
( = critical density, usually ) | 09:33:46 | |
If you want that in SI, then multiply by Nr in Si | 09:34:05 | |
* If you want that in SI, then multiply by Nr in SI | 09:34:08 | |
Note that the calculation only works if the number of particles per cell is uniform and particles don't move. Otherwise, instead of w * ppc you need to properly sum over particles in a given region | 09:35:34 | |
Right now I am only looking at the first timestep, so the particles should not have moved. Let me check something and then I will get back to you. Thanks for your help so far! :) | 09:37:36 | |
22:10:11 |