<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="">Thanks.<div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 17, 2020, at 22:46, Dave May <<a href="mailto:dave.mayhem23@gmail.com" class="">dave.mayhem23@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><br class=""></div><div dir="ltr" class="">Please always use "reply-all" so that your messages go to the list.<br class="">This is standard mailing list etiquette. It is important to preserve<br class="">threading for people who find this discussion later and so that we do<br class="">not waste our time re-answering the same questions that have already<br class="">been answered in private side-conversations. You'll likely get an<br class="">answer faster that way too.</div><div dir="ltr" class=""><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 17 Apr 2020 at 09:20, huabel <<a href="mailto:hu.ds.abel@icloud.com" class="">hu.ds.abel@icloud.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class="">I have checked that manual, I mean why a new version release include old versions of petsc api, why not update them all to new version?</div></blockquote><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I understand now. I thought that the code you couldn't compile was something you wrote, however I now see it is actually living in the PETSc src tree.</div><div class="">I also note that PLogEvent.c also fails to compile for the same reason.</div><div class=""><br class=""></div><div class="">The fact the API change was not propagated throughout these two files in src/benchmarks (PetscMalloc.c and PLogEvent.c) is an oversight.<br class=""></div><div class=""><br class=""></div><div class="">I am surprised that this did not get caught as: <br class=""></div><div class="">(i) API changes are usually applied via smart scripting, <br class=""></div><div class="">(ii) I imagined that the regression testing would have picked this up issue.<br class=""></div><div class="">These files were also broken in v 3.12.</div><div class=""><br class=""></div><div class="">Thanks for the bug report.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class=""><div class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Apr 17, 2020, at 16:10, Dave May <<a href="mailto:dave.mayhem23@gmail.com" target="_blank" class="">dave.mayhem23@gmail.com</a>> wrote:</div><br class=""><div class=""><div class=""><div dir="auto" class="">Old versions of petsc had 3 args for this function, latest version expects 4 (as the compiler error indicates).</div></div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">When in doubt as to what these args are, please refer to the extensive man pages. You can find them all here</div><div dir="auto" class=""><br class=""></div><div dir="auto" class=""><div class=""><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/singleindex.html" target="_blank" class="">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/singleindex.html</a></div><br class=""></div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">The page you want for this func is here</div><div dir="auto" class=""><br class=""></div><div dir="auto" class=""><div class=""><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsHasName.html" target="_blank" class="">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsHasName.html</a></div><br class=""></div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Tip: It is wise to avoid performing a google search of the function name. It can bring you to the man page for an old version of petsc sometimes and this can lead to confusion. Best go directly to the URL above (or access the pages through the petsc web page) to ensure you are looking at the appropriate man pages</div><div dir="auto" class=""><br class=""></div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Thanks</div><div dir="auto" class="">Dave</div><div dir="auto" class=""><br class=""></div><div dir="auto" class=""><br class=""></div><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri 17. Apr 2020 at 09:43, huabel via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank" class="">petsc-users@mcs.anl.gov</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class=""><div class="">Dear PETSc users,</div><div class=""><br class=""></div><div class="">I’m learn some base for PETSc , compile file <span style="font-family:Menlo;font-size:11px" class="">src/benchmarks/</span><span style="font-family:Menlo;font-size:11px" class="">PetscMalloc.c , get next error. (</span><font face="Menlo" class=""><span style="font-size:11px" class="">Use PETSc 3.13.0)</span></font></div><div class=""><br class=""></div><div class="">>pwd</div><div class=""><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">src/benchmarks</span></div></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div class=""><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">>mpicc PetscMalloc.c </span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">PetscMalloc.c:53:49: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(180,36,25)" class=""><b class="">error: </b></span><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">too few arguments to function call, expected 4, have 3</b></span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> ierr = PetscOptionsHasName(NULL,"-malloc",&flg);CHKERRQ(ierr);</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(47,180,29)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class=""> ~~~~~~~~~~~~~~~~~~~ ^</b></span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">/usr/local/include/petscoptions.h:18:1: note: </b>'PetscOptionsHasName' declared here</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">PETSC_EXTERN PetscErrorCode PetscOptionsHasName(PetscOptions,const char[],const char[],PetscBool*);</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(47,180,29)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">^</b></span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">/usr/local/include/petscsys.h:106:24: note: </b>expanded from macro 'PETSC_EXTERN'</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""># define PETSC_EXTERN extern PETSC_VISIBILITY_PUBLIC</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(47,180,29)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class=""> ^</b></span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">1 error generated.</span></div></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> Thanks.</span></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> Abel </span></div></div></blockquote></div></div>
</div></blockquote></div><br class=""></div></div></blockquote></div></div>
</div></blockquote></div><br class=""></div></body></html>