<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hey Satish:<div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class=""><a href="http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/pc/examples/tutorials/ex1.c.html" class="">http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/pc/examples/tutorials/ex1.c.html</a></div><div class=""><br class=""></div><div class="">or a more sophisticated one:</div><div class=""><br class=""></div><div class=""><a href="http://www.mcs.anl.gov/petsc/petsc-current/src/tao/bound/examples/tutorials/plate2.c.html" class="">http://www.mcs.anl.gov/petsc/petsc-current/src/tao/bound/examples/tutorials/plate2.c.html</a></div><div class=""><br class=""></div><div class="">None of these examples for user routines contain any CHKERRQ calls anymore.</div><div class=""><br class=""></div><div class="">A</div><div class=""><br class=""></div><div class="">[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 class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class="">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Dec 19, 2016, at 4:09 PM, Satish Balay <<a href="mailto:balay@mcs.anl.gov" class="">balay@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">PETSc code doesn't use classes - so we don't see this isssue.<br class=""><br class="">One way to fix this is:<br class=""><br class="">#undef #undef __FUNCT__<br class=""><br class="">#if (__INTEL_COMPILER)<br class="">#define __FUNCT__ “ClassName::FunctionName”<br class="">#else<br class="">#define __FUNCT__ “FunctionName”<br class="">#endif<br class=""><br class="">Alternative is to not do this check For compiles that define __func__<br class="">[like intel, gcc] __FUNCT__ is not used anyway. So perhaps the following<br class="">will work? [without having to modify petsc include files]<br class=""><br class="">#undef PetscCheck__FUNCT__<br class="">#define PetscCheck__FUNCT__()<br class=""><br class="">Wrt CHKERRQ() - which code are you refering to?<br class=""><br class="">Satish<br class=""><br class="">On Mon, 19 Dec 2016, Andreas Mang wrote:<br class=""><br class=""><blockquote type="cite" class="">Hey guys:<br class=""><br class="">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 class=""><br class="">#undef __FUNCT__<br class="">#define __FUNCT__ “ClassName::FunctionName”<br class=""><br class="">(i.e., file.cpp:XXX: __FUNCT__=“ClassName::FunctionName" does not agree with __func__=“FunctionName”)<br class=""><br class="">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 class=""><br class="">#undef __FUNCT__<br class="">#define __FUNCT__ “FunctionName”<br class=""><br class="">(i.e., file.cpp:XXX: __FUNCT__=“FunctionName" does not agree with __func__=“ClassName::FunctionName”)<br class=""><br class="">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 class=""><br class=""><br class="">Second of all, I saw you do no longer use error handling in your examples at all, i.e.,<br class=""><br class="">ierr = FunctionCall(); CHKERRQ(ierr);<br class=""><br class="">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 class=""><br class="">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 class=""><br class="">Thanks<br class="">Andreas<br class=""><br class=""><br class=""><br class=""></blockquote></div></div></blockquote></div><br class=""></div></body></html>