<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div> Was PETSc ./configure with --download-hypre ? Send configure.log make.log and the full error message if you still have this failure.<div class=""><br class=""><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 23, 2022, at 9:35 AM, wang yuqi <<a href="mailto:yu1299885905@outlook.com" class="">yu1299885905@outlook.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: rgb(51, 51, 51); background-color: rgb(247, 248, 250);" class="">Thank you very much. The problem has been solved. But I have a new problem, when I use the PCHYPRESetType as follows:<o:p class=""></o:p></span></div><div class=""><div class=""><div class=""><div style="margin: 0cm; text-align: left; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""><span class="Apple-converted-space"> </span>PCHYPRESetType(pc,</span><span lang="EN-US" style="font-family: Consolas; color: rgb(206, 145, 120);" class="">'boomeramg'</span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">,ierr)<o:p class=""></o:p></span></div></div></div></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: rgb(51, 51, 51); background-color: rgb(247, 248, 250);" class="">The problem occurs at compile time:<o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: rgb(51, 51, 51); background-color: rgb(247, 248, 250);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: red; background-color: rgb(247, 248, 250);" class="">undefined reference to `pchypresettype_'<o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: rgb(51, 51, 51); background-color: rgb(247, 248, 250);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class="">I checked the PETSC manual, but couldn't find a reason.</span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: rgb(51, 51, 51); background-color: rgb(247, 248, 250);" class="">I look forward to hearing from you.</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: rgb(51, 51, 51); background-color: rgb(247, 248, 250);" class="">Thanks again!</span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class="">从<span lang="EN-US" class=""><span class="Apple-converted-space"> </span>Windows<span class="Apple-converted-space"> </span></span>版<span lang="EN-US" class=""><a href="https://go.microsoft.com/fwlink/?LinkId=550986" style="color: blue; text-decoration: underline;" class=""><span lang="EN-US" class=""><span lang="EN-US" class="">邮件</span></span></a></span>发送</div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-size: 12pt; font-family: SimSun;" class=""><o:p class=""> </o:p></span></div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; border: none; padding: 0cm;" class=""><b class="">发件人<span lang="EN-US" class="">:<span class="Apple-converted-space"> </span></span></b><span lang="EN-US" class=""><a href="mailto:bsmith@petsc.dev" style="color: blue; text-decoration: underline;" class="">Barry Smith</a><br class=""></span><b class="">发送时间<span lang="EN-US" class="">:<span class="Apple-converted-space"> </span></span></b><span lang="EN-US" class="">2022</span>年<span lang="EN-US" class="">5</span>月<span lang="EN-US" class="">23</span>日<span lang="EN-US" class=""><span class="Apple-converted-space"> </span>0:44<br class=""></span><b class="">收件人<span lang="EN-US" class="">:<span class="Apple-converted-space"> </span></span></b><span lang="EN-US" class=""><a href="mailto:yu1299885905@outlook.com" style="color: blue; text-decoration: underline;" class="">wang yuqi</a><br class=""></span><b class="">抄送<span lang="EN-US" class="">:<span class="Apple-converted-space"> </span></span></b><span lang="EN-US" class=""><a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;" class="">petsc-users@mcs.anl.gov</a><br class=""></span><b class="">主题<span lang="EN-US" class="">:<span class="Apple-converted-space"> </span></span></b><span lang="EN-US" class="">Re: [petsc-users] A compilation error about VecGetValues</span></div></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-size: 12pt; font-family: SimSun;" class=""><o:p class=""> </o:p></span></div><div class=""><div style="margin: 0cm; text-align: left; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class=""> This should work for at least the last three versions of PETSc. Please upgrade to the latest PETSc version and let us know if you continue to get this error message.</span></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class=""> Yes, for some PETSc versions between 3.8 and 3.14 it may generate this error message with some Fortran compilers.</span></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class=""> Barry</span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class=""><br class=""><br class=""></span></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class="">On May 21, 2022, at 9:23 AM, wang yuqi <<a href="mailto:yu1299885905@outlook.com" style="color: blue; text-decoration: underline;" class="">yu1299885905@outlook.com</a>> wrote:</span></div></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class=""> </span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class=""> <o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class="">从<span class="apple-converted-space"><span lang="EN-US" class=""> </span></span><span lang="EN-US" class="">Windows<span class="apple-converted-space"> </span></span>版<span lang="EN-US" class=""><a href="https://go.microsoft.com/fwlink/?LinkId=550986" style="color: blue; text-decoration: underline;" class=""><span lang="EN-US" class=""><span lang="EN-US" class="">邮件</span></span></a></span>发送<span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" class="">Hi, Dear developer:</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: rgb(51, 51, 51); background-color: rgb(247, 248, 250);" class="">I had compilation problems when using VecGetValues. My procedure is as follows:</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div style="margin: 0cm; text-align: left; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">program</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">main</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(86, 156, 214);" class="">#</span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">include</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(86, 156, 214);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(206, 145, 120);" class=""><petsc/finclude/petscvec.h></span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">use</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">petscvec</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div></div></div><div style="margin: 0cm; text-align: left; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> Vec x</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> PetscInt N,i,ione</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> PetscErrorCode ierr</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> PetscMPIInt rank</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> PetscScalar one</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">PetscInitialize(PETSC_NULL_CHARACTER,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">if</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">(ierr .ne.<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(181, 206, 168);" class="">0</span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">)<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">then</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">print</span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">*,</span><span lang="EN-US" style="font-family: Consolas; color: rgb(206, 145, 120);" class="">'PetscInitialize failed'</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">stop</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">endif</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> one =<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(181, 206, 168);" class="">1.0</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div></div></div><div class=""><div class=""><div class=""><div style="margin: 0cm; text-align: left; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> N = rank +<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(181, 206, 168);" class="">1</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">VecCreateMPI(PETSC_COMM_WORLD,N,PETSC_DECIDE,x,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">VecGetSize(x,N,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">VecSet(x,one,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div></div></div><div class=""><div class=""><div class=""><div style="margin: 0cm; text-align: left; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> ione =<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(181, 206, 168);" class="">1</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">do</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(181, 206, 168);" class="">100</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">i=</span><span lang="EN-US" style="font-family: Consolas; color: rgb(181, 206, 168);" class="">0</span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">,N-rank</span><span lang="EN-US" style="font-family: Consolas; color: rgb(181, 206, 168);" class="">-1</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">VecSetValues(x,ione,i,one,ADD_VALUES,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span><span lang="EN-US" style="font-family: Consolas; color: rgb(181, 206, 168);" class="">100</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">continue</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div></div></div><div class=""><div class=""><div class=""><div style="margin: 0cm; text-align: left; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">VecAssemblyBegin(x,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">VecAssemblyEnd(x,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">if</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">(rank .eq.<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(181, 206, 168);" class="">0</span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">)<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">then</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> ione =<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(181, 206, 168);" class="">0</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">VecGetValues(x,ione,i,one,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">endif</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">VecView(x,PETSC_VIEWER_STDOUT_WORLD,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">VecDestroy(x,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">call</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">PetscFinalize(ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(197, 134, 192);" class="">end PROGRAM</span><span class="apple-converted-space"><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span></span><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class="">main</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div></div></div><div style="margin: 0cm; text-align: left; font-size: 10.5pt; font-family: DengXian; line-height: 14.25pt; background-color: rgb(30, 30, 30);" class=""><span lang="EN-US" style="font-family: Consolas; color: rgb(212, 212, 212);" class=""> </span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: rgb(51, 51, 51); background-color: rgb(247, 248, 250);" class="">The compilation error is as follows:</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: red; background-color: rgb(247, 248, 250);" class="">mpif90 -I/root/soft/petsc/3.8.0/include -o ex2f.o ex2f.F90</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: red; background-color: rgb(247, 248, 250);" class="">ex2f.F90(62): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic. [C]</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: red; background-color: rgb(247, 248, 250);" class=""> call VecGetValues(x,ione,i,one,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: red; background-color: rgb(247, 248, 250);" class="">-------------^</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: red; background-color: rgb(247, 248, 250);" class="">ex2f.F90(62): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic. [D]</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: red; background-color: rgb(247, 248, 250);" class=""> call VecGetValues(x,ione,i,one,ierr)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: red; background-color: rgb(247, 248, 250);" class="">-------------^</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: red; background-color: rgb(247, 248, 250);" class="">compilation aborted for ex2f.F90 (code 1)</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: rgb(51, 51, 51); background-color: rgb(247, 248, 250);" class="">And this error only appears when the Petsc version is higher than 3.8.</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: rgb(51, 51, 51); background-color: rgb(247, 248, 250);" class="">I look forward to hearing from you.</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; text-align: justify; font-size: 10.5pt; font-family: DengXian;" class=""><span lang="EN-US" style="font-family: Tahoma, sans-serif; color: rgb(51, 51, 51); background-color: rgb(247, 248, 250);" class="">Thanks!</span></div></div></blockquote></div></div></div></div></div></blockquote></div><br class=""></div></div></body></html>