!LQrdVpOJEohPSWMlmf:matrix.org

Smilei users

273 Members
github.com/SmileiPIC/Smilei4 Servers

Load older messages


SenderMessageTime
24 Jul 2024
@kimurin:matrix.orgkimurin
In reply to @chprouv:matrix.org
If you can, you can share here or in a github conversation your input file and i could test your case on different clusters to check the perf
I 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
@chprouv:matrix.orgchprouv
In reply to @kimurin:matrix.org
Thanks for info! I am not an end user, but only install Smiley for users of our cluster. For the GPU, I used this input file from https://github.com/SmileiPIC/Smilei/issues/674#issuecomment-2102704390 It's yours, right?
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 12812812882 = 33e6. That said i do not use this for comparison with CPU, i would deactivate the IOs first.
15:10:08
@chprouv:matrix.orgchprouv
In reply to @kimurin:matrix.org
I 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?
The 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
@chprouv:matrix.orgchprouv
In reply to @kimurin:matrix.org
Thanks for info! I am not an end user, but only install Smiley for users of our cluster. For the GPU, I used this input file from https://github.com/SmileiPIC/Smilei/issues/674#issuecomment-2102704390 It's yours, right?
* 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
@wideeyedtrex:matrix.orgS.V. RAHUL 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
@fredpz:matrix.orgfredpzThere 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 second17:11:43
@wideeyedtrex:matrix.orgS.V. RAHUL

i see. So far, ive been using this like so :

DiagParticleBinning(
    deposited_quantity = "weight_charge",
    every = globalEvery,
    species = ["al"],
    axes = [ ["x",    0.,    Lshort, Nshort],
    ["y",    0.,    Llong, Nlong]]
)

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
@fredpz:matrix.orgfredpzThe second one gives you the average charge state. The first one gives a distribution of charge states19:59:12
@fredpz:matrix.orgfredpzWhat you did does not achieve much. If you want the average charge state, you need the density at each point20:00:13
@wideeyedtrex:matrix.orgS.V. RAHULunderstood. Thanks. Indeed when i tried my approach i was not getting correct values of the charge state. 20:02:09
@wideeyedtrex:matrix.orgS.V. RAHULi 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
@fredpz:matrix.orgfredpzyes21:02:16
25 Jul 2024
@sg84zyge:matrix.tu-darmstadt.deSarah Grimm (TUDa) 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
@sg84zyge:matrix.tu-darmstadt.deSarah Grimm (TUDa) * 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
@fredpz:matrix.orgfredpzHow did you get the value of weights?09:02:07
@sg84zyge:matrix.tu-darmstadt.deSarah Grimm (TUDa)
with h5py.File(path_to_simulation+'TrackParticlesDisordered_electron.h5', 'r')  as h5f: 
    weights = h5f['data/0000000000/particles/electron/weight'][:]
    unitSI = h5f[f'data/{0:010}/particles/electron/weight'].attrs['unitSI']

w = weights[0] * unitSI
09:03:38
@sg84zyge:matrix.tu-darmstadt.deSarah Grimm (TUDa) *
with h5py.File(path_to_simulation+'TrackParticlesDisordered_electron.h5', 'r')  as h5f: 
    weights = h5f['data/0000000000/particles/electron/weight'][:]
    unitSI = h5f['data/0000000000/particles/electron/weight'].attrs['unitSI']

w = weights[0] * unitSI
09:04:42
@fredpz:matrix.orgfredpz 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
@sg84zyge:matrix.tu-darmstadt.deSarah Grimm (TUDa)

Even if I am not using unitSI, the result is multiple orders of magnitude away from what I specified in the namelist.

S = happi.Open(path_to_simulation)

refl = S.namelist.refl
hypervolume = S.namelist.Main.cell_length[0]*S.namelist.Main.cell_length[1]
ppc = S.namelist.Species['Mylar_electron'].particles_per_cell

print('w * ppc / (hypervolume * refl^2) = ', w * ppc / hypervolume / refl**2)
09:30:52
@sg84zyge:matrix.tu-darmstadt.deSarah Grimm (TUDa)Is there something wrong with my formula?09:31:29
@fredpz:matrix.orgfredpz what is refl? 09:32:00
@fredpz:matrix.orgfredpzAh I guess it is Lr in SI?09:32:23
@sg84zyge:matrix.tu-darmstadt.deSarah Grimm (TUDa)the reference length (https://smileipic.github.io/Smilei/Understand/units.html?highlight=units#arbitrary-reference-quantities)09:32:52
@fredpz:matrix.orgfredpz w * ppc / hypervolume should give you a density in code units 09:33:22
@fredpz:matrix.orgfredpz( = critical density, usually )09:33:46
@fredpz:matrix.orgfredpzIf you want that in SI, then multiply by Nr in Si09:34:05
@fredpz:matrix.orgfredpz * If you want that in SI, then multiply by Nr in SI09:34:08
@fredpz:matrix.orgfredpz 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
@sg84zyge:matrix.tu-darmstadt.deSarah Grimm (TUDa)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
@marco_ribeiro:matrix.orgmarco_ribeiro joined the room.22:10:11

There are no newer messages yet.


Back to Room ListRoom Version: 5