adaptive-cfd / WABBIT

Wavelet Adaptive Block-Based solver for Interactions with Turbulence
https://www.cfd.tu-berlin.de/
GNU General Public License v3.0
55 stars 27 forks source link

performance optimizations for wavelets and testing framework in python #62

Closed Arcadia197 closed 2 months ago

Arcadia197 commented 2 months ago

Wavelets

Fresh latest batch of performance optimizations for wavelets!

A comment on the last commit as we did not discuss it and I did it on Friday night: While cleaning up I noticed that your definition for the spaghetti form is:

HH HG
GH HH

This means that with changing x-coordinate we change the filter in y-dimension (interchanging between scaling and wavelet). While this is convenient with the naming (SC, WCx, WCy, WCxy), I think it is confusing for the indexing. Additionally it means both in wavelet decomposition and reconstruction we swap the filtered values after (or before) we apply the filters. I would love to change this definition to match the indexing and avoid confusion. I have changed all necessary comments in the code already. Please give me a feedback on this!

Timing

I added timing information for every adapt tree iteration. It may add quite some timing entries but they help currently with understanding what is going on in adapt_tree. Would love to see one for a full test and in near future we could disable them again

Testing framework

New tests need latest python-tools, make sure to update it (and merge the PR there)

Main tests

I have recreated the testing framework in Python. This gives it more flexibility with execution with additional parameters. While at it I tweaked the tests:

Total timing on IDRIS 326s and locally 286s.

Compression test

I have recreated the compression test in python and added it to the main library so that it can be easily deployed on systems as well. It is included in TESTING/compression.

tommy-engels commented 2 months ago

Should all unit tests pass with this version? Or do they have to be updated ?

Arcadia197 commented 2 months ago

Should all unit tests pass with this version? Or do they have to be updated ?

All should pass but apparently blob_adaptive_CDF_42 fails and I don't know why currently.

Arcadia197 commented 2 months ago

I forgot to mention: The tests now directly access wabbit_tools.py so this needs to be accessible for python in the PYTHONPATH via something like. I added this to the wiki.

export PYTHONPATH=${PYTHONPATH}:${WABBIT_PT_ROOT}