Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds detection patches #18

Merged
merged 7 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions DunePerfRegression/alu_grid_adapt_detect.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Region detection patch
include_revisions:
revision_range:
start: 559e763958113c8e6c31a3569127781cadb5a535
path: alu_grid_adapt_detect.patch
project_name: DunePerfRegression
shortname: alu_grid_adapt_detect
tags:
- compile-time
- template
- grid
- ALUGrid
- region_identifier
29 changes: 29 additions & 0 deletions DunePerfRegression/alu_grid_adapt_detect.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Submodule dune-alugrid contains modified content
diff --git a/dune-alugrid/dune/alugrid/3d/grid_inline.hh b/dune-alugrid/dune/alugrid/3d/grid_inline.hh
index f7e1b5d1..124dd058 100644
--- a/dune-alugrid/dune/alugrid/3d/grid_inline.hh
+++ b/dune-alugrid/dune/alugrid/3d/grid_inline.hh
@@ -13,6 +13,14 @@

#define alu_inline_tmp inline

+namespace fp_util {
+ __attribute__((feature_variable("__VARA__DETECT__"))) void detect() {
+ long counter = 0;
+ asm volatile("" : "+g"(counter) : :);
+ counter++;
+ }
+}
+
namespace Dune
{

@@ -515,6 +530,8 @@ namespace Dune
alu_inline_tmp
bool ALU3dGrid< dim, dimworld, elType, Comm >::adapt ()
{
+ fp_utils::detect();
+
bool ref = false;

if( lockPostAdapt_ == true )
13 changes: 13 additions & 0 deletions DunePerfRegression/bicgstab_solver_apply_detect.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Region detection patch
include_revisions:
revision_range:
start: 559e763958113c8e6c31a3569127781cadb5a535
path: bicgstab_solver_apply_detect.patch
project_name: DunePerfRegression
shortname: bicgstab_solver_apply_detect
tags:
- compile-time
- template
- solver
- BiCGSTABSolver
- region_identifier
33 changes: 33 additions & 0 deletions DunePerfRegression/bicgstab_solver_apply_detect.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Submodule dune-istl contains modified content
diff --git a/dune-istl/dune/istl/solver.hh b/dune-istl/dune/istl/solver.hh
index e25e9e08..857234d5 100644
--- a/dune-istl/dune/istl/solver.hh
+++ b/dune-istl/dune/istl/solver.hh
@@ -23,6 +23,14 @@
#include "operators.hh"
#include "scalarproducts.hh"

+namespace fp_util {
+ __attribute__((feature_variable("__VARA__DETECT__"))) void detect() {
+ long counter = 0;
+ asm volatile("" : "+g"(counter) : :);
+ counter++;
+ }
+}
+
namespace Dune
{
/**
diff --git a/dune-istl/dune/istl/solvers.hh b/dune-istl/dune/istl/solvers.hh
index 5a7e901e..a8a37b31 100644
--- a/dune-istl/dune/istl/solvers.hh
+++ b/dune-istl/dune/istl/solvers.hh
@@ -438,6 +438,8 @@ namespace Dune {
*/
virtual void apply (X& x, X& b, InverseOperatorResult& res)
{
+ fp_utils::detect();
+
using std::abs;
const Simd::Scalar<real_type> EPSILON=1e-80;
using std::abs;
13 changes: 13 additions & 0 deletions DunePerfRegression/cg_solver_apply_detect.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Region detection patch
include_revisions:
revision_range:
start: 559e763958113c8e6c31a3569127781cadb5a535
path: cg_solver_apply_detect.patch
project_name: DunePerfRegression
shortname: cg_solver_apply_detect
tags:
- compile-time
- template
- solver
- CGSolver
- region_identifier
33 changes: 33 additions & 0 deletions DunePerfRegression/cg_solver_apply_detect.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Submodule dune-istl contains modified content
diff --git a/dune-istl/dune/istl/solver.hh b/dune-istl/dune/istl/solver.hh
index e25e9e08..857234d5 100644
--- a/dune-istl/dune/istl/solver.hh
+++ b/dune-istl/dune/istl/solver.hh
@@ -23,6 +23,14 @@
#include "operators.hh"
#include "scalarproducts.hh"

+namespace fp_util {
+ __attribute__((feature_variable("__VARA__DETECT__"))) void detect() {
+ long counter = 0;
+ asm volatile("" : "+g"(counter) : :);
+ counter++;
+ }
+}
+
namespace Dune
{
/**
diff --git a/dune-istl/dune/istl/solvers.hh b/dune-istl/dune/istl/solvers.hh
index 5a7e901e..b4528c22 100644
--- a/dune-istl/dune/istl/solvers.hh
+++ b/dune-istl/dune/istl/solvers.hh
@@ -278,6 +278,8 @@ namespace Dune {
*/
virtual void apply (X& x, X& b, InverseOperatorResult& res)
{
+ fp_utils::detect();
+
Iteration iteration(*this,res);
_prec->pre(x,b); // prepare preconditioner

13 changes: 13 additions & 0 deletions DunePerfRegression/gradient_solver_apply_detect.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Region detection patch
include_revisions:
revision_range:
start: 559e763958113c8e6c31a3569127781cadb5a535
path: gradient_solver_apply_detect.patch
project_name: DunePerfRegression
shortname: gradient_solver_apply_detect
tags:
- compile-time
- template
- solver
- GradientSolver
- region_identifier
33 changes: 33 additions & 0 deletions DunePerfRegression/gradient_solver_apply_detect.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Submodule dune-istl contains modified content
diff --git a/dune-istl/dune/istl/solver.hh b/dune-istl/dune/istl/solver.hh
index e25e9e08..857234d5 100644
--- a/dune-istl/dune/istl/solver.hh
+++ b/dune-istl/dune/istl/solver.hh
@@ -23,6 +23,14 @@
#include "operators.hh"
#include "scalarproducts.hh"

+namespace fp_util {
+ __attribute__((feature_variable("__VARA__DETECT__"))) void detect() {
+ long counter = 0;
+ asm volatile("" : "+g"(counter) : :);
+ counter++;
+ }
+}
+
namespace Dune
{
/**
diff --git a/dune-istl/dune/istl/solvers.hh b/dune-istl/dune/istl/solvers.hh
index 5a7e901e..e57b4dd0 100644
--- a/dune-istl/dune/istl/solvers.hh
+++ b/dune-istl/dune/istl/solvers.hh
@@ -141,6 +141,8 @@ namespace Dune {
*/
virtual void apply (X& x, X& b, InverseOperatorResult& res)
{
+ fp_utils::detect();
+
Iteration iteration(*this, res);
_prec->pre(x,b); // prepare preconditioner

13 changes: 13 additions & 0 deletions DunePerfRegression/kuhn_unit_cube_maker_create_detect.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Region detection patch
include_revisions:
revision_range:
start: 559e763958113c8e6c31a3569127781cadb5a535
path: kuhn_unit_cube_maker_create_detect.patch
project_name: DunePerfRegression
shortname: kuhn_unit_cube_maker_create_detect
tags:
- compile-time
- template
- maker
- KuhnUnitCubeMaker
- region_identifier
31 changes: 31 additions & 0 deletions DunePerfRegression/kuhn_unit_cube_maker_create_detect.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Submodule dune-alugrid contains modified content
diff --git a/dune-alugrid/dune/alugrid/grid.hh b/dune-alugrid/dune/alugrid/grid.hh
index b8fea0a9..4f877c5c 100644
--- a/dune-alugrid/dune/alugrid/grid.hh
+++ b/dune-alugrid/dune/alugrid/grid.hh
@@ -23,4 +23,12 @@

#endif // else if HAVE_ALUGRID

+namespace fp_util {
+ __attribute__((feature_variable("__VARA__DETECT__"))) void detect() {
+ long counter = 0;
+ asm volatile("" : "+g"(counter) : :);
+ counter++;
+ }
+}
+
#endif // #ifndef DUNE_ALUGRID_HH
diff --git a/dune-performance-regressions/dune/performance-regressions/gridmakers.hh b/dune-performance-regressions/dune/performance-regressions/gridmakers.hh
index e088ff8..077bf3f 100644
--- a/dune-performance-regressions/dune/performance-regressions/gridmakers.hh
+++ b/dune-performance-regressions/dune/performance-regressions/gridmakers.hh
@@ -202,7 +202,7 @@ class __attribute__((feature_variable("GridMaker"))) KuhnTriangulatedUnitCubeMak
public:
static std::unique_ptr<Grid> create() {
Dune::GridFactory<Grid> gf;
-
+ fp_utils::detect();
int fake_argc = 0;
char **fake_argv = NULL;

13 changes: 13 additions & 0 deletions DunePerfRegression/loop_solver_apply_detect.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Region detection patch
include_revisions:
revision_range:
start: 559e763958113c8e6c31a3569127781cadb5a535
path: loop_solver_apply_detect.patch
project_name: DunePerfRegression
shortname: loop_solver_apply_detect
tags:
- compile-time
- template
- solver
- LoopSolver
- region_identifier
33 changes: 33 additions & 0 deletions DunePerfRegression/loop_solver_apply_detect.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Submodule dune-istl contains modified content
diff --git a/dune-istl/dune/istl/solver.hh b/dune-istl/dune/istl/solver.hh
index e25e9e08..857234d5 100644
--- a/dune-istl/dune/istl/solver.hh
+++ b/dune-istl/dune/istl/solver.hh
@@ -23,6 +23,14 @@
#include "operators.hh"
#include "scalarproducts.hh"

+namespace fp_util {
+ __attribute__((feature_variable("__VARA__DETECT__"))) void detect() {
+ long counter = 0;
+ asm volatile("" : "+g"(counter) : :);
+ counter++;
+ }
+}
+
namespace Dune
{
/**
diff --git a/dune-istl/dune/istl/solvers.hh b/dune-istl/dune/istl/solvers.hh
index 5a7e901e..2b29e5f1 100644
--- a/dune-istl/dune/istl/solvers.hh
+++ b/dune-istl/dune/istl/solvers.hh
@@ -72,6 +72,8 @@ namespace Dune {
//! \copydoc InverseOperator::apply(X&,Y&,InverseOperatorResult&)
virtual void apply (X& x, X& b, InverseOperatorResult& res)
{
+ fp_utils::detect();
+
Iteration iteration(*this, res);
_prec->pre(x,b);

13 changes: 13 additions & 0 deletions DunePerfRegression/minres_solver_apply_detect.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Region detection patch
include_revisions:
revision_range:
start: 559e763958113c8e6c31a3569127781cadb5a535
path: minres_solver_apply_detect.patch
project_name: DunePerfRegression
shortname: minres_solver_apply_detect
tags:
- compile-time
- template
- solver
- MINRESSolver
- region_identifier
33 changes: 33 additions & 0 deletions DunePerfRegression/minres_solver_apply_detect.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Submodule dune-istl contains modified content
diff --git a/dune-istl/dune/istl/solver.hh b/dune-istl/dune/istl/solver.hh
index e25e9e08..857234d5 100644
--- a/dune-istl/dune/istl/solver.hh
+++ b/dune-istl/dune/istl/solver.hh
@@ -23,6 +23,14 @@
#include "operators.hh"
#include "scalarproducts.hh"

+namespace fp_util {
+ __attribute__((feature_variable("__VARA__DETECT__"))) void detect() {
+ long counter = 0;
+ asm volatile("" : "+g"(counter) : :);
+ counter++;
+ }
+}
+
namespace Dune
{
/**
diff --git a/dune-istl/dune/istl/solvers.hh b/dune-istl/dune/istl/solvers.hh
index 5a7e901e..a23b36fc 100644
--- a/dune-istl/dune/istl/solvers.hh
+++ b/dune-istl/dune/istl/solvers.hh
@@ -626,6 +626,8 @@ namespace Dune {
*/
virtual void apply (X& x, X& b, InverseOperatorResult& res)
{
+ fp_utils::detect();
+
using std::sqrt;
using std::abs;
Iteration iteration(*this, res);
13 changes: 13 additions & 0 deletions DunePerfRegression/richardson_preconditioner_create_detect.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Region detection patch
include_revisions:
revision_range:
start: 559e763958113c8e6c31a3569127781cadb5a535
path: richardson_preconditioner_create_detect.patch
project_name: DunePerfRegression
shortname: richardson_preconditioner_create_detect
tags:
- compile-time
- template
- preconditioner
- Richardson
- region_identifier
27 changes: 27 additions & 0 deletions DunePerfRegression/richardson_preconditioner_create_detect.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/dune-performance-regressions/dune/performance-regressions/poisson-problem.hh b/dune-performance-regressions/dune/performance-regressions/poisson-problem.hh
index b7c7d74..af9bdf6 100644
--- a/dune-performance-regressions/dune/performance-regressions/poisson-problem.hh
+++ b/dune-performance-regressions/dune/performance-regressions/poisson-problem.hh
@@ -26,6 +26,14 @@

#include "gridmakers.hh"

+namespace fp_util {
+ __attribute__((feature_variable("__VARA__DETECT__"))) void detect() {
+ long counter = 0;
+ asm volatile("" : "+g"(counter) : :);
+ counter++;
+ }
+}
+
class YaspUnitSquare : public Dune::YaspGrid<2>
{
public:
@@ -151,6 +166,7 @@ struct PreconditionerMaker<PreconditionMarker::Richardson> {
typename DomainContainerTy,
typename RangeContainerTy>
static auto create(MatrixTy m) {
+ fp_utils::detect();
return Dune::Richardson<DomainContainerTy,
RangeContainerTy>(1.0);
};
13 changes: 13 additions & 0 deletions DunePerfRegression/seqilu_preconditioner_create_detect.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Region detection patch
include_revisions:
revision_range:
start: 559e763958113c8e6c31a3569127781cadb5a535
path: seqilu_preconditioner_create_detect.patch
project_name: DunePerfRegression
shortname: seqilu_preconditioner_create_detect
tags:
- compile-time
- template
- preconditioner
- SeqILU
- region_identifier
Loading
Loading