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

Definitions of "l_copyOffsets" and "l_ghostOffsets" in LtsLayout.cpp #870

Open
Aangniu opened this issue May 31, 2023 · 2 comments
Open
Labels

Comments

@Aangniu
Copy link

Aangniu commented May 31, 2023

Describe the bug
In collecting the offsets to the beginning of the array of lts->cellLocalInformation, the ghost cluster sizes seem to be mixed up with copy cluster sizes. They are located here:
https://github.com/SeisSol/SeisSol/blob/master/src/Initializer/time_stepping/LtsLayout.cpp#L1255
https://github.com/SeisSol/SeisSol/blob/master/src/Initializer/time_stepping/LtsLayout.cpp#L1251

Expected behavior
The suggested changes are following

// ghost region offsets offsets relative to the absolute start of the lts setup
std::vector< std::vector< unsigned int > > l_ghostOffsets;
l_ghostOffsets.resize( m_clusteredGhost.size() );

// copy region offsets offsets relative to the absolute start of the lts setup
std::vector< std::vector< unsigned int > > l_copyOffsets;
l_copyOffsets.resize( m_clusteredCopy.size() );

Additional context
This change may not influence the behavior of the code very much, if any.

@Aangniu Aangniu added the bug label May 31, 2023
@davschneller
Copy link
Contributor

davschneller commented May 31, 2023

The two layers should have the same size: for each copy cell, we have a ghost cell and vice-versa, since the facet between them is shared between (exactly) two ranks.

Cf. also here: https://github.com/SeisSol/SeisSol/blob/master/src/Initializer/time_stepping/LtsLayout.cpp#L1044

That line is called before the getCellInformation.

@krenzland
Copy link
Contributor

Yup, should - it's still pretty unclear code IMO

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

3 participants