<div><span style="font-family: "lucida Grande", Verdana;">my code is below:</span><br style="font-family: "lucida Grande", Verdana;"><span style="font-family: "lucida Grande", Verdana;">ierr = PetscViewerCreate(PETSC_COMM_WORLD,&h5);CHKERRQ(ierr);</span><br style="font-family: "lucida Grande", Verdana;"><span style="font-family: "lucida Grande", Verdana;">ierr = PetscViewerHDF5Open(PETSC_COMM_WORLD,"explicit.h5", FILE_MODE_WRITE, &h5);CHKERRQ(ierr); </span><br style="font-family: "lucida Grande", Verdana;"><span style="font-family: "lucida Grande", Verdana;">ierr = PetscObjectSetName((PetscObject) z, "explicit-vector");CHKERRQ(ierr); </span><br style="font-family: "lucida Grande", Verdana;"><span style="font-family: "lucida Grande", Verdana;">ierr = PetscObjectSetName((PetscObject) tem, "explicit-necess-data");CHKERRQ(ierr); </span><br style="font-family: "lucida Grande", Verdana;"><span style="font-family: "lucida Grande", Verdana;">ierr = VecView(tem, h5);CHKERRQ(ierr); </span><br style="font-family: "lucida Grande", Verdana;"><span style="font-family: "lucida Grande", Verdana;">ierr = VecView(z, h5);CHKERRQ(ierr); </span><br style="font-family: "lucida Grande", Verdana;"><span style="font-family: "lucida Grande", Verdana;">ierr = PetscViewerDestroy(&h5);CHKERRQ(ierr);</span><br style="font-family: "lucida Grande", Verdana;"><br>when I use 1 core run this, it can save the right answer.<br><br style="font-family: "lucida Grande", Verdana;"><span style="font-family: "lucida Grande", Verdana;">when I use 3 cores run this, it prints that :</span><br style="font-family: "lucida Grande", Verdana;"><span style="font-family: "lucida Grande", Verdana;">[0]PETSC ERROR: No support for this operation for this object type</span><br style="font-family: "lucida Grande", Verdana;"><span style="font-family: "lucida Grande", Verdana;">[0]PETSC ERROR: Cannot use parallel HDF5 viewer since the given HDF5 does not support parallel I/O (H5_HAVE_PARALLEL is unset)</span><br style="font-family: "lucida Grande", Verdana;"><br style="font-family: "lucida Grande", Verdana;"><span style="font-family: "lucida Grande", Verdana;">I don't know how to solve this problem.</span><br style="font-family: "lucida Grande", Verdana;"><br style="font-family: "lucida Grande", Verdana;"><font face="lucida Grande, Verdana">By the way, I use PETSc-3.16.6, HDF5-1.12.1, C for programming.</font></div><div><font><br></font></div><div><sign signid="99"><div><font><br></font><font><br></font><font><br></font><font><br></font><div style="color:#909090;font-family:Arial Narrow;font-size:12px"></div></div><div style="font-size:14px;font-family:Verdana;color:#000;"><div><div class="logo" style="width:305px;height:35px;line-height:35px;margin:20px 0 0 0;"><img src="https://exmail.qq.com/cgi-bin/viewfile?type=logo&domain=mail.sustech.edu.cn" onerror=""></div><div class="c_detail" style="margin:10px 0 0 0;"><h4 class="name" style="margin:0;font-size:14px;font-weight:bold;line-height:28px;zoom:1;">冯宏磊</h4><p class="position" style="margin:0;line-height:22px;color:#a0a0a0;"></p><p class="department" style="margin:0;line-height:22px;color:#a0a0a0;">南方科技大学/研究生/研究生2021级</p><p class="phone" style="margin:0;line-height:22px;color:#a0a0a0;"></p><p class="addr" style="margin:0;line-height:22px;color:#a0a0a0;">广东省深圳市南山区学苑大道1088号</p></div></div></div></sign></div><div> </div><div><tincludetail></tincludetail></div><!--<![endif]-->