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

Matrix-free Schwarz tests fail in the absence of DTK #107

Closed
lxmota opened this issue Apr 11, 2017 · 3 comments
Closed

Matrix-free Schwarz tests fail in the absence of DTK #107

lxmota opened this issue Apr 11, 2017 · 3 comments
Assignees
Labels

Comments

@lxmota
Copy link
Contributor

lxmota commented Apr 11, 2017

The matrix-free Schwarz test that uses this file:

tests/large/LCM/Schwarz/Cubes/cubes_matrix-free.yaml

fails with a segmentation fault here:

src/LCM/evaluators/bc/SchwarzBC_Def.hpp#L254

in the absence of DTK.

I'm not sure if matrix-free Schwarz is supposed to work without DTK, so until there is confirmation one way or another, I'm opening this issue.

Also, this other test fails in the same way:

tests/large/LCM/CrystalPlasticity/SchwarzBar/matrixFree

@lxmota lxmota changed the title Matrix-free Schwarz test fails in the absence of DTK Matrix-free Schwarz tests fail in the absence of DTK Apr 11, 2017
@ikalash
Copy link
Collaborator

ikalash commented Apr 12, 2017

I have begun to look into this issue. It seems the reason this issue shows up w/o DTK is that when DTK is off, coupled_solution is obtained from the application via the getX() routine, whereas w/ DTK it is obtained from the STK discretization. Here is a backtrace of the error:

#1 0x00007fffd40326b9 in Tpetra::MultiVector<double, int, int, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial, Kokkos::HostSpace>, false>::get1dView (this=0xe2ecd0) at /home/ikalash/Trilinos/packages/tpetra/core/src/Tpetra_MultiVector_def.hpp:3719
#2 0x00007ffff2ca7e8b in LCM::SchwarzBC_Base<PHAL::AlbanyTraits::Residual, PHAL::AlbanyTraits>::computeBCs (this=0xa28420, ns_node=0,
x_val=@0x7fffffff3f58: 7.2551919556468696e-317, y_val=@0x7fffffff3f50: 2.1219714434102453e-314,
z_val=@0x7fffffff3f48: 2.3099243825617678e-317) at /home/ikalash/Albany/src/LCM/evaluators/bc/SchwarzBC_Def.hpp:254
#3 0x00007ffff2ca3794 in LCM::fillResidual<LCM::SchwarzBC<PHAL::AlbanyTraits::Residual, PHAL::AlbanyTraits>,

get1DView() is failing (SchwarzBC_Def.hpp:254) b/c there is something wrong with coupled_solution when obtained from the application. I haven't figured out what yet (it is not null). Thought I would post this in case @lxmota , this rings any bells, since you wrote the getX() routine and relevant code in SchwarzBC_Def.hpp that uses this routine. I will continue looking into the issue.

@lxmota
Copy link
Contributor Author

lxmota commented Apr 13, 2017

This may be related to that other issue that I could not make DTK work with the TPetra vector that the getX() function returns. This is because the solution vector from STK and the one from getX(), although both TPetra vectors, have different template parameters.

The getX() function is trivial. It just returns a pointer:

https://github.com/gahansen/Albany/blob/master/src/Albany_Application.hpp#L1019

That pointer is passed to computeGlobalResidualImplT here:

https://github.com/gahansen/Albany/blob/master/src/Albany_Application.cpp#L1212

and copied here:

https://github.com/gahansen/Albany/blob/master/src/Albany_Application.cpp#L1263

so it just points to the solution that computeGlobalResidualImplT receives.

I'm not sure we want to spend too much time chasing this weird issue. The old Schwarz BC is now left in the code just for debugging, so I don't think it's critical that we make it work with matrix-free.

ikalash added a commit that referenced this issue Apr 13, 2017
setting of x_, xdot_, etc. using copy constructor from xT, xdotT, etc., rather
than setting pointers equal to each other.  With this fix, getX() returns a valid
pointer to a Tpetra_Vector, for which get1DView() works.
@ikalash
Copy link
Collaborator

ikalash commented Apr 13, 2017

Fixed this; see commit ee0dd11 .

@ikalash ikalash closed this as completed Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants