pmininni / GHOST

GHOST (the Geophysical High-Order Suite for Turbulence) is an accurate and highly scalable pseudospectral code that solves a variety of PDEs often encountered in studies of turbulent flows.
40 stars 16 forks source link

Profiling Gparts module #7

Open JavierSierraAusin opened 10 months ago

JavierSierraAusin commented 10 months ago

Dear developers,

I am currently implementing a module of Lagrangian Coherent Structures (LCS) within GHOST, for instance Finite Time Lyapunov Exponent (FTLE). For this kind of techniques to work, we need to integrate at least the same number of particles as the Eulerian grid. What I have seen is that the interpolation routine GPart_EulerToLag has a similar cost as the Eulerian RK stage. This is mostly due to the communication CALL this%gpcomm_%SlabDataExchangeSF(this%esplfld_,field) within GPSplineInt_CompSpline3D and the loop inside GPSplineInt_Interp3D. Do you have an idea if we could speed up this process? Or on the other hand, do you think this is the (time) cost we should pay?

Thank you!

pmininni commented 10 months ago

We have worked in the last few months to speed up the case when the number of particles is similar to the number of Eulerian grid points. The implementation of the NN interface has to do with this. But ultimately yes, to evolve N^3 particles should have a similar computational cost as evolving the Eulerian fluid.

JavierSierraAusin commented 10 months ago

Thank you very much for the answer. In my case, with an Eulerian and Lagrangian resolution of 1024^3 I obtain a cost of the Lagrangian field roughly twice the Eulerian.