ECP-WarpX / WarpX

WarpX is an advanced electromagnetic & electrostatic Particle-In-Cell code.
https://ecp-warpx.github.io
Other
287 stars 183 forks source link

Id track problem #4993

Open zhazhajust opened 2 months ago

zhazhajust commented 2 months ago

When i use GPU Code to track particle id, it return wrong results.

The tracked particle moving in light speed, but it should be near static(it's the background particle). The id of particle was not from the same particles.

image

And if i change to CPU version code it's fine.

ax3l commented 2 months ago

Hi @zhazhajust, thanks for the report.

Can you please provide us with more details, i.e.

You are probably onto something here, but we need more details to understand and reproduce your issue.

RemiLehe commented 1 month ago

@zhazhajust Thanks again for reporting this. Could you share the input script that you used, when observing this issue? Also: are you using the ADIOS or HDF5 output format?

zhazhajust commented 1 month ago

Sorry for so late to response.

This is some information about it: WarpX version: 24.03 machine: centos 7, x64 intel and V100

Unfortunately, my previous file has been deleted. I tried to recreate it, and here is my input file. And "Adios2" was used for the output format.

# algo
algo.maxwell_solver = Yee
algo.particle_shape = 3

# amr
amr.blocking_factor = 64
amr.max_grid_size = 1280
amr.max_level = 0
amr.n_cell = 1152 4992

# amrex
amrex.omp_threads = 1

# boundary
boundary.field_hi = absorbing_silver_mueller absorbing_silver_mueller
boundary.field_lo = none absorbing_silver_mueller
boundary.particle_hi = absorbing absorbing
boundary.particle_lo = absorbing absorbing

# diagnostics
diagnostics.diags_names = species track field

# electrons
electrons.charge = -q_e
electrons.mass = m_e
electrons.initialize_self_fields = 0
electrons.injection_style = "NUniformPerCell"
electrons.num_particles_per_cell_each_dim = 2 8 2
electrons.profile = constant
electrons.density = 1.74e23  # number of electrons per m^3
electrons.ux = 0.0
electrons.uy = 0.0
electrons.uz = 0.0
electrons.do_continuous_injection = 1

# field
field.coarsening_ratio = 2 2
field.diag_type = Full
field.dump_rz_modes = 1
field.fields_to_plot = Br Bt Bz Er Et Ez jr jt jz rho rho_electrons
field.file_prefix = ./FieldDiagnostic/
field.format = openpmd
field.intervals = 1000
field.openpmd_backend = bp
field.write_species = 0

# geometry
geometry.dims = RZ
geometry.prob_hi = 0.0002 0.0
geometry.prob_lo = 0 -0.0002

# laser1
laser1.direction = 0 0 1
laser1.do_continuous_injection = 0
laser1.e_max = 3210000000000.0
laser1.polarization = 0 1 0
laser1.position = 0.0 0.0 -1e-06
laser1.profile = Gaussian
laser1.profile_duration = 3.2e-14
laser1.profile_focal_distance = 1e-05
laser1.profile_t_peak = 6.4e-14
laser1.profile_waist = 1e-05
laser1.wavelength = 8e-07

# lasers
lasers.names = laser1

# particles
particles.species_names = electrons

# species
species.diag_type = Full
species.electrons.random_fraction = 0.1
species.electrons.variables = theta ux uy uz w x z
species.fields_to_plot = none
species.file_prefix = ./SpecDiagnostic/
species.format = openpmd
species.intervals = 1000
species.openpmd_backend = bp
species.species = electrons
species.write_species = 1

# stop_time
stop_time = 3.669205047179673e-12

# track
track.diag_type = Full
track.electrons.uniform_stride = 1001
track.electrons.variables = theta ux uy uz w x z
track.fields_to_plot = none
track.file_prefix = ./TrackDiagnostic/
track.format = openpmd
track.intervals = 8
track.openpmd_backend = bp
track.species = electrons
track.write_species = 1

# warpx
warpx.cfl = 0.95
warpx.do_dive_cleaning = 0
warpx.do_moving_window = 1
warpx.moving_window_dir = z
warpx.moving_window_v = 1.0
warpx.n_rz_azimuthal_modes = 3
warpx.use_filter = 0
warpx.verbose = 1

However, when I was recreating it, I found that no matter how I changed the input parameters, the required memory size remained the same and always exceeded my available memory.

amrex::Abort::3::Out of gpu memory. Free: 23321903104 Asked: 25567297536 !!!
SIGABRT
amrex::Abort::1::Out of gpu memory. Free: 23321903104 Asked: 25567297536 !!!
SIGABRT
CUDA initialized with 4 devices.
amrex::Abort::2::Out of gpu memory. Free: 23321903104 Asked: 25567297536 !!!
SIGABRT
amrex::Abort::0::Out of gpu memory. Free: 23332388864 Asked: 25567297536 !!!
SIGABRT

The memory allocation strategy was fixed and i didn't find a way to manually allocate less memory.