Update CURL implementation to allow the compiler to optimize the code #4163
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I compared the performance of the derived functions to codes outside ADIOS doing the same thing and CURL was 8x slower while magnitude and add were only 1.4x slower. I changed the code to a version that allows the compiler to optimize the linear interpolation. All codes are now 1.4x slower than kernels outside ADIOS (I assume this is because memory allocation for the new variable, but I will have to check further).
Breakdown performance for magnitude and curl:
Legend:
metadata_only
andstore_data
All tests are for magnitude(x,y,z) and curl(x,y,z) with x,y,z 3 ADIOS 3D variables of size NxNxN. The horizontal ax show the array size in MB for one of these 3D variables. For e.g. 1GB means x, y, z are 650x650x650.
The time difference between curl and magnitude for the post process/store data phases is due to the fact that CURL creates a 3xNxNxN variable while magnitude creates a NxNxN variable.