Index: /issm/trunk-jpl/externalpackages/neopz/install.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/neopz/install.sh	(revision 22703)
+++ /issm/trunk-jpl/externalpackages/neopz/install.sh	(revision 22704)
@@ -23,12 +23,7 @@
 
 cd $PROJECT_SOURCE_DIR
-#Compile and install 
-if [ $# -eq 0 ]; then
-	make
-	make install
-else
-	make -j $1
-	make -j $1 install
-fi
+make
+make install
+
 cd $PROJECT_BINARY_DIR/pzlib
 mv lib ../
Index: /issm/trunk-jpl/m4/issm_options.m4
===================================================================
--- /issm/trunk-jpl/m4/issm_options.m4	(revision 22703)
+++ /issm/trunk-jpl/m4/issm_options.m4	(revision 22704)
@@ -1871,5 +1871,28 @@
 	if test "x$HAVE_NEOPZ" == "xyes"; then
 	  NEOPZLIB="$NEOPZ_ROOT/lib/libpz.a"
-     NEOPZINCL=-I"$NEOPZ_ROOT/include"
+     NEOPZINCL=" -I$NEOPZ_ROOT/include"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Analysis"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Common"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/External"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Frontal"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Geom"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Integral"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/LinearSolvers"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Material"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Matrix"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Mesh"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Multigrid"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/PerfUtil"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Post"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Pre"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Refine"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Save"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Shape"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/SpecialMaps"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/StrMatrix"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/SubStruct"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Topology"
+	  NEOPZINCL+=" -I$NEOPZ_ROOT/include/Util"
+	  CXXFLAGS+=" -std=c++11"
 	  AC_DEFINE([_HAVE_NEOPZ_],[1],[with NEOPZ in ISSM src])
 	  AC_SUBST([NEOPZINCL])
Index: /issm/trunk-jpl/src/c/classes/AdaptiveMeshRefinement.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/AdaptiveMeshRefinement.h	(revision 22703)
+++ /issm/trunk-jpl/src/c/classes/AdaptiveMeshRefinement.h	(revision 22704)
@@ -12,17 +12,5 @@
 
 /*NeoPZ includes*/
-/*REAL and STATE definitions, NeoPZ variables itapopo should be read by NeoPZ's config.h*/
-#ifndef REFPATTERNDIR
-	#define REFPATTERNDIR "/home/santos/trunk-jpl/externalpackages/neopz/install/include/refpatterns"
-#endif
-
-#ifndef REALdouble
-	#define REALdouble
-#endif
-
-#ifndef STATEdouble
-	#define STATEdouble
-#endif
-
+#include <pz_config.h>
 #include <pzreal.h>
 #include <pzgmesh.h>
Index: /issm/trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 22703)
+++ /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 22704)
@@ -5157,5 +5157,9 @@
 		if(newnumberofvertices<=0 || newnumberofelements<=0) _error_("Error in the ReMeshNeopz.");
 	}
-	else{
+
+	/*Send new mesh to others CPU*/
+	ISSM_MPI_Bcast(&newnumberofvertices,1,ISSM_MPI_INT,0,IssmComm::GetComm());
+	ISSM_MPI_Bcast(&newnumberofelements,1,ISSM_MPI_INT,0,IssmComm::GetComm());
+	if(my_rank){
 		newx=xNew<IssmDouble>(newnumberofvertices);
 		newy=xNew<IssmDouble>(newnumberofvertices);
@@ -5163,8 +5167,4 @@
 		newelementslist=xNew<int>(newnumberofelements*this->GetElementsWidth());
 	}
-
-	/*Send new mesh to others CPU*/
-	ISSM_MPI_Bcast(&newnumberofvertices,1,ISSM_MPI_INT,0,IssmComm::GetComm());
-	ISSM_MPI_Bcast(&newnumberofelements,1,ISSM_MPI_INT,0,IssmComm::GetComm());
 	ISSM_MPI_Bcast(newx,newnumberofvertices,ISSM_MPI_DOUBLE,0,IssmComm::GetComm());	
 	ISSM_MPI_Bcast(newy,newnumberofvertices,ISSM_MPI_DOUBLE,0,IssmComm::GetComm());	
