Index: /issm/trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 26431)
+++ /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 26432)
@@ -2307,5 +2307,5 @@
 
 			#if defined(_HAVE_CODIPACK_)
-			auto& tape_codi = IssmDouble::getGlobalTape();
+			auto& tape_codi = IssmDouble::getTape();
 			#endif
 
@@ -2319,5 +2319,5 @@
 						tape_codi.registerOutput(output_value);
 						dependents[i] = output_value.getValue();
-						codi_global.output_indices.push_back(output_value.getGradientData());
+						codi_global.output_indices.push_back(output_value.getIdentifier());
 					#else
 						output_value>>=dependents[i];
Index: /issm/trunk-jpl/src/c/classes/IoModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/IoModel.cpp	(revision 26431)
+++ /issm/trunk-jpl/src/c/classes/IoModel.cpp	(revision 26432)
@@ -2065,7 +2065,7 @@
 				scalar=pscalar;
 			}
-			auto& tape_codi = IssmDouble::getGlobalTape();
+			auto& tape_codi = IssmDouble::getTape();
 			tape_codi.registerInput(scalar);
-			codi_global.input_indices.push_back(scalar.getGradientData());
+			codi_global.input_indices.push_back(scalar.getIdentifier());
 		#else
 			if(X){
@@ -2138,10 +2138,10 @@
 			#if defined(_HAVE_CODIPACK_)
 				// FIXME codi here we just assign instead of using "operator <<="
-				auto& tape_codi = IssmDouble::getGlobalTape();
+				auto& tape_codi = IssmDouble::getTape();
 				if(X){
 					for (int i=0;i<M*N;i++) {
 						matrix[i]=X[Xcount+i];
 						tape_codi.registerInput(matrix[i]);
-						codi_global.input_indices.push_back(matrix[i].getGradientData());
+						codi_global.input_indices.push_back(matrix[i].getIdentifier());
 					}
 				}
@@ -2150,5 +2150,5 @@
 						matrix[i]=buffer[i];
 						tape_codi.registerInput(matrix[i]);
-						codi_global.input_indices.push_back(matrix[i].getGradientData());
+						codi_global.input_indices.push_back(matrix[i].getIdentifier());
 					}
 				}
@@ -2963,5 +2963,5 @@
 		 * -> These parameters are not read for the CoDiPack ISSM version!
 		 */
-		auto& tape_codi = IssmDouble::getGlobalTape();
+		auto& tape_codi = IssmDouble::getTape();
 		tape_codi.setActive();
 		#if _AD_TAPE_ALLOC_
@@ -2976,5 +2976,5 @@
 		/*
 		std::stringstream out_s;
-		IssmDouble::getGlobalTape().printStatistics(out_s);
+		IssmDouble::getTape().printStatistics(out_s);
 		_printf0_("StartTrace::Tape Statistics	   : TapeAlloc count=[" << codi_allocn << "]\n" << out_s.str());
 		*/
Index: /issm/trunk-jpl/src/c/cores/ad_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/ad_core.cpp	(revision 26431)
+++ /issm/trunk-jpl/src/c/cores/ad_core.cpp	(revision 26432)
@@ -326,5 +326,5 @@
 
 			/*First, stop tracing: */
-			auto& tape_codi = IssmDouble::getGlobalTape();
+			auto& tape_codi = IssmDouble::getTape();
 			tape_codi.setPassive();
 
Index: /issm/trunk-jpl/src/c/cores/controladm1qn3_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/controladm1qn3_core.cpp	(revision 26431)
+++ /issm/trunk-jpl/src/c/cores/controladm1qn3_core.cpp	(revision 26432)
@@ -75,5 +75,5 @@
 		 * -> These parameters are not read for the CoDiPack ISSM version!
 		 */
-		auto& tape_codi = IssmDouble::getGlobalTape();
+		auto& tape_codi = IssmDouble::getTape();
 		tape_codi.setActive();
 		#if _AD_TAPE_ALLOC_
@@ -88,5 +88,5 @@
 		/*
 		std::stringstream out_s;
-		IssmDouble::getGlobalTape().printStatistics(out_s);
+		IssmDouble::getTape().printStatistics(out_s);
 		_printf0_("StartTrace::Tape Statistics	   : TapeAlloc count=[" << codi_allocn << "]\n" << out_s.str());
 		*/
@@ -153,5 +153,5 @@
 		#endif
 		std::stringstream out_s;
-		IssmDouble::getGlobalTape().printStatistics(out_s);
+		IssmDouble::getTape().printStatistics(out_s);
 		_printf0_("CoDiPack Profiling::Tape Statistics :\n" << out_s.str());
 		#endif
@@ -159,5 +159,5 @@
 
 	#elif defined(_HAVE_CODIPACK_)
-	auto& tape_codi = IssmDouble::getGlobalTape();
+	auto& tape_codi = IssmDouble::getTape();
 	tape_codi.setPassive();
 	if(VerboseAutodiff()){
@@ -239,5 +239,5 @@
 	}
 	#elif defined(_HAVE_CODIPACK_)
-	auto& tape_codi = IssmDouble::getGlobalTape();
+	auto& tape_codi = IssmDouble::getTape();
 	codi_global.input_indices.clear();
 	if(my_rank==0){
@@ -245,5 +245,5 @@
 			aX[i]=X[i];
 			tape_codi.registerInput(aX[i]);
-			codi_global.input_indices.push_back(aX[i].getGradientData());
+			codi_global.input_indices.push_back(aX[i].getIdentifier());
 		}
 	}
@@ -285,5 +285,5 @@
 			tape_codi.registerOutput(output_value);
 			dependents[i] = output_value.getValue();
-			codi_global.output_indices.push_back(output_value.getGradientData());
+			codi_global.output_indices.push_back(output_value.getIdentifier());
 
 			#elif defined(_HAVE_ADOLC_)
Index: /issm/trunk-jpl/src/c/cores/controlvalidation_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/controlvalidation_core.cpp	(revision 26431)
+++ /issm/trunk-jpl/src/c/cores/controlvalidation_core.cpp	(revision 26432)
@@ -50,5 +50,5 @@
 		 * -> These parameters are not read for the CoDiPack ISSM version!
 		 */
-		auto& tape_codi = IssmDouble::getGlobalTape();
+		auto& tape_codi = IssmDouble::getTape();
 		tape_codi.setActive();
 		#if _AD_TAPE_ALLOC_
@@ -63,5 +63,5 @@
 		/*
 		std::stringstream out_s;
-		IssmDouble::getGlobalTape().printStatistics(out_s);
+		IssmDouble::getTape().printStatistics(out_s);
 		_printf0_("StartTrace::Tape Statistics	   : TapeAlloc count=[" << codi_allocn << "]\n" << out_s.str());
 		*/
@@ -127,5 +127,5 @@
 		#endif
 		std::stringstream out_s;
-		IssmDouble::getGlobalTape().printStatistics(out_s);
+		IssmDouble::getTape().printStatistics(out_s);
 		_printf0_("CoDiPack Profiling::Tape Statistics :\n" << out_s.str());
 		#endif
@@ -133,5 +133,5 @@
 
 	#elif defined(_HAVE_CODIPACK_)
-	auto& tape_codi = IssmDouble::getGlobalTape();
+	auto& tape_codi = IssmDouble::getTape();
 	tape_codi.setPassive();
 	if(VerboseAutodiff()){
@@ -190,5 +190,5 @@
 	simul_starttrace2(femmodel);
 	IssmDouble* aX=xNew<IssmDouble>(n);
-	auto& tape_codi = IssmDouble::getGlobalTape();
+	auto& tape_codi = IssmDouble::getTape();
 	codi_global.input_indices.clear();
 	if(my_rank==0){
@@ -196,5 +196,5 @@
 			aX[i]=X0[i];
 			tape_codi.registerInput(aX[i]);
-			codi_global.input_indices.push_back(aX[i].getGradientData());
+			codi_global.input_indices.push_back(aX[i].getIdentifier());
 		}
 	}
@@ -230,5 +230,5 @@
 			tape_codi.registerOutput(output_value);
 			dependents[i] = output_value.getValue();
-			codi_global.output_indices.push_back(output_value.getGradientData());
+			codi_global.output_indices.push_back(output_value.getIdentifier());
 			J+=output_value;
 		}
Index: /issm/trunk-jpl/src/c/cores/transient_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/transient_core.cpp	(revision 26431)
+++ /issm/trunk-jpl/src/c/cores/transient_core.cpp	(revision 26432)
@@ -374,5 +374,5 @@
 
 	/*Start tracing*/
-	auto& tape_codi = IssmDouble::getGlobalTape();
+	auto& tape_codi = IssmDouble::getTape();
 	tape_codi.setActive();
 
Index: /issm/trunk-jpl/src/c/shared/io/Marshalling/Marshalling.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/io/Marshalling/Marshalling.cpp	(revision 26431)
+++ /issm/trunk-jpl/src/c/shared/io/Marshalling/Marshalling.cpp	(revision 26432)
@@ -75,5 +75,5 @@
 	this->identifiers  = identifiers_in;
 	this->size_max         = size_max_in;
-	this->tape_codi    = &(IssmDouble::getGlobalTape());
+	this->tape_codi    = &(IssmDouble::getTape());
 }/*}}}*/
 void RegisterInputFunctor::Echo(void){/*{{{*/
@@ -84,5 +84,5 @@
 	_assert_(this->double_count<size_max);
 	this->tape_codi->registerInput(value);
-	this->identifiers[this->double_count] = value.getGradientData();
+	this->identifiers[this->double_count] = value.getIdentifier();
 	this->double_count++;
 }/*}}}*/
@@ -92,5 +92,5 @@
 			_assert_(this->double_count<size_max);
 			this->tape_codi->registerInput(value[i]);
-			this->identifiers[this->double_count] = value[i].getGradientData();
+			this->identifiers[this->double_count] = value[i].getIdentifier();
 			this->double_count++;
 		}
@@ -100,5 +100,5 @@
 RegisterOutputFunctor::RegisterOutputFunctor(void) : MarshallHandle(AD_REGISTEROUTPUT){/*{{{*/
 	this->double_count = 0;
-	this->tape_codi    = &(IssmDouble::getGlobalTape());
+	this->tape_codi    = &(IssmDouble::getTape());
 }/*}}}*/
 void RegisterOutputFunctor::Echo(void){/*{{{*/
@@ -121,5 +121,5 @@
 SetAdjointFunctor::SetAdjointFunctor(double* adjoint_in,int size_max_in) : MarshallHandle(AD_SETADJOINT){/*{{{*/
 	this->double_count = 0;
-	this->tape_codi    = &(IssmDouble::getGlobalTape());
+	this->tape_codi    = &(IssmDouble::getTape());
 	this->adjoint      = adjoint_in;
 	this->size_max     = size_max_in;
Index: /issm/trunk-jpl/src/c/shared/io/Marshalling/Marshalling.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/io/Marshalling/Marshalling.h	(revision 26431)
+++ /issm/trunk-jpl/src/c/shared/io/Marshalling/Marshalling.h	(revision 26432)
@@ -128,5 +128,5 @@
 		int *identifiers;
 		int  size_max;
-		IssmDouble::TapeType *tape_codi;
+		IssmDouble::Tape *tape_codi;
 
 	public:
@@ -142,5 +142,5 @@
 	private:
 		int   double_count;
-		IssmDouble::TapeType* tape_codi;
+		IssmDouble::Tape* tape_codi;
 
 	public:
@@ -157,5 +157,5 @@
 		int                   double_count;
 		int                   size_max;
-		IssmDouble::TapeType* tape_codi;
+		IssmDouble::Tape* tape_codi;
 		double*               adjoint;
 
Index: /issm/trunk-jpl/src/c/toolkits/codipack/CoDiPackCommon.hpp
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/codipack/CoDiPackCommon.hpp	(revision 26431)
+++ /issm/trunk-jpl/src/c/toolkits/codipack/CoDiPackCommon.hpp	(revision 26432)
@@ -35,5 +35,5 @@
 inline void getVectorGradData(const Real* vec, Data* dataVec, int n) {
   for(int i = 0; i < n; ++i) {
-    dataVec[i]=vec[i].getGradientData();
+    dataVec[i]=vec[i].getIdentifier();
   }
 }
@@ -43,5 +43,5 @@
   for(int i = 0; i < n; ++i) {
     pasVec[i]=vec[i].getValue();
-    dataVec[i]=vec[i].getGradientData();
+    dataVec[i]=vec[i].getIdentifier();
   }
 }
@@ -50,14 +50,14 @@
 inline void getPrimalAndGradData(const Real& value, Passive& pas, Data& data) {
   pas=value.getValue();
-  data=value.getGradientData();
+  data=value.getIdentifier();
 }
 
 template<typename Real, typename Data>
 inline void registerVector(Real* vec, Data* dataVec, int n) {
-  typename Real::TapeType& tape = Real::getGlobalTape();
+  typename Real::TapeType& tape = Real::getTape();
 
   for(int i = 0; i < n; ++i) {
     tape.registerInput(vec[i]);
-    dataVec[i]=vec[i].getGradientData();
+    dataVec[i]=vec[i].getIdentifier();
   }
 }
Index: /issm/trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp	(revision 26431)
+++ /issm/trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp	(revision 26432)
@@ -258,6 +258,6 @@
 	/*recast data_in and tape*/
 	codi::DataStore* data = (codi::DataStore*)data_in;
-	//IssmDouble::TapeType& tape = (IssmDouble::TapeType&)tape_in;
-	IssmDouble::TapeType& tape = IssmDouble::getGlobalTape();
+	//IssmDouble::Tape& tape = (IssmDouble::Tape&)tape_in;
+	IssmDouble::Tape& tape = IssmDouble::getTape();
 
   IssmDouble::Real* valueATrans;
@@ -277,8 +277,8 @@
 
   // create the adjoint vector for x and reset the adjoint values on the tape
-  IssmDouble::GradientValue* adjX = xNew<IssmDouble::GradientValue>(n);
+  IssmDouble::Gradient* adjX = xNew<IssmDouble::Gradient>(n);
   getVectorAdjoint(tape, indexX, adjX, n);
 
-  IssmDouble::GradientValue* sol  = xNew<IssmDouble::GradientValue>(n);
+  IssmDouble::Gradient* sol  = xNew<IssmDouble::Gradient>(n);
   SolverxSeq(sol, valueATrans, adjX, n);
 
@@ -324,5 +324,5 @@
 /*}}}*/
 void SolverxSeq(IssmDouble *X,IssmDouble *A,IssmDouble *B,int n, Parameters* parameters){/*{{{*/
-  IssmDouble::TapeType& tape = IssmDouble::getGlobalTape();
+  IssmDouble::Tape& tape = IssmDouble::getTape();
   codi::DataStore* dataHandler = NULL;
 
Index: /issm/trunk-jpl/src/c/toolkits/mpi/issmmpi.h
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/mpi/issmmpi.h	(revision 26431)
+++ /issm/trunk-jpl/src/c/toolkits/mpi/issmmpi.h	(revision 26432)
@@ -31,7 +31,9 @@
 			//#define AMPI_ADOUBLE TOOL::MPI_TYPE
 			//
+			//#include <codi/externals/codiMpiTypes.hpp>
+			//using MpiTypes = CoDiMpiTypes<IssmDouble>;
 			/*New implementation*/
-			#include <codi/externals/codiMpiTypes.hpp>
-			using MpiTypes = CoDiMpiTypes<IssmDouble>;
+			#include <codi/tools/mpi/codiMpiTypes.hpp>
+         using MpiTypes = codi::CoDiMpiTypes<IssmDouble>;
 			extern MpiTypes* mpiTypes;
 			#define AMPI_ADOUBLE mpiTypes->MPI_TYPE
Index: /issm/trunk-jpl/src/c/toolkits/mumps/MumpsSolve.cpp
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/mumps/MumpsSolve.cpp	(revision 26431)
+++ /issm/trunk-jpl/src/c/toolkits/mumps/MumpsSolve.cpp	(revision 26432)
@@ -489,6 +489,6 @@
 	/*recast data_in and tape*/
   codi::DataStore* data = (codi::DataStore*)data_in;
-  //IssmDouble::TapeType& tape = (IssmDouble::TapeType&)tape_in;
-  IssmDouble::TapeType& tape = IssmDouble::getGlobalTape();
+  //IssmDouble::Tape& tape = (IssmDouble::Tape&)tape_in;
+  IssmDouble::Tape& tape = IssmDouble::getTape();
 
 
@@ -518,5 +518,5 @@
 
   // create the adjoint vector for x and reset the adjoint values on the tape
-  IssmDouble::GradientValue* adjX = xNew<IssmDouble::GradientValue>(n);
+  IssmDouble::Gradient* adjX = xNew<IssmDouble::Gradient>(n);
   getVectorAdjoint(tape, indexX, adjX, n);
 
@@ -581,5 +581,5 @@
 /*}}}*/
 void MumpsSolve(int n,int nnz,int local_nnz,int* irn_loc,int* jcn_loc,IssmDouble *a_loc,IssmDouble *rhs,Parameters* parameters){/*{{{*/
-  IssmDouble::TapeType& tape = IssmDouble::getGlobalTape();
+  IssmDouble::Tape& tape = IssmDouble::getTape();
   codi::DataStore* dataHandler = NULL;
 
