Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp	(revision 4887)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp	(revision 4888)
@@ -73,14 +73,18 @@
 	IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,"penalties");
 	
-	if(iomodel->numpenalties){
-		for(i=0;i<iomodel->numpenalties;i++){
-				
-			//if((iomodel->my_vertices[iomodel->penalties[2*i+0]]==1)){
-				penpair_ids[0]=(int)iomodel->penalties[2*i+0];
-				penpair_ids[1]=(int)iomodel->penalties[2*i+1];
+	for(i=0;i<iomodel->numpenalties;i++){
 
-				loads->AddObject(new Penpair(iomodel->loadcounter+count+1,&penpair_ids[0],DiagnosticHorizAnalysisEnum));
-				count++;
-			//}
+		if(iomodel->my_vertices[(int)iomodel->penalties[2*i+0]-1]){
+
+			/*In debugging mode, check that the second node is in the same cpu*/
+			ISSMASSERT(iomodel->my_vertices[(int)iomodel->penalties[2*i+1]-1]);
+
+			/*Get node ids*/
+			penpair_ids[0]=iomodel->nodecounter+(int)iomodel->penalties[2*i+0];
+			penpair_ids[1]=iomodel->nodecounter+(int)iomodel->penalties[2*i+1];
+
+			/*Create Load*/
+			loads->AddObject(new Penpair(iomodel->loadcounter+count+1,&penpair_ids[0],DiagnosticHorizAnalysisEnum));
+			count++;
 		}
 	}
@@ -96,12 +100,10 @@
 	IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
 	
-	if(iomodel->numrifts){
-		for(i=0;i<iomodel->numrifts;i++){
-				
-			if(iomodel->my_elements[(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+2)]){
+	for(i=0;i<iomodel->numrifts;i++){
 
-				loads->AddObject(new Riftfront(iomodel->loadcounter+count+1,i,iomodel,DiagnosticHorizAnalysisEnum));
-				count++;
-			}
+		if(iomodel->my_elements[(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+2)]){
+
+			loads->AddObject(new Riftfront(iomodel->loadcounter+count+1,i,iomodel,DiagnosticHorizAnalysisEnum));
+			count++;
 		}
 	}
Index: /issm/trunk/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 4887)
+++ /issm/trunk/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 4888)
@@ -110,4 +110,15 @@
 	xfree((void**)&iomodel->elements);
 
+	/*We might have penalties in which case, some vertices have to be cloned:
+	 * penpair has 2 nodes that are poointing toward 2 vertices.
+	 * The 2 vertices must be in the same cpu as the penpair*/
+	IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,"penalties");
+	for(i=0;i<iomodel->numpenalties;i++){
+		if(my_vertices[(int)iomodel->penalties[2*i+0]-1]){
+			my_vertices[(int)iomodel->penalties[2*i+1]-1]=true;
+		}
+	}
+	xfree((void**)&iomodel->penalties);
+
 	#ifdef _PARALLEL_
 		/*From the element partitioning, we can determine which vertices are on the inside of this cpu's 
