Skip to content
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

ROL_Ptr.hpp std::is_pointer compile error #2175

Closed
ibaned opened this issue Jan 19, 2018 · 10 comments
Closed

ROL_Ptr.hpp std::is_pointer compile error #2175

ibaned opened this issue Jan 19, 2018 · 10 comments
Labels
pkg: ROL type: bug The primary issue is a bug in Trilinos code or tests

Comments

@ibaned
Copy link
Contributor

ibaned commented Jan 19, 2018

@trilinos/rol
@trilinos/phalanx

Expectations

ROL headers should not cause compile errors when included in applications such as Albany.

Current Behavior

Building Albany gives the following compile error from ROL_Ptr.hpp:

build/TrilinosInstall/include/ROL_Ptr.hpp:71:8: error: partial specialization of 'struct std::is_pointer <Teuchos::RCP<PHX::DataLayout>>' after instantiation of 'struct std::is_pointer Teuchos::RCP<PHX::DataLayout>>' [-fpermissive]

https://my.cdash.org/viewBuildError.php?buildid=1353633

Motivation and Context

Albany cannot be compiled due to this error, including for nightly testing.

Definition of Done

This compile error should be fixed

@ibaned ibaned added type: bug The primary issue is a bug in Trilinos code or tests pkg: Phalanx pkg: ROL labels Jan 19, 2018
@ibaned
Copy link
Contributor Author

ibaned commented Jan 19, 2018

The code in question:

namespace std {

template<class T>
struct is_pointer<ROL::Ptr<T>> : public std::true_type { };

}

In general, I think specializing std::is_pointer is bad design. Why not just define ROL::is_pointer? We wouldn't want to break downstream code that assumes normal behavior of std::is_pointer. Note that std::is_pointer isn't even true for std::shared_ptr and others, so this really changes its meaning too much.

@ibaned
Copy link
Contributor Author

ibaned commented Jan 19, 2018

It looks like this has nothing to do with Phalanx, sorry for spamming the Phalanx team.

@dridzal
Copy link
Contributor

dridzal commented Jan 19, 2018

I absolutely agree with @ibaned . @gregvw , could you please comment on this? This is somewhat urgent.

@gregvw
Copy link
Contributor

gregvw commented Jan 19, 2018

This is vestigial code from initial experimentation that slipped through the cracks and needs to be removed. Pushed fix

@ibaned
Copy link
Contributor Author

ibaned commented Jan 19, 2018

@gregvw Thank you!
I don't see a commit in the Trilinos masterdevelop branch though.
Does ROL live in a separate repository and get snapshotted into Trilinos?

@dridzal
Copy link
Contributor

dridzal commented Jan 19, 2018

ROL is in a separate repo, HOWEVER it is not snapshotted, it is merged. I was about to start a test cycle to sync and merge. @ibaned , Is it safe to do so, or have you already pushed a fix in the Trilinos repo? This would cause a merge conflict.

@ibaned
Copy link
Contributor Author

ibaned commented Jan 19, 2018

@dridzal I didn't push anything directly, I just opened PR #2177. If you're going to do a test/sync/merge, then lets just ignore that PR and we should be fine.

@dridzal
Copy link
Contributor

dridzal commented Jan 20, 2018

Sounds good. I’ll start the process.

@dridzal
Copy link
Contributor

dridzal commented Jan 20, 2018

The fix by @gregvw should be in. Please let us know if this takes care of the Albany issue.

@ibaned
Copy link
Contributor Author

ibaned commented Jan 22, 2018

@dridzal @gregvw thank you, Albany seems to be compiling again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: ROL type: bug The primary issue is a bug in Trilinos code or tests
Projects
None yet
Development

No branches or pull requests

3 participants