Skip to content

Commit 53563d9

Browse files
authored
Merge pull request #2092 from su2code/preacc_performance
Improve parallel preacc performance
2 parents 7d0cd31 + a9a7ad8 commit 53563d9

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

Common/include/basic_types/ad_structure.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,16 +384,14 @@ FORCEINLINE void SetDerivative(int index, const double val) {
384384
if (index == 0) // Allow multiple threads to "set the derivative" of passive variables without causing data races.
385385
return;
386386

387-
using BoundsChecking = codi::GradientAccessTapeInterface<su2double::Gradient, su2double::Identifier>::BoundsChecking;
388-
AD::getTape().setGradient(index, val, BoundsChecking::False);
387+
AD::getTape().setGradient(index, val, codi::AdjointsManagement::Manual);
389388
}
390389

391390
// WARNING: For performance reasons, this method does not perform bounds checking.
392391
// If called after tape evaluations, the adjoints should exist.
393392
// Otherwise, please ensure sufficient adjoint vector size by a call to AD::ResizeAdjoints().
394393
FORCEINLINE double GetDerivative(int index) {
395-
using BoundsChecking = codi::GradientAccessTapeInterface<su2double::Gradient, su2double::Identifier>::BoundsChecking;
396-
return AD::getTape().getGradient(index, BoundsChecking::False);
394+
return AD::getTape().getGradient(index, codi::AdjointsManagement::Manual);
397395
}
398396

399397
FORCEINLINE bool IsIdentifierActive(su2double const& value) {

externals/codi

Submodule codi updated 40 files

externals/opdi

Submodule opdi updated 126 files

meson_scripts/init.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ def init_submodules(
5555

5656
# This information of the modules is used if projects was not cloned using git
5757
# The sha tag must be maintained manually to point to the correct commit
58-
sha_version_codi = "4237fe38c90b83541f699bd84e00c656099b7d18"
58+
sha_version_codi = "17232fed05245dbb8f04a31e274a02d53458c75c"
5959
github_repo_codi = "https://github.com/scicompkl/CoDiPack"
6060
sha_version_medi = "aafc2d1966ba1233640af737e71c77c1a86183fd"
6161
github_repo_medi = "https://github.com/SciCompKL/MeDiPack"
62-
sha_version_opdi = "913535c490989ea9aa654e8c7df41c7e3718a5a2"
62+
sha_version_opdi = "c42cca71a3d0b44fb482e268ecd40b623e71776b"
6363
github_repo_opdi = "https://github.com/SciCompKL/OpDiLib"
6464
sha_version_meson = "41c650a040d50e0912d268af7a903a9ce1456dfa"
6565
github_repo_meson = "https://github.com/mesonbuild/meson"

0 commit comments

Comments
 (0)