On Wed, 24 Oct 2012, Kirk, Benjamin (JSC-EG311) wrote: > On Oct 24, 2012, at 9:41 AM, Roy Stogner <royst...@ices.utexas.edu> wrote: > >> If we take that default argument away, every single Parallel call in >> app code will have to be changed from something like >> "Parallel::max(a)" into something like "Parallel::max(a, >> mesh.get_libmesh().Communicator_World())", and that's a huge backwards >> compatibility breakage to hit users with. > > Wait - no. I meant I was simply going to take the default argument > away for development to find all the places *we* need to pass the > proper communicator. I would not commit that change, only use it as > a compile-time tool to find where we need to fix things (and > therefore have a LibMeshInit object) passed...
Oh, I understood your meaning - I was just pointing out that *I* saw some compelling reasons for considering taking the default argument away permanently, eventually. >> Maybe we could play some tricks with the global LibMeshInit* target to >> make extensions easier to debug? E.g. the first LibMeshInit object to >> be constructed sets that target from NULL to "this", but then any >> subsequent LibMeshInit objects set it back to NULL, so that if it ever >> mistakenly gets used in a multi-LibMeshInit application the result is >> an immediate and easily-diagnosed segfault rather than a subtle MPI >> error/deadlock. > > Sure - I like that idea. In fact, forget the segfault - stick a libmesh_assert() around the argument before using it and we can actually guarantee easy debugging even on systems which don't immediately segfault upon a NULL dereference. (Yes, I did use such a system once. "Let's allocate an extra page of user memory around 0x0, to prevent NULL dereferences from immediately crashing programs" probably sounded like a great idea to some OS designer who had enough good intentions to pave a road...) --- Roy ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel