-
Notifications
You must be signed in to change notification settings - Fork 578
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
Build failure with superlu_dist #103
Comments
I've run into problems like this before as well. If I recall correctly, the issue is ensuring you have all of the libraries correct for proper linking of superlu_dist. A configure test tries to compile and link and a short test code to determine which version of superlu_dist you have. If the link fails because the libraries aren't right, it will be confused as to which version you have (probably the configure logic should be a little smarter about this). I think I diagnosed this by looking at either CMakeFiles/CMakeError.log or CMakeFiles/CMakeOutput.log (I forget which) in your build directory. I think I added a line to Trilinos/cmake/TPLs/FindTPLSuperLUDist.cmake to make the configure stop after the configure test (otherwise it will keep going and overwrite the output from the test with later test output). -Eric From: Satish Balay <[email protected]mailto:[email protected]> We are seeing trilinos build failure [osx] when built with superlu_dist It appears that packages/amesos2/src/Amesos2_Superludist_TypeMaphpp is attempting to use both superlu_ddefsh and superlu_zdefsh at the same time - causing errors My understanding is - only one of them should be used - but not both cc:ing Sherry for clarification builderrortxthttps://githubcom/trilinos/Trilinos/files/105697/builderrortxt @bsmithhttps://github.com/bsmith@mcsanlgov Reply to this email directly or view it on GitHubhttps://github.com//issues/103. |
Hm - superlu_dist - by default builds both 'real' and 'complex' interfaces. From SRC/Makefile
So the trilinos/TEUCHOS cmake test checks and always enables the flag 'HAVE_TEUCHOS_COMPLEX'? Is this something we should set on cmake command line to enable or disable complex support? [or disable this test?]
Also the code attempting to use both includes - where it should use one or the other?
|
Well this broken build was with default OSX compilers.
However if I build with gcc-5 [from brew] - the build works.
Is this supposed to work with clang? Perhaps 'namespace' behaves differently with it? [and there should be check for it somewhere?] |
Amesos2 requires Tpetra, and Tpetra requires C++11. That version of the default OS X compiler uses the GCC 4.2.1 headers (scroll to the right of the "Configured with..." line), which are not new enough. |
Hm - trilinos works - if superlu/dist is not enabled. [presumably Tpetra is also build here] And I suspect Apple will never move away from GCC 4.2.1 headers. If this won't work - then trilinos cmake should check - and error out with a proper message? On Wed, 27 Jan 2016, Mark Hoemmen wrote:
|
BTW: What compilers are used in trilinos tests on OSX?
[I'm assuming trilinos is tested on OSX]
|
Default compiler on my Mac laptop is Clang 3.5. It works fine with C++11 and builds Trilinos just fine. mfh On Jan 27, 2016, at 10:51 PM, Satish Balay <[email protected]mailto:[email protected]> wrote: Hm - trilinos works - if superlu/dist is not enabled. [presumably Tpetra is also build here] And I suspect Apple will never move away from GCC 4.2.1 headers. If this won't work - then trilinos cmake should check - and error out with a proper message? On Wed, 27 Jan 2016, Mark Hoemmen wrote:
Reply to this email directly or view it on GitHubhttps://github.com//issues/103#issuecomment-175665440. |
The default mac compilers also include clang and clang++. If you switch your configure to use those instead of the gnu wrappers I suspect you will be able to get a successful build. I have been doing this recently on my mac, though I don't recall if I had packages that require C++11 enabled. |
To clarify: On OSX [starting with Xcode-5] - /usr/bin/gcc and /usr/bin/clang are the same 'clang' compiler [even though there are separate binaries]. This issue comes up with trilinos build with superlu_dist enabled with clang. A standalone trilinos build does not have this issue. Note: I get the same error with clang on OSX aswell as Linux. Builds with gcc on both OSX and linux complete without errors. The primary problem is with Superlu_dist - where one cannot use both superlu_ddefs.h and superlu_zdefs.h in the same source file. [So the primary fix should perhaps be in superlu/superlu_dist?] Trilinos [Amesos2_Superludist_TypeMap.hpp] tries to workarround this issue by using 'namespace' - and attempts to include both include files. I do not know if this is a valid workarround or buggy code. g++ gives warnings with this usage [but chuggs along]. However clang gives errors. Presumably the following is a test code demonstrating this usage of including superlu_ddefs.h and superlu_zdefs.h in Amesos2_Superludist_TypeMap.hpp
On Wed, 27 Jan 2016, Brent Perschbacher wrote:
|
Bah - formatting from e-mail is messed up - so refiling the info using the web interface To clarify: On OSX [starting with Xcode-5] - /usr/bin/gcc and /usr/bin/clang are the same 'clang' compiler [even though there are separate binaries]. This issue comes up with trilinos build with superlu_dist enabled with clang. A standalone trilinos build does not have this issue. Note: I get the same error with clang on OSX aswell as Linux. Builds with gcc on both OSX and linux complete without errors. The primary problem is with Superlu_dist - where one cannot use both superlu_ddefs.h and superlu_zdefs.h in the same source file. [So the primary fix should perhaps be in superlu/superlu_dist?] Trilinos [Amesos2_Superludist_TypeMap.hpp] tries to workarround this issue by using 'namespace' - and attempts to include both include files. I do not know if this is a valid g++ gives warnings with this usage [but chuggs along]. However clang gives errors. Presumably the following is a test code demonstrating this usage of including superlu_ddefs.h and superlu_zdefs.h in Amesos2_Superludist_TypeMap.hpp
|
Balay : Amesos2 supports double and complex version of SuperLU-Dist but it cannot do that it in the same build (because of conflicts in SuperLU-Dist). As you correctly observed setting -DHAVE_TEUCHOS_COMPLEX:BOOL=OFF if you don't need complex. @mhoemmen : Any ideas why Complex is ON by default ? Can we turn it off ? If you are ok with that option, I will close this issue. If you require support for both complex and double in the same build, then we need to request a change from SuperLU-Dist. |
There's a difference between "complex enabled in Teuchos" and "complex enabled in Tpetra and downstream packages." It is possible to enable complex in Teuchos, but not enable complex in Tpetra. The Teuchos option costs much less (build time, library and executable sizes, and tests' run time) than the Tpetra option. Furthermore, users get annoyed when they have to set some Teuchos option in order to get complex arithmetic in Tpetra. |
This is positively confusing even for developers even more confusing for users. Can we have a Trilinos_ENABLE_Complex and everything else derive from it ? Amesos2 uses Teuchos because that is what was standard when Amesos2 was written. If Tpetra depends on something else should I use that too ? What if they conflict ? One option will get rid of all these confusion. |
On Feb 20, 2016, at 4:42 PM, Siva Rajamanickam <[email protected]mailto:[email protected]> wrote: Can we have a Trilinos_ENABLE_Complex and everything else derive from it ? Teuchos_ENABLE_Complex should really be ON by default. In fact, it should not even exist as an option. The main effect for solver developers is that Teuchos::ScalarTraits works for std::complex, which it should do by default anyway. Would you mind filing an issue and CC'ing Ross and me? Ross might know whether enabling this by default could introduce some unforeseen complication, in particular for Thyra. Amesos2 uses Teuchos because that is what was standard when Amesos2 was written. If Tpetra depends on something else should I use that too ? What if they conflict ? One option will get rid of all these confusion. Tpetra's option for complex relates to ETI and the set of enabled Scalar types. Enabling that by default adds at least one Scalar type to the build. Tpetra's CMake logic explicitly forbids enabling complex if Teuchos_ENABLE_Complex is OFF. |
This issue has had no activity for 365 days and is marked for closure. It will be closed after an additional 30 days of inactivity. |
This issue was closed due to inactivity for 395 days. |
We are seeing trilinos build failure [osx] when built with superlu_dist. It appears that packages/amesos2/src/Amesos2_Superludist_TypeMap.hpp is attempting to use both superlu_ddefs.h and superlu_zdefs.h at the same time - causing errors. My understanding is - only one of them should be used - but not both. cc:ing Sherry for clarification.
builderror.txt
@[email protected]
@[email protected]
@[email protected]
The text was updated successfully, but these errors were encountered: