SCOREC / pumi-pic

support libraries for unstructured mesh particle in cell simulations on GPUs and CPUs
BSD 3-Clause "New" or "Revised" License
36 stars 15 forks source link

rebuild time cost within "migrate" function not counted #86

Closed zhangchonglin closed 2 years ago

zhangchonglin commented 2 years ago

Looking at the migrate function within PUMIPic:

https://github.com/SCOREC/pumi-pic/blob/fea3a38afd490a69dc8a597cee05ab31c00505b8/particle_structs/src/scs/SCS_migrate.h#L211-L222

the time cost of rebuild particle structure within migrate function is deducted from the total migration time cost. It's fine if this is the PUMIPic definition of particle migration time cost. But the rebuild time cost should be added to the overall particle structure rebuild time cost in PUMIPic, instead of not counted. This seems to be the case for SCS, CSR, and CabanaM particle migrate functions.

Refer to https://github.com/SCOREC/xgcm/issues/154 for further details.

zhangchonglin commented 2 years ago

Since within the function rebuild, rebuild time cost is always counted for every function call, time cost for rebuild should be fine. https://github.com/SCOREC/pumi-pic/blob/a710faa7f0982ce2d8656585efaec9d1c5fec29d/particle_structs/src/scs/SCS_rebuild.h#L300