Comments (16)
Hi Nico,
That's a big can of worms. Albany has a lot of circular dependencies. We
put the lib listing on the link line three times (though two ought to do
it) to resolve these.
May I ask why you're looking into these issues?
Cheers,
Andrew
On Fri, Apr 10, 2015 at 3:35 PM, Nico Schlömer [email protected]
wrote:
albanyLib uses symbols from albanySTK (e.g.,
Albany::STKDiscretization::getOwnedDOF) which in turn uses symbols from
albanyLib (e.g., createEpetraCommFromTeuchosComm). There's probably more.
How to best get this straight?—
Reply to this email directly or view it on GitHub
https://github.com/gahansen/Albany/issues/3.
from albany.
@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 -Wl,--no-undefined
which brought this up.
from albany.
Hi Nico,
Would it be enough to build with a basic but full configuration of Albany?
Something like this I think would be comprehensive:
cmake -DALBANY_TRILINOS_DIR:PATH=/path/to/trilinos/install
-DENABLE_LCM:BOOL=ON -DENABLE_HYDRIDE:BOOL=ON -DENABLE_FELIX:BOOL=ON
-DENABLE_AERAS:BOOL=ON -DENABLE_QCAD:BOOL=ON -DENABLE_MOR:BOOL=ON
-DENABLE_ATO:BOOL=ON -DENABLE_SEE:BOOL=ON -DENABLE_AMP:BOOL=ON ..
Cheers,
Andrew
On Sat, Apr 11, 2015 at 1:45 PM, Nico Schlömer [email protected]
wrote:
@ambrad https://github.com/ambrad I submitted a PR for TriBits (
TriBITSPub/TriBITS#60 TriBITSPub/TriBITS#60)
that changes Trilinos' exported CMake configuration files. To assert that
the change doesn't break anything, @bartlettroscoe
https://github.com/bartlettroscoe asked me to verify this against
Albany builds. To make sure that all symbols are still defined, I enabled
builds with -Wl,--no-undefined which brought this up.—
Reply to this email directly or view it on GitHub
https://github.com/gahansen/Albany/issues/3#issuecomment-91915121.
from albany.
Would it be enough to build with a basic but full configuration of Albany?
A standard build results in missing symbols from STK, for example, e.g.,
[...]
[ 96%] Built target albanySTKRebalance
Linking CXX executable Albany
[...]
disc/stk/libalbanySTK.so: undefined reference to `Ioss::Region::get_element_blocks() const'
Indeed, libalbanySTK
is underlinked since it requires symbols from Trilinos::STK, but doesn't link against them. To fix this, I had added -Wl,--no-undefined
which then showed those other errors.
from albany.
I managed to compile Albany now, but these dependency loops should still be fixed.
If libAlbany
and libAlbanySTK
mutually depend on each other such that you can't use one without the other, one may ask why they are separated into two different libraries in the first place. One relatively easy to implement fix for this is to just all all sources to libAlbany
.
from albany.
Hi Nico,
Is this a remaining issue, or can I close this one too?
Glen
from albany.
Why does Albany ha e circular dependencies?
from albany.
How do you do shared pin builds?
from albany.
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?
from albany.
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.
from albany.
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.
from albany.
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.
from albany.
Can't do circular shared libs
https://cmake.org/cmake/help/v3.3/command/target_link_libraries.html
from albany.
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 -Wl,--no-undefined
when Albany developers need to build/install Trilinos to use with Albany. It is just that the default development build of Trilinos will have this turned on by default.
from albany.
It is just that the default development build of Trilinos will have this turned on by default.
If trilinos/Trilinos#2 gets in, yes.
We just need to add a configure-time option for the TriBITS/Trilinos build to disable -Wl,--no-undefined when Albany developers need to build/install Trilinos to use with Albany.
The Albany build is separate from the Trilinos build, right? First you build Trilinos (with whatever compiler flags, -Wl,--no-undefined
& friends), install it, then build Albany with whatever other flags. Right?
from albany.
I am going to close this issue as we are addressing Albany's circular dependency concerns in the new issue #579 .
from albany.
Related Issues (20)
- Failing Tempus adjoint tests HOT 23
- Omega_h failures in warning-free build HOT 2
- Failing Perlmutter build with Omega_h enabled HOT 9
- Trilinos build error reported on Blake due to issue with Kokkos Macros HOT 5
- Albany warning-free array-bounds error on Blake HOT 1
- Kokkos::vector'is deprecated HOT 9
- Switch trilinos installations to use stk simple fields
- Tpetra CudaUVM flags for when Kokkos_ENABLE_CUDA_UVM goes away
- Undefined references when using new Cuda-UVM flags HOT 9
- Nightly test failures HOT 39
- corePDEs_SideSetLaplacian_3D failing on weaver after epetra removal HOT 6
- Clean up nightlies to turn off Epetra HOT 4
- PyAlbany MatrixOperations test failing in spack nightly HOT 18
- Attaway sems modules are broken, causing those tests to fail
- Failing PyAlbany test in spack nightly build HOT 4
- Failing nightly builds due to Omegah HOT 2
- Rework nightlies on CEE for new RHEL8 OS HOT 1
- Can not finish albany spack install since trilinos failed to be installed HOT 6
- Failing attaway nightlies due to Netcdf/Pnetcdf HOT 28
- Weaver failing nightlies HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from albany.