Index: /issm/trunk/src/c/parallel/CreateFemModel.cpp
===================================================================
--- /issm/trunk/src/c/parallel/CreateFemModel.cpp	(revision 556)
+++ /issm/trunk/src/c/parallel/CreateFemModel.cpp	(revision 557)
@@ -36,6 +36,10 @@
 
 	_printf_("   specifying analysis\n");
+	//specify analysis_type
 	model->analysis_type=(char*)xmalloc((strlen(analysis_type)+1)*sizeof(char)); strcpy(model->analysis_type,analysis_type);
-	model->sub_analysis_type=(char*)xmalloc((strlen(sub_analysis_type)+1)*sizeof(char)); strcpy(model->sub_analysis_type,sub_analysis_type);
+	//specify sub_analysis_type EXCEPT if thermal: we do not know if it is transient or steady yet (only the model knows)!!
+	if (strcmp(analysis_type,"thermal")!=0){
+		model->sub_analysis_type=(char*)xmalloc((strlen(sub_analysis_type)+1)*sizeof(char)); strcpy(model->sub_analysis_type,sub_analysis_type);
+	}
 
 	_printf_("   create datasets:\n");
Index: /issm/trunk/src/c/parallel/thermal.cpp
===================================================================
--- /issm/trunk/src/c/parallel/thermal.cpp	(revision 556)
+++ /issm/trunk/src/c/parallel/thermal.cpp	(revision 557)
@@ -30,6 +30,6 @@
 
 	/*initial velocity and pressure: */
-	Vec u_g=NULL;
-	Vec p_g=NULL;
+	double* u_g=NULL;
+	double* p_g=NULL;
 	double dt;
 	double ndt;
@@ -73,27 +73,70 @@
 
 	_printf_("initialize inputs:\n");
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok1\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
 	femmodels[0].parameters->FindParam((void*)&u_g,"u_g");
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok2\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
+
 	femmodels[0].parameters->FindParam((void*)&p_g,"p_g");
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok3\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
+
 	femmodels[0].parameters->FindParam((void*)&numberofnodes,"numberofnodes");
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok4\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
+
 	femmodels[0].parameters->FindParam((void*)&dt,"dt");
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok5\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
+
 	femmodels[0].parameters->FindParam((void*)&ndt,"ndt");
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok6\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
+
 	femmodels[0].parameters->FindParam((void*)&waitonlock,"waitonlock");
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok7\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
+
 	femmodels[0].parameters->FindParam((void*)&sub_analysis_type,"sub_analysis_type");
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"subana=%i\n",sub_analysis_type);
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
+
 	femmodels[0].parameters->FindParam((void*)&debug,"debug");
 
 	inputs=new ParameterInputs;
+
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"numberofnodes = %i\n",numberofnodes);
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
 	inputs->Add("velocity",u_g,3,numberofnodes);
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok1\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
+
 	inputs->Add("pressure",p_g,1,numberofnodes);
 	inputs->Add("dt",dt);
 
 	//erase velocities and pressure embedded in parameters
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok2\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
+
 	param=(Param*)femmodels[0].parameters->FindParamObject("u_g");
 	femmodels[0].parameters->DeleteObject((Object*)param);
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok3\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
+
 	param=(Param*)femmodels[0].parameters->FindParamObject("p_g");
 	femmodels[0].parameters->DeleteObject((Object*)param);
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok4\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
+
 	param=(Param*)femmodels[1].parameters->FindParamObject("u_g");
 	femmodels[1].parameters->DeleteObject((Object*)param);
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok5\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
+
 	param=(Param*)femmodels[1].parameters->FindParamObject("p_g");
 	femmodels[1].parameters->DeleteObject((Object*)param);
+	PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok6\n");
+	PetscSynchronizedFlush(MPI_COMM_WORLD);
 
 	if(sub_analysis_type==SteadyAnalysisEnum()){
@@ -154,5 +197,4 @@
 	PetscFinalize(); 
 
-
 	/*end module: */
 	MODULEEND();
@@ -160,3 +202,2 @@
 	return 0; //unix success return;
 }
-	
