From: Kirk, B. (JSC-EG311) <ben...@na...> - 2012-07-27 11:59:11
|
Cody - I'd definitely be interested in getting that code and making it something optional we can turn on from LibMeshInit. Thanks, -Ben On Jul 26, 2012, at 4:36 PM, "Cody Permann" <cod...@gm...> wrote: > On Thu, Jul 26, 2012 at 3:25 PM, Roy Stogner <roy...@ic...>wrote: > >> >> On Thu, 26 Jul 2012, Roy Stogner wrote: >> >>> I do like the idea of keeping this as a debug-mode check, but in that >>> case, could we just check for 0 directly rather than with that weird >>> "abs-less-than-min" construction, even in the Number==Real case? >> >> Alternatively, we could go nuts: in the LibMeshInit constructor, use >> fegetenv()/fesetexceptflag()/fesetenv() to turn on hardware floating >> point exceptions, for every arithmetic operation, everywhere. That >> ought to be more efficient per-test, in both software and speed, than >> using if(); and it ought to be much more thorough. >> > > Yeah we take a mixed approach in our software, We have a small set of > utility functions that we call to toggle the hardware flags but only in > Debug mode. We wrap routines of interest with calls to those utility > functions. The code for Mac/Linux is quite different for turning these > flags on/off so let us know if you decide to go this direction. We can > supply the Apple system calls as needed. > >> >> I don't think I'd want this on by default (see the previous discussion >> re: Ben and applications relying on NaN tests) but it might be a nice >> command-line option. > > > Yes agreed, probably not the desired default behavior. > Cody > > >> > > --- >> Roy >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Libmesh-users mailing list >> Lib...@li... >> https://lists.sourceforge.net/lists/listinfo/libmesh-users >> > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Libmesh-users mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libmesh-users |