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

fix copies to rank zero for correctness tests #531

Merged
merged 6 commits into from
Feb 7, 2024

Conversation

BenWibking
Copy link
Collaborator

@BenWibking BenWibking commented Feb 6, 2024

Description

This fixes parallel copies of particles and/or MultiFabs to rank zero so that they actually work. In this case, constructing a amrex::DistributionMapping must be done by explicitly setting it equal to {0}.

This is used when testing the correctness of the results for the HydroRichtmyerMeshkov and BinaryOrbitCIC tests.

Thanks to Andrew Myers for the fix.

Related issues

N/A

Checklist

Before this pull request can be reviewed, all of these tasks should be completed. Denote completed tasks with an x inside the square brackets [ ] in the Markdown source below:

  • I have added a description (see above).
  • I have added a link to any related issues see (see above).
  • I have read the Contributing Guide.
  • I have added tests for any new physics that this PR adds to the code.
  • I have tested this PR on my local computer and all tests pass.
  • I have manually triggered the GPU tests with the magic comment /azp run.
  • I have requested a reviewer for this PR.

@BenWibking
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@BenWibking
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@BenWibking
Copy link
Collaborator Author

The CUDA build fails with the error:

/tmp/bwibking/_work/1/s/src/HydroRichtmeyerMeshkov/test_hydro2d_rm.cpp:52:62: error: call of overloaded 'DistributionMapping(<brace-enclosed initializer list>)' is ambiguous
   52 |         amrex::DistributionMapping const localDistribution({0});
      |                                                              ^
/tmp/bwibking/_work/1/s/extern/amrex/Src/Base/AMReX_DistributionMapping.H:74:10: note: candidate: 'amrex::DistributionMapping::DistributionMapping(const amrex::BoxArray&, int)'
   74 |     explicit DistributionMapping (const BoxArray& boxes,
      |          ^~~~~~~~~~~~~~~~~~~
/tmp/bwibking/_work/1/s/extern/amrex/Src/Base/AMReX_DistributionMapping.H:72:10: note: candidate: 'amrex::DistributionMapping::DistributionMapping(amrex::Vector<int>&&)'
   72 |     explicit DistributionMapping (Vector<int>&& pmap) noexcept;
      |          ^~~~~~~~~~~~~~~~~~~
/tmp/bwibking/_work/1/s/extern/amrex/Src/Base/AMReX_DistributionMapping.H:71:10: note: candidate: 'amrex::DistributionMapping::DistributionMapping(const amrex::Vector<int>&)'
   71 |     explicit DistributionMapping (const Vector<int>& pmap);
      |          ^~~~~~~~~~~~~~~~~~~

@BenWibking
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@BenWibking
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@BenWibking
Copy link
Collaborator Author

@markkrumholz Can you review this PR?

@BenWibking BenWibking added this pull request to the merge queue Feb 7, 2024
Merged via the queue into development with commit a16b88f Feb 7, 2024
18 checks passed
@BenWibking BenWibking deleted the BenWibking/fix-copy-to-rank-zero branch February 8, 2024 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants