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

Incorrect context matching in configuration checks #1966

Open
fsimonis opened this issue Feb 28, 2024 · 4 comments
Open

Incorrect context matching in configuration checks #1966

fsimonis opened this issue Feb 28, 2024 · 4 comments
Labels
bug preCICE does not behave the way we want and we should look into it (and fix it if possible) configuration Related to the preCICE configuration
Milestone

Comments

@fsimonis
Copy link
Member

Describe your setup

preCICE Version: 6552ffa (develop)

Describe the problem

In the configuration step, the local participant has an additional context including the local rank and the total amount of parallel ranks, analogous to MPI comm rank and size.

This size only makes sense to check, when the currently configured participant actually matches the local participant.

We use incomplete checks in:

  1. if (context.size == 1 && useTwoLevelInit) {
    throw std::runtime_error{"To use two-level initialization, both participants need to run in parallel. If you want to run in serial please switch two-level initialization off."};
    }

    Introduced in bacb133
  2. if (type == TYPE_AXIAL_GEOMETRIC_MULTISCALE && context.size > 1) {
    throw std::runtime_error{"Axial geometric multiscale mapping is not available for parallel participants."};
    }
    if (type == TYPE_RADIAL_GEOMETRIC_MULTISCALE && context.size > 1) {
    throw std::runtime_error{"Radial geometric multiscale mapping is not available for parallel participants."};
    }

    Introduced in 9245132
  3. ParticipantConfiguration: Meaningful mapping type disallowed #1965

Expected behaviour

Correctly check these conditions.

@fsimonis fsimonis added the bug preCICE does not behave the way we want and we should look into it (and fix it if possible) label Feb 28, 2024
@fsimonis fsimonis added this to the Version 3.x.x milestone Feb 28, 2024
@uekerman
Copy link
Member

  1. is not very wrong, but we could add the participant name. Only makes a difference if there are multiple m2ns.
  2. is indeed a bug.

@fsimonis
Copy link
Member Author

Looks like 2 needs to be checked somewhere else altogether. MappingConfiguration has no idea which Participant it is attached to.

@MakisH
Copy link
Member

MakisH commented Mar 1, 2024

Where would you suggest checking this?

This size only makes sense to check, when the currently configured participant actually matches the local participant.

I am not sure I understand: In which situation the currently configured would be different than the local?

@fsimonis
Copy link
Member Author

fsimonis commented Mar 1, 2024

In which situation the currently configured would be different than the local?

  • A coupled to B, B coupled to C.
  • A runs in parallel, B and C run in serial.
  • C uses a geometric multiscale mapping
  • Then participant A triggers this error.

I think this needs to be checked in the constructor of these Mappings for now. PRECICE_CHECK(!utils::IntraComm::isParallel(), "Not supported");

@fsimonis fsimonis added the configuration Related to the preCICE configuration label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug preCICE does not behave the way we want and we should look into it (and fix it if possible) configuration Related to the preCICE configuration
Projects
None yet
Development

No branches or pull requests

3 participants