Index: include/numerics/petsc_vector.h
===================================================================
--- include/numerics/petsc_vector.h	(revision 4213)
+++ include/numerics/petsc_vector.h	(working copy)
@@ -648,35 +648,35 @@
 
   /* We need to ask PETSc about the (local to global) ghost value
      mapping and create the inverse mapping out of it.  */
-  int ierr=0, petsc_size=0, petsc_local_size=0;
-  ierr = VecGetSize(_vec, &petsc_size);
-  CHKERRABORT(libMesh::COMM_WORLD,ierr);
+  int ierr=0;
+  int petsc_local_size=0;
   ierr = VecGetLocalSize(_vec, &petsc_local_size);
   CHKERRABORT(libMesh::COMM_WORLD,ierr);
 
-  /* \p petsc_local_size is the number of non-ghost values.  If it
-     equals the global size, then we are a serial vector, and there
-     are no ghost values.  */
-  if(petsc_size!=petsc_local_size)
+  /* Get the vector type from PETSc*/
+  VecType type;
+  ierr = VecGetType(_vec, &type);
+  CHKERRABORT(libMesh::COMM_WORLD,ierr);
+
+  if(strcmp(type,VECSHARED) || strcmp(type,VECMPI))
+  {
+    ISLocalToGlobalMapping mapping = _vec->mapping;
+
+    // If is a sparsely stored vector, set up our new mapping
+    if (mapping)
     {
-      ISLocalToGlobalMapping mapping = _vec->mapping;
-
-      // If is a sparsely stored vector, set up our new mapping
-      if (mapping)
-        {
-          const unsigned int local_size = static_cast<unsigned int>(petsc_local_size);
-          const unsigned int ghost_begin = static_cast<unsigned int>(petsc_local_size);
-          const unsigned int ghost_end = static_cast<unsigned int>(mapping->n);
-          for(unsigned int i=ghost_begin; i<ghost_end; i++)
-	    _global_to_local_map[mapping->indices[i]] = i-local_size;
-	  this->_type = GHOSTED;
-	}
-      else
-	this->_type = PARALLEL;
+      const unsigned int local_size = static_cast<unsigned int>(petsc_local_size);
+      const unsigned int ghost_begin = static_cast<unsigned int>(petsc_local_size);
+      const unsigned int ghost_end = static_cast<unsigned int>(mapping->n);
+      for(unsigned int i=ghost_begin; i<ghost_end; i++)
+        _global_to_local_map[mapping->indices[i]] = i-local_size;
+      this->_type = GHOSTED;
     }
+    else
+      this->_type = PARALLEL;
+  }
   else
     this->_type = SERIAL;
-
 }
 
 
Index: src/numerics/petsc_vector.C
===================================================================
--- src/numerics/petsc_vector.C	(revision 4213)
+++ src/numerics/petsc_vector.C	(working copy)
@@ -581,53 +581,53 @@
   libmesh_assert (this->size() == v.size());
   libmesh_assert (this->local_size() == v.local_size());
   libmesh_assert (v.closed());
-  this->_is_closed = true;
 
   int ierr = 0;
 
-  if((this->type()==PARALLEL) && (v.type()==GHOSTED))
-    {
-      /* Allow assignment of a ghosted to a parallel vector since this
-	 causes no difficulty.  See discussion in libmesh-devel of
-	 June 24, 2010.  */
-      ierr = VecCopy (v._vec, this->_vec);
-      CHKERRABORT(libMesh::COMM_WORLD,ierr);
-    }
+  if((this->type()==PARALLEL) && (v.type()==GHOSTED) || (this->type()==GHOSTED) && (v.type()==PARALLEL))
+  {
+    /* Allow assignment of a ghosted to a parallel vector since this
+       causes no difficulty.  See discussion in libmesh-devel of
+       June 24, 2010.  */
+    ierr = VecCopy (v._vec, this->_vec);
+    CHKERRABORT(libMesh::COMM_WORLD,ierr);
+  }
   else
+  {
+    /* In all other cases, we assert that both vectors are of equal
+       type.  */
+    libmesh_assert (this->_type == v._type);
+    libmesh_assert (this->_global_to_local_map == v._global_to_local_map);
+      
+    if (v.size() != 0)
     {
-      /* In all other cases, we assert that both vectors are of equal
-	 type.  */
-      libmesh_assert (this->_type == v._type);
-      libmesh_assert (this->_global_to_local_map ==
-		      v._global_to_local_map);
-      
-      if (v.size() != 0)
-	{
-	  if(this->type() != GHOSTED)
-	    {
-	      ierr = VecCopy (v._vec, this->_vec);
-	      CHKERRABORT(libMesh::COMM_WORLD,ierr);
+      if(this->type() != GHOSTED)
+      {
+        ierr = VecCopy (v._vec, this->_vec);
+        CHKERRABORT(libMesh::COMM_WORLD,ierr);
 	    }
-	  else
-	    {
-	      Vec loc_vec;
-	      Vec v_loc_vec;
-	      ierr = VecGhostGetLocalForm (_vec,&loc_vec);
-	      CHKERRABORT(libMesh::COMM_WORLD,ierr);
-	      ierr = VecGhostGetLocalForm (v._vec,&v_loc_vec);
-	      CHKERRABORT(libMesh::COMM_WORLD,ierr);
+      else
+      {
+        Vec loc_vec;
+        Vec v_loc_vec;
+        ierr = VecGhostGetLocalForm (_vec,&loc_vec);
+        CHKERRABORT(libMesh::COMM_WORLD,ierr);
+        ierr = VecGhostGetLocalForm (v._vec,&v_loc_vec);
+        CHKERRABORT(libMesh::COMM_WORLD,ierr);
 	      
-	      ierr = VecCopy (v_loc_vec, loc_vec);
-	      CHKERRABORT(libMesh::COMM_WORLD,ierr);
+        ierr = VecCopy (v_loc_vec, loc_vec);
+        CHKERRABORT(libMesh::COMM_WORLD,ierr);
 	      
-	      ierr = VecGhostRestoreLocalForm (v._vec,&v_loc_vec);
-	      CHKERRABORT(libMesh::COMM_WORLD,ierr);
-	      ierr = VecGhostRestoreLocalForm (_vec,&loc_vec);
-	      CHKERRABORT(libMesh::COMM_WORLD,ierr);
-	    }
-	}
+        ierr = VecGhostRestoreLocalForm (v._vec,&v_loc_vec);
+        CHKERRABORT(libMesh::COMM_WORLD,ierr);
+        ierr = VecGhostRestoreLocalForm (_vec,&loc_vec);
+        CHKERRABORT(libMesh::COMM_WORLD,ierr);
+      }
     }
-  
+  }
+
+  close();
+
   return *this;
 }
 
