From 473fad1035541358eb43c1fbcda975ab9c77e250 Mon Sep 17 00:00:00 2001
From: Pietro Incardona <incardon@mpi-cbg.de>
Date: Sat, 14 Apr 2018 21:45:34 +0200
Subject: [PATCH] Fixing example compilation

---
 example/Grid/3_gray_scott_3d_vectorization/Makefile |  4 ++--
 example/Grid/3_gray_scott_3d_vectorization/main.cpp | 12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/example/Grid/3_gray_scott_3d_vectorization/Makefile b/example/Grid/3_gray_scott_3d_vectorization/Makefile
index 9488bea0..9e129171 100644
--- a/example/Grid/3_gray_scott_3d_vectorization/Makefile
+++ b/example/Grid/3_gray_scott_3d_vectorization/Makefile
@@ -10,10 +10,10 @@ OBJ = main.o update_new.o
 	mpif90 -ffree-line-length-none -fno-range-check -fno-second-underscore  -fimplicit-none  -mavx -O3 -c -g -o $@ $<
 
 %.o: %.cpp
-	$(CC) -O3 -mavx  -g -c --std=c++11 -Wno-ignored-attributes  -o  $@ $< $(INCLUDE_PATH) -I/home/i-bird/VC/include
+	$(CC) -O3 -mavx  -g -c --std=c++11 -Wno-ignored-attributes  -o  $@ $< $(INCLUDE_PATH) -I/where/is/vc/installation/include
 
 gray_scott: $(OBJ)
-	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) -L/home/i-bird/VC/lib  -lVc
+	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) -L/where/is/vc/installation/lib  # -lVc (Add -lVc if you use VCDevel)
 
 all: gray_scott
 
diff --git a/example/Grid/3_gray_scott_3d_vectorization/main.cpp b/example/Grid/3_gray_scott_3d_vectorization/main.cpp
index 2bfc0809..ea40422e 100644
--- a/example/Grid/3_gray_scott_3d_vectorization/main.cpp
+++ b/example/Grid/3_gray_scott_3d_vectorization/main.cpp
@@ -117,12 +117,15 @@ void step(grid_dist_id<3, double, aggregate<double>> & OldU,
 		  grid_dist_id<3, double, aggregate<double>> & NewU,
 		  grid_dist_id<3, double, aggregate<double>> & NewV,
 		  grid_key_dx<3> (& star_stencil_3D)[7],
-		  Vc::double_v uFactor, Vc::double_v vFactor, double deltaT, double F, double K)
+		  double uFactor_s, double vFactor_s, double deltaT, double F, double K)
 {
 #ifndef FORTRAN_UPDATE
 
 	//! \cond [cpp_update] \endcond
 
+	Vc::double uFactor = uFactor_s;
+	Vc::double vFactor = vFactor_s;
+
 	WHILE_M(OldU,star_stencil_3D)
 			auto & U_old = GET_GRID_M(OldU);
 			auto & V_old = GET_GRID_M(OldV);
@@ -184,9 +187,6 @@ void step(grid_dist_id<3, double, aggregate<double>> & OldU,
 
 	//! \cond [fort_update] \endcond
 
-	double uFactor_s = uFactor[0];
-	double vFactor_s = vFactor[0];
-
 	auto & ginfo = OldU.getLocalGridsInfo();
 
 	for (size_t i = 0 ; i < OldU.getN_loc_grid() ; i++)
@@ -294,8 +294,8 @@ int main(int argc, char* argv[])
 
 	// because we assume that spacing[x] == spacing[y] we use formula 2
 	// and we calculate the prefactor of Eq 2
-	Vc::double_v uFactor = deltaT * du/(spacing[x]*spacing[x]);
-	Vc::double_v vFactor = deltaT * dv/(spacing[x]*spacing[x]);
+	double uFactor = deltaT * du/(spacing[x]*spacing[x]);
+	double vFactor = deltaT * dv/(spacing[x]*spacing[x]);
 
 	timer tot_sim;
 	tot_sim.start();
-- 
GitLab