From b27a29b442d021a943f4d384cc02a0eb870eb4c0 Mon Sep 17 00:00:00 2001
From: Patrick Jaap <patrick.jaap@tu-dresden.de>
Date: Wed, 29 Jun 2022 11:44:13 +0200
Subject: [PATCH] ADOL-C: do not put the rank into trace_off()

Following the doc at

https://github.com/coin-or/ADOL-C/blob/master/ADOL-C/doc/adolc-manual.pdf

this enforces writing the tapes to disk and has nothing to do with the actual
taping. From the doc:

"By setting the optional integer argument file of trace off to 1, the user may force a
numbered tape file to be written even if the tape array (buffer) does not overflow. If the
argument file is omitted, it defaults to 0, so that the tape array is written onto a tape file
only if the length of any of the buffers exceeds [OLVT]BUFSIZE elements."
---
 dune/elasticity/assemblers/localadolcstiffness.hh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dune/elasticity/assemblers/localadolcstiffness.hh b/dune/elasticity/assemblers/localadolcstiffness.hh
index 487b94d..f062686 100644
--- a/dune/elasticity/assemblers/localadolcstiffness.hh
+++ b/dune/elasticity/assemblers/localadolcstiffness.hh
@@ -76,13 +76,13 @@ energy(const LocalView& localView,
     try {
         energy = localEnergy_->energy(localView,localAConfiguration);
     } catch (Dune::Exception &e) {
-        trace_off(rank);
+        trace_off();
         throw e;
     }
 
     energy >>= pureEnergy;
 
-    trace_off(rank);
+    trace_off();
 
     return pureEnergy;
 }
@@ -227,7 +227,7 @@ energy(const Entity& element,
 
     energy >>= pureEnergy;
 
-    trace_off(rank);
+    trace_off();
 
     return pureEnergy;
 }
-- 
GitLab