-From 4e8acba5ebf953eee85cdcf22cb9f50f7304a6a3 Mon Sep 17 00:00:00 2001
-From: "Steve S. Sylvester" <steve.s.sylvester@intel.com>
-Date: Thu, 10 Nov 2016 11:32:13 -0800
+From 23af5a280b84ddb34fde3ce5764376a7112f9951 Mon Sep 17 00:00:00 2001
+From: Diana Guttman <diana.r.guttman@intel.com>
+Date: Tue, 18 Sep 2018 21:43:42 +0000
 Subject: [PATCH] Adding geopm markup to CORAL version of miniFE.
 
 #  Copyright (c) 2015, 2016, 2017, 2018, Intel Corporation

#

Signed-off-by: Steve S. Sylvester <steve.s.sylvester@intel.com>
---
 src/Makefile                   | 14 ++++++++------
 src/SparseMatrix_functions.hpp | 20 ++++++++++++++++++++
 src/Vector_functions.hpp       | 20 ++++++++++++++++++++
 src/cg_solve.hpp               |  7 +++++++
 4 files changed, 55 insertions(+), 6 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 461bdde..0ef6065 100644

 #ifdef MINIFE_HAVE_TBB
 #include <LockingMatrix.hpp>
 #endif
@@ -515,6 +519,13 @@ void operator()(MatrixType& A,
         ScalarType* ycoefs                        = &y.coefs[0];
         const ScalarType beta                     = 0;
 
+#ifndef NO_GEOPM
+        static uint64_t R_ID = 0;
+        if (R_ID == 0) {
+            geopm_prof_region( "PHASE_MATVEC", GEOPM_REGION_HINT_COMPUTE, &R_ID);
+        }
+        geopm_prof_enter( R_ID);
+#endif
         #pragma omp parallel for
         for(MINIFE_GLOBAL_ORDINAL row = 0; row < rows_size; ++row) {
                 const MINIFE_GLOBAL_ORDINAL row_start = Arowoffsets[row];
@@ -529,6 +540,9 @@ void operator()(MatrixType& A,
 
                 ycoefs[row] = sum;
         }
