Andrew, > I've been using the svn version of deal for a while now and have had > no problems compiling. About a week or two ago I did an svn update and > now I get the linking error below. I have not changed anything in my > Trilinos library. I have done a clean install from todays svn release > and still get the message. > > [...] > > > =====base=============debug======MT== Linking library: libbase.g.dylib > Undefined symbols: "dealii > ::GrowingVectorMemory<dealii::TrilinosWrappers::MPI::Vector>::pool", > [...]
Despite pondering about this for some time, I can't really think of a good solution for this. The short version of the story is this: - in lac/vector_memory.cc, we generate a memory pool for vectors that may be used in linear solvers, etc. - if we configure with Trilinos, such a memory pool is also generated for Trilinos vectors - in base/utilities.cc we initialize and finalize MPI. One thing we have noticed is that if one uses the vector memory pool with parallel (MPI) Trilinos vectors, then like any of the other memory pools the vectors will be de-allocated at the end of the program. However, since at the point these de-allocation functions run, MPI has already been terminated, the Trilinos vector destructors throw an exception. That's not terrible, after all the program is already winding down, but it's at best unpleasant to see the same error messages over and over again at the end of each program run. So what we do in base/utilities.cc is to de-allocate these variables by hand, before we terminate MPI. This strategy works just fine, but it introduces a dependency of libbase.so/dylib on liblac.so/dylib. On linux, this doesn't appear to be much of a problem, but it seems to be on mac os x, which only wants backward dependencies of all shared libraries on ones that come later on the command line -- this is one of the points where it shows that darwin is not a modern operating system :-( I can see two solutions that you may want to try: first, in your Makefile you probably current link with libdeal_II_Xd.dylib, liblac.dylib and libbase.dylib (in this order). Try linking with libdeal_II_Xd.dylib, liblac.dylib, libbase.dylib, liblac.dylib and libbase.dylib and see whether that helps. Alternatively, and this would be my preference, we may just skip the de-allocation on Mac OS X. To this end, what happens if you change line 585 in base/source/utilites.cc to read # if defined(DEAL_II_USE_TRILINOS) && !defined(__APPLE__) ? Does the linker error go away? If this works, let me know and I'll check that in with a comment. Best W. ------------------------------------------------------------------------- Wolfgang Bangerth email: [email protected] www: http://www.math.tamu.edu/~bangerth/ _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
