<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Dec 19, 2016 at 4:30 PM, Andreas Mang <span dir="ltr"><<a href="mailto:andreas@ices.utexas.edu" target="_blank">andreas@ices.utexas.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">Hey Satish:<div><br></div><div>Thanks for your help. I did not mention this, but it’s both for intel compilers (modules intel15 and intel17). I have not checked in detail. I think I’ll opt for your second suggestion. I do not want to introduce compiler specific defines excessively throughout my code.</div><div><br></div><div>Considering the error handling: Sorry for not being precise. I am referring to any of the examples in the documentation (I did not check all, obviously). Here are two:</div><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/pc/examples/tutorials/ex1.c.html" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>petsc-current/src/ksp/pc/<wbr>examples/tutorials/ex1.c.html</a></div><div><br></div><div>or a more sophisticated one:</div><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-current/src/tao/bound/examples/tutorials/plate2.c.html" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>petsc-current/src/tao/bound/<wbr>examples/tutorials/plate2.c.<wbr>html</a></div><div><br></div><div>None of these examples for user routines contain any CHKERRQ calls anymore.</div><div><br></div><div>A</div><div><br></div><div>[Metainfo: A student asked me why I use these; I explained and referred him to the documentation; we then discovered that the examples do not use the error handling any longer]</div><div><div class="gmail-h5"><div><span style="color:rgb(34,34,34)"></span></div></div></div></div></blockquote><div><br></div><div>Barry wrote a script that strips out the error checking from the HTML. Follow the link at the top to raw source:</div><div><br></div><div>    <a href="http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/pc/examples/tutorials/ex1.c">http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/pc/examples/tutorials/ex1.c</a></div><div><br></div><div>and it has error checking.</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 style="word-wrap:break-word"><div><div class="gmail-h5"><div><span style="color:rgb(34,34,34)"> </span><br></div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><div class="gmail-h5"><div></div><div><div>
</div>
<br><div><blockquote type="cite"><div>On Dec 19, 2016, at 4:09 PM, Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:</div><br class="gmail-m_-3390189437125660533Apple-interchange-newline"><div><div>PETSc code doesn't use classes - so we don't see this isssue.<br><br>One way to fix this is:<br><br>#undef #undef __FUNCT__<br><br>#if (__INTEL_COMPILER)<br>#define __FUNCT__ “ClassName::FunctionName”<br>#else<br>#define __FUNCT__ “FunctionName”<br>#endif<br><br>Alternative is to not do this check For compiles that define __func__<br>[like intel, gcc] __FUNCT__ is not used anyway. So perhaps the following<br>will work? [without having to modify petsc include files]<br><br>#undef PetscCheck__FUNCT__<br>#define PetscCheck__FUNCT__()<br><br>Wrt CHKERRQ() - which code are you refering to?<br><br>Satish<br><br>On Mon, 19 Dec 2016, Andreas Mang wrote:<br><br><blockquote type="cite">Hey guys:<br><br>I have some problems with the error handling. On my local machine (where I debug) I get a million warning messages if I do<br><br>#undef __FUNCT__<br>#define __FUNCT__ “ClassName::FunctionName”<br><br>(i.e., file.cpp:XXX: __FUNCT__=“ClassName::<wbr>FunctionName" does not agree with __func__=“FunctionName”)<br><br>If I run the same code using intel15 compilers it’s the opposite (which I discovered just now). That is, I get an error for<br><br>#undef __FUNCT__<br>#define __FUNCT__ “FunctionName”<br><br>(i.e., file.cpp:XXX: __FUNCT__=“FunctionName" does not agree with __func__=“ClassName::<wbr>FunctionName”)<br><br>I do like the error handling by PETSc. I think it’s quite helpful. Obviously, I can write my own stack trace but why bother if it’s already there. I did check your online documentation and I could no longer find these definitions in your code. So, should I just remove all of these definitions? Is there a quick fix? Is this depreciated? <br><br><br>Second of all, I saw you do no longer use error handling in your examples at all, i.e.,<br><br>ierr = FunctionCall(); CHKERRQ(ierr);<br><br>and friends have vanished. Why is that? Is it just to keep the examples simple or are you moving away from using these Macros for error handling.<br><br>I hope I did not miss any changes in this regard in one of your announcements. I could not find anything in the documentation.<br><br>Thanks<br>Andreas<br><br><br><br></blockquote></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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></div>