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

Feature/mpi #53

Merged
merged 32 commits into from
Oct 1, 2024
Merged

Feature/mpi #53

merged 32 commits into from
Oct 1, 2024

Conversation

fluidnumerics-joe
Copy link
Member

@fluidnumerics-joe fluidnumerics-joe commented Sep 13, 2024

Relates to Issue #51

This feature adds fully tested MPI implementations for scalars and vectors in 2-D and 3-D. The primary changes are in the SideExchange routines where asynchronous (isend/irecv) pt2pt messaging is used to send boundary data and receive into extboundary data. MPI+GPU implementations specifically assume that GPU Aware MPI is available and GPU pointers are used in the message passing.

We have also added parallel reduction for entropy calculation (global grid integration) and cleaned up the model API to make adding new models quite easy. Specifically, we have removed the need to be aware of loop ordering, MPI call requirements, or GPU acceleration requirements to be able to have a model implemented rather quickly. Further optimization for GPU platforms is possible from the first model specification, but is still quite reasonable out of the box.

This reduces the number of objects required to instantiate a model.
Instead, a user can simply enable domain decomposition during mesh
creation. At the moment, this option is provided only when reading in a
mesh.
@fluidnumerics-joe fluidnumerics-joe added the work-in-progress If this label is present, this issue or PR is a work in progress. label Sep 13, 2024
@fluidnumerics-joe fluidnumerics-joe self-assigned this Sep 13, 2024
@fluidnumerics-joe
Copy link
Member Author

There seems to be a problem with the nvhpc compiler - it terminates with SIGNAL 11 while compiling the src/SELF_MappedScalar_2D_t.f90 file and its unclear why. I've opened #55 to track this issue and I've disabled builds with nvhpc until we get some feedback from Nvidia on this.

Copy link
Member Author

@fluidnumerics-joe fluidnumerics-joe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a number of cleanup items we can do here. We will want to make note in #51 and in the v0.0.1 release notes that we have not explicitly tested meshes with flip=1 in 2-D and flip>=1 in 3-D, though these bits are coded up in a way we believe is correct.

We need to add documentation on how to build and verify OpenMPI with GPU-Awareness for ROCm and CUDA platforms in the docs/Learning/dependencies.md . Additionally, we will want to add documentation for developers on how the CMake build system checks for GPU awareness, should this ever need to be updated/patched in the future.

Last, add an example for advection-diffusion-2d and advection-diffusion-3d and include a short writeup for each in the documentation that demonstrates how to run this in single-domain and multi-domain mode.

src/SELF_DGModel2D_t.f90 Outdated Show resolved Hide resolved
src/SELF_DGModel1D_t.f90 Outdated Show resolved Hide resolved
src/SELF_DGModel2D_t.f90 Show resolved Hide resolved
src/SELF_DGModel3D_t.f90 Show resolved Hide resolved
src/SELF_DGModel3D_t.f90 Show resolved Hide resolved
src/SELF_MappedScalar_2D_t.f90 Show resolved Hide resolved
src/SELF_MappedScalar_3D_t.f90 Outdated Show resolved Hide resolved
src/SELF_MappedScalar_3D_t.f90 Show resolved Hide resolved
src/SELF_MappedVector_2D_t.f90 Outdated Show resolved Hide resolved
src/cpu/SELF_DomainDecomposition.f90 Show resolved Hide resolved
@fluidnumerics-joe fluidnumerics-joe mentioned this pull request Sep 29, 2024
8 tasks
@fluidnumerics-joe
Copy link
Member Author

Some of the adjustments required for MPI have made it quite cumbersome for a user to add their own model. To remedy this, I'm going to finalize this PR with some adjustments to the backend routines that are provided for the FluxMethod, SourceMethod, and boundary conditions so that a user does not need to be aware of our preferred loop structure or how to exchange data over MPI; this meets the goal of keeping the barrier to entry low.

2-d and 3-d coming next

Also, updated the armory superci configuration file
The null models provide coverage for the built in template functions
that are supposed to provide no flux divergence and no source.

The null modules also provide a template for folks that want to build
their own models using SELF.
CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Collaborator

@garrettbyrd garrettbyrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No comments affect functionality; approved and ready to merge when/if you want to address cleanliness fixes.

@fluidnumerics-joe fluidnumerics-joe merged commit 60692f1 into main Oct 1, 2024
12 checks passed
@fluidnumerics-joe fluidnumerics-joe deleted the feature/mpi branch October 1, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work-in-progress If this label is present, this issue or PR is a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants