<div dir="ltr"><div dir="ltr">On Tue, May 31, 2022 at 1:02 AM 冯宏磊 <<a href="mailto:12132391@mail.sustech.edu.cn">12132391@mail.sustech.edu.cn</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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></div></blockquote><div><br></div><div>If you want parallel HDF5, the package has to be compiled for parallelism. One way to do this is to have PETSc build it for you:</div><div><br></div><div>   --download-hdf5</div><div><br></div><div>in configure.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><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><u></u><div><font><br></font><font><br></font><font><br></font><font><br></font><div style="color:rgb(144,144,144);font-family:"Arial Narrow";font-size:12px"></div></div><div style="font-size:14px;font-family:Verdana;color:rgb(0,0,0)"><div><div style="width:305px;height:35px;line-height:35px;margin:20px 0px 0px"><img src="https://exmail.qq.com/cgi-bin/viewfile?type=logo&domain=mail.sustech.edu.cn"></div><div style="margin:10px 0px 0px"><h4 style="margin:0px;font-size:14px;font-weight:bold;line-height:28px;zoom:1">冯宏磊</h4><p style="margin:0px;line-height:22px;color:rgb(160,160,160)"></p><p style="margin:0px;line-height:22px;color:rgb(160,160,160)">南方科技大学/研究生/研究生2021级</p><p style="margin:0px;line-height:22px;color:rgb(160,160,160)"></p><p style="margin:0px;line-height:22px;color:rgb(160,160,160)">广东省深圳市南山区学苑大道1088号</p></div></div></div><u></u></div><div> </div><div><u></u><u></u></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>