From 2c5f475d451aede47fe2cad2bbd8681c9ca1f456 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Tue, 28 Jun 2022 12:51:19 -0700 Subject: [PATCH] Write runtime attribs to checkpoints on GPUs (#2856) --- Src/Particle/AMReX_WriteBinaryParticleData.H | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Src/Particle/AMReX_WriteBinaryParticleData.H b/Src/Particle/AMReX_WriteBinaryParticleData.H index 5a71d015763..70fcbfda237 100644 --- a/Src/Particle/AMReX_WriteBinaryParticleData.H +++ b/Src/Particle/AMReX_WriteBinaryParticleData.H @@ -231,12 +231,26 @@ packIOData (Vector& idata, Vector& rdata, const PC& pc, int l } } + for (int j = 0; j < ptd.m_num_runtime_int; j++) { + if (write_int_comp_d_ptr[PC::SuperParticleType::NInt + j]) { + idata_d_ptr[iout_index] = ptd.m_runtime_idata[j][pindex]; + iout_index++; + } + } + for (int j = 0; j < PC::SuperParticleType::NReal; j++) { if (write_real_comp_d_ptr[j]) { rdata_d_ptr[rout_index] = p.rdata(j); rout_index++; } } + + for (int j = 0; j < ptd.m_num_runtime_real; j++) { + if (write_real_comp_d_ptr[PC::SuperParticleType::NReal + j]) { + rdata_d_ptr[rout_index] = ptd.m_runtime_rdata[j][pindex]; + rout_index++; + } + } } });