From 31ccd93360981e67dfa98c9c3ec067fe122eaca3 Mon Sep 17 00:00:00 2001
From: Pietro Incardona <incardon@mpi-cbg.de>
Date: Tue, 15 Sep 2015 19:45:40 +0200
Subject: [PATCH] Fixing build system of pdata

---
 Makefile.am               |  2 +-
 configure.ac              | 13 ++++++++++---
 openfpm_vcluster          |  2 +-
 src/Grid/grid_dist_id.hpp |  4 ++--
 4 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 87061f4c..2a675a02 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = src vtk openfpm_data
+SUBDIRS = src vtk openfpm_data openfpm_io openfpm_devices openfpm_vcluster
 
 bin_PROGRAMS = 
diff --git a/configure.ac b/configure.ac
index 05265295..7ae1df55 100755
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,10 @@ AC_PREREQ(2.59)
 AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
 AC_CANONICAL_SYSTEM
 AC_CONFIG_SRCDIR([src/main.cpp])
-AC_CONFIG_SUBDIRS([openfpm_data])
+AC_CONFIG_SUBDIRS([openfpm_data openfpm_devices openfpm_vcluster openfpm_io])
+#### Adding --with-pdata
+ac_configure_args="$ac_configure_args --with-pdata=../../src"
+########################
 AM_INIT_AUTOMAKE
 AC_CONFIG_HEADER([src/config/config.h])
 m4_ifdef([ACX_PTHREAD],,[m4_include([m4/acx_pthread.m4])])
@@ -21,10 +24,14 @@ CXXFLAGS+=" --std=c++11 "
 NVCCFLAGS=" "
 INCLUDES_PATH=" "
 
-# Add openfpm_pdata to prefix forlder
-prefix="$prefix//openfpm_pdata"
+# Add openfpm_pdata to prefix folder
+base=$prefix
+prefix="$prefix/openfpm_pdata"
 echo "Installation dir is: $prefix"
 
+# Create a file with the install base folder
+echo "$base" > install_dir
+
 # Checks for programs.
 AC_PROG_CXX
 
diff --git a/openfpm_vcluster b/openfpm_vcluster
index e858a42b..9c35483a 160000
--- a/openfpm_vcluster
+++ b/openfpm_vcluster
@@ -1 +1 @@
-Subproject commit e858a42b603fb632696045edb35b41bcf286aa14
+Subproject commit 9c35483a5aed877c1b82b5befb5ed5f8f7cd548b
diff --git a/src/Grid/grid_dist_id.hpp b/src/Grid/grid_dist_id.hpp
index b04f9d3c..d1ba2c6d 100644
--- a/src/Grid/grid_dist_id.hpp
+++ b/src/Grid/grid_dist_id.hpp
@@ -883,7 +883,7 @@ public:
 	 * * grid_X.vtk Output each local grids for each local processor X
 	 * * internal_ghost_X.vtk Internal ghost boxes in grid units for the local processor X
 	 *
-	 * \param output directory where to put the files
+	 * \param output directory where to put the files + prefix
 	 *
 	 */
 	bool write(std::string output)
@@ -895,7 +895,7 @@ public:
 			Point<dim,St> offset = Point<dim,St>(gdb_ext.get(i).origin) * cd_sm.getCellBox().getP2();
 			vtk_g.add(loc_grid.get(i),offset,cd_sm.getCellBox().getP2(),gdb_ext.get(i).Dbox);
 		}
-		vtk_g.write(output + "/grid_" + std::to_string(v_cl.getProcessUnitID()) + ".vtk");
+		vtk_g.write(output + "_grid_" + std::to_string(v_cl.getProcessUnitID()) + ".vtk");
 
 		// Write internal ghost box
 		VTKWriter<openfpm::vector<::Box<dim,size_t>>,VECTOR_BOX> vtk_box1;
-- 
GitLab