-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cyclic dependencies #3
Comments
Hi Nico, That's a big can of worms. Albany has a lot of circular dependencies. We May I ask why you're looking into these issues? Cheers, On Fri, Apr 10, 2015 at 3:35 PM, Nico Schlömer [email protected]
|
@ambrad I submitted a PR for TriBits (TriBITSPub/TriBITS#60) that changes Trilinos' exported CMake configuration files. To assert that the change doesn't break anything, @bartlettroscoe asked me to verify this against Albany builds. To make sure that all symbols are still defined, I enabled builds with |
Hi Nico, Would it be enough to build with a basic but full configuration of Albany? cmake -DALBANY_TRILINOS_DIR:PATH=/path/to/trilinos/install Cheers, On Sat, Apr 11, 2015 at 1:45 PM, Nico Schlömer [email protected]
|
A standard build results in missing symbols from STK, for example, e.g.,
Indeed, |
I managed to compile Albany now, but these dependency loops should still be fixed. If |
Hi Nico, Is this a remaining issue, or can I close this one too? Glen |
Why does Albany ha e circular dependencies? |
How do you do shared pin builds? |
There was a point a few years ago where Glen discovered that dumping all Albany source into a single library caused an error that was fixed when braking it into multiple libraries. This occurred when he upgraded to a newer gcc (4.7 perhaps). We then broke albany into pieces based on directories (also projects), like libLCM and libQCAD, which led to circular dependencies. We fixed that by adding the libraries multiple times on the link line. Since this has not caused problems, we haven't seen the need to fix it. Is there a reason to? |
Why not just make Albany one big library since that is what it is anyway if you have circular dependencies? Then you can use shared libs. |
Albany works fine with shared builds, as far as I know. I think the opposite behaviors is true: that shared libs allow you to get away with circular dependencies without repeating them on the link line. I'm not sure if we would have the same problem that Glen saw before, like there was a limit of how many *.o's could be linked in a single library and we were exceeding it. Anyway, I'm curious if there is any harm in what we are doing currently. |
I don't recall the version of gcc - back at about 4.7 several users encountered a linking error with debug builds. I don't recall if it was a file size issue or a number of symbols issue, but we resolved it at the time by breaking the single library into multiple. The original reason for doing this probably no longer valid, but I don't know if anyone has looked at it again since then. |
Can't do circular shared libs https://cmake.org/cmake/help/v3.3/command/target_link_libraries.html |
Nico, I don't think we need to force Albany to clean this up (it is not really any of our business). We just need to add a configure-time option for the TriBITS/Trilinos build to disable |
If trilinos/Trilinos#2 gets in, yes.
The Albany build is separate from the Trilinos build, right? First you build Trilinos (with whatever compiler flags, |
This fixes a link error when building Albany LCM atop a Trilinos built with shared libraries. When LCM_TEST_EXES and ALBANY_BGL are true, LCM specifies its own target_link_libraries to its test executables such as PartitionTest (see src/LCM/CMakeLists.txt:426). When these are shared libraries, CMake removes duplicates and orders them according to the DAG is knows about. For the AlbanyT link line, albanySTKRebalance comes after albanySTK. However, before this commit their order would be reversed when building the LCM test executables, resulting in undefined references to rebalance symbols in albanySTK. After this commit the link succeeds. This is somewhat related to #3
this program triggers more of the circular dependencies in Albany that are only currently worked around by repeating static libraries. this is related to issue #3.
I am going to close this issue as we are addressing Albany's circular dependency concerns in the new issue #579 . |
albanyLib
uses symbols fromalbanySTK
(e.g.,Albany::STKDiscretization::getOwnedDOF
) which in turn uses symbols fromalbanyLib
(e.g.,createEpetraCommFromTeuchosComm
). There's probably more.How to best get this straight?
The text was updated successfully, but these errors were encountered: