Reply To: SuperLatticePhysHeatFlux3D Different Results on GPU vs CPU
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › Bug Reports › SuperLatticePhysHeatFlux3D Different Results on GPU vs CPU › Reply To: SuperLatticePhysHeatFlux3D Different Results on GPU vs CPU
Glad to hear it.
Just adding to your hint: While it makes sense to synchronize the entire state to CPU for post processing results (i.e. call
sLattice.setProcessingContext(ProcessingContext::Evaluation)), doing the “copy-to-CPU-update-copy-to-GPU” roundtrip is often not necessary and can reduce performance.
E.g. if you only update the inflow velocity it can be sufficient to update the data on CPU and copy only the relevant field to GPU. There also is the option of using background processing to hide IO while the simulation continues. See e.g. the
turbulence/nozzle3d case for an application of these concepts.