Index: /issm/trunk-jpl/src/c/classes/Elements/ElementHook.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/ElementHook.cpp	(revision 25522)
+++ /issm/trunk-jpl/src/c/classes/Elements/ElementHook.cpp	(revision 25523)
@@ -75,5 +75,5 @@
 
 	/*preliminary, before marshall starts: */
-	if(marshallhandle->OperationNumber()==MARSHALLING_WRITE || marshallhandle->OperationNumber()==MARSHALLING_SIZE){
+	if(marshallhandle->OperationNumber()!=MARSHALLING_LOAD){
 		if(this->hneighbors)hneighbors_null=false;
 		if(this->hnodes){
Index: /issm/trunk-jpl/src/c/classes/ExternalResults/GenericExternalResult.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/ExternalResults/GenericExternalResult.h	(revision 25522)
+++ /issm/trunk-jpl/src/c/classes/ExternalResults/GenericExternalResult.h	(revision 25523)
@@ -63,5 +63,5 @@
 			/*Marshal result name*/
 			int size = 0;
-			if(marshallhandle->OperationNumber()==MARSHALLING_WRITE || marshallhandle->OperationNumber() == MARSHALLING_SIZE) size=strlen(result_name)+1;
+			if(marshallhandle->OperationNumber()!=MARSHALLING_LOAD) size=strlen(result_name)+1;
 			marshallhandle->call(size);
 			marshallhandle->call(this->result_name,size);
@@ -70,5 +70,5 @@
 			this->value=0;
 			bool isnull=true;
-			if(marshallhandle->OperationNumber()==MARSHALLING_WRITE || marshallhandle->OperationNumber() == MARSHALLING_SIZE){
+			if(marshallhandle->OperationNumber()!=MARSHALLING_LOAD){
 				if(value) isnull=false;
 			}
@@ -168,8 +168,9 @@
 		} /*}}}*/
 		int ObjectEnum(void){ /*{{{*/
-			_error_("template ObjectEnum not implemented for this ResultType\n");
+			return GenericExternalResultEnum;
 		} /*}}}*/
 		void Marshall(MarshallHandle* marshallhandle){/*{{{*/
-			_error_("not implemented yet!"); 
+			_printf_("   WARNING: result "<<this->result_name<<" is a GenericExternalResult and cannot be marshalled (need overload)\n");
+			/*Nothing for now*/
 		} 
 		/*}}}*/
@@ -239,5 +240,5 @@
 } /*}}}*/
 template <> inline void GenericExternalResult<bool>::Marshall(MarshallHandle* marshallhandle){/*{{{*/
-
+	printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__); 
 	this->GenericMarshall(marshallhandle);
 
@@ -256,4 +257,5 @@
 } /*}}}*/
 template <> inline void GenericExternalResult<int>::Marshall(MarshallHandle* marshallhandle){/*{{{*/
+	printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__); 
 	this->GenericMarshall(marshallhandle);
 }  /*}}}*/
@@ -274,4 +276,5 @@
 } /*}}}*/
 template <> inline void GenericExternalResult<double>::Marshall(MarshallHandle* marshallhandle){/*{{{*/
+	printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__); 
 	this->GenericMarshall(marshallhandle);
 }  /*}}}*/
@@ -343,13 +346,8 @@
 } /*}}}*/
 template <> inline void GenericExternalResult<char*>::Marshall(MarshallHandle* marshallhandle){/*{{{*/
-
-	int size = 0;
-
-	if(marshallhandle->OperationNumber()==MARSHALLING_WRITE || marshallhandle->OperationNumber() == MARSHALLING_SIZE)size=strlen(value)+1;
-
+	printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__); 
 	marshallhandle->call(this->id);
 	marshallhandle->call(this->result_name);
-	marshallhandle->call(size);
-	marshallhandle->call(this->value,size);
+	marshallhandle->call(this->value);
 	marshallhandle->call(this->step);
 	marshallhandle->call(this->time);
@@ -473,4 +471,5 @@
 } /*}}}*/
 template <> inline void GenericExternalResult<int*>::Marshall(MarshallHandle* marshallhandle){/*{{{*/
+	printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__);
 
 	int object_enum = this->ObjectEnum();
@@ -606,4 +605,5 @@
 } /*}}}*/
 template <> inline void GenericExternalResult<IssmPDouble*>::Marshall(MarshallHandle* marshallhandle){/*{{{*/
+	printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__); 
 
 	int object_enum = this->ObjectEnum();
@@ -829,7 +829,5 @@
 	/*}}}*/
 	template <> inline void GenericExternalResult<Vector<IssmDouble>*>::Marshall(MarshallHandle* marshallhandle){/*{{{*/
-
 		_error_("GenericExternalResult instantiated for type Vector<IssmDouble>* called " << result_name << " not implemented yet");
-
 	}  /*}}}*/
 
Index: /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.cpp	(revision 25522)
+++ /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.cpp	(revision 25523)
@@ -122,5 +122,43 @@
 	int object_enum = ControlInputEnum;
    marshallhandle->call(object_enum);
-	_error_("Not implemented");
+
+   marshallhandle->call(this->control_id);
+	marshallhandle->call(this->enum_type);
+	marshallhandle->call(this->layout_enum);
+
+	/*Allocate memory*/
+	if(marshallhandle->OperationNumber()==MARSHALLING_LOAD){
+		switch(this->layout_enum){
+			case TriaInputEnum:
+				this->values     =new TriaInput();
+				this->savedvalues=new TriaInput();
+				this->minvalues  =new TriaInput();
+				this->maxvalues  =new TriaInput();
+				this->gradient   =new TriaInput();
+				break;
+			case PentaInputEnum:
+				this->values     =new PentaInput();
+				this->savedvalues=new PentaInput();
+				this->minvalues  =new PentaInput();
+				this->maxvalues  =new PentaInput();
+				this->gradient   =new PentaInput();
+				break;
+			case TransientInputEnum:
+				this->values     =new TransientInput();
+				this->savedvalues=new TransientInput();
+				this->minvalues  =new TransientInput();
+				this->maxvalues  =new TransientInput();
+				this->gradient   =new TransientInput();
+				break;
+			default:
+				_error_("Input of Enum \"" << EnumToStringx(this->layout_enum) << "\" not supported yet");
+		}
+	}
+
+	this->values->Marshall(marshallhandle);
+	this->savedvalues->Marshall(marshallhandle);
+	this->minvalues->Marshall(marshallhandle);
+	this->maxvalues->Marshall(marshallhandle);
+	this->gradient->Marshall(marshallhandle);
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp	(revision 25522)
+++ /issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp	(revision 25523)
@@ -87,5 +87,5 @@
    marshallhandle->call(object_enum);
 
-	if(marshallhandle->OperationNumber()==MARSHALLING_WRITE || marshallhandle->OperationNumber()==MARSHALLING_SIZE){
+	if(marshallhandle->OperationNumber()!=MARSHALLING_LOAD){
 
 		/*Marshall num_inputs first*/
@@ -137,4 +137,9 @@
 				this->inputs[index]=pentainput2;
 			}
+			else if(object_enum==ControlInputEnum){
+				ControlInput* input=new ControlInput();
+				input->Marshall(marshallhandle);
+				this->inputs[index]=input;
+			}
 			else{
 				_error_("input "<<EnumToStringx(object_enum)<<" not supported");
