Hi Roy, after making compilation flags identical, it works. Now I will change them one by one to see which one matters. Does this happen because of the code in header files? If yes, is it possible to avoid code in the header files?
You see, I'd prefer to keep libmesh always built in optimized mode and change flags for my application only. Also, I see that libmesh is using -O2 for the optimized mode. Why not -03? thank you, Michael. On 11/23/2016 1:31 PM, Roy Stogner wrote: > > On Wed, 23 Nov 2016, Michael Povolotskyi wrote: > >> My application is built with debug flags. Libmesh is built either >> with debug flags or without. > > Ah, hell. Yes, that could be your problem, depending on what you mean > by "debug flags". -DDEBUG changes parts of the libMesh API and ABI, > and -D_GLIBCXX_DEBUG changes big parts of the C++ ABI, so trying to > mix objects built with either flag and objects built without can cause > disasters at runtime. > > That still wouldn't explain why you're working fine with a devel-mode > libMesh library (which should be using the same ABI as opt), but at > this point we're deep into undefined behavior. People use the phrase > "nasal demons" to try to instill a sense of fear over what a compiler > interpreting undefined code is allowed to do to you, but demons aren't > nearly as scary as "code which doesn't work well enough for you to > use, but does work too well for you to debug". > --- > Roy ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users