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

Update for MPI_PARALLEL flag #203

Merged
merged 2 commits into from
Dec 5, 2024
Merged

Update for MPI_PARALLEL flag #203

merged 2 commits into from
Dec 5, 2024

Conversation

icui
Copy link
Collaborator

@icui icui commented Dec 2, 2024

Description

Please describe the changes/features in this pull request.

Issue Number

If there is an issue created for these changes, link it here

Checklist

Please make sure to check developer documentation on specfem docs.

[] I ran the code through pre-commit to check style
[] My code passes all the integration tests
[] I have added sufficient unittests to test my changes
[] I have added/updated documentation for the changes I am proposing
[] I have updated CMakeLists to ensure my code builds
[] My code builds across all platforms

Copy link
Collaborator

@lsawade lsawade left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -18,7 +18,10 @@ namespace MPI {
* Incase specfem is compiled without MPI then I need placeholders for reducer
* types
*/
enum reduce_type { sum = MPI_SUM, min = MPI_MIN, max = MPI_MAX };
using reduce_type = MPI_Op;
const MPI_Op sum = MPI_SUM;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you'd need constexpr static MPI_Op here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the compilation will fail when MPI is enabled if tis a const MPI_OP itd have it be a static variable. Constexpr since we already know it at compile time

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image
constexpr wouldn't compile

Copy link
Collaborator

@Rohit-Kakodkar Rohit-Kakodkar left a comment

Choose a reason for hiding this comment

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

Mentioned comments earlier

@icui
Copy link
Collaborator Author

icui commented Dec 3, 2024

retest please

@icui icui requested a review from Rohit-Kakodkar December 3, 2024 17:29
Copy link
Collaborator

@Rohit-Kakodkar Rohit-Kakodkar left a comment

Choose a reason for hiding this comment

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

LGTM

@icui icui mentioned this pull request Dec 3, 2024
@icui
Copy link
Collaborator Author

icui commented Dec 5, 2024

retest please

@Rohit-Kakodkar
Copy link
Collaborator

Retest this please

@Rohit-Kakodkar
Copy link
Collaborator

@icui the tests won’t rerun on this. Since it’s being merged into a ‘issue-*’ branch. You should merge this PR if ready

@icui icui merged commit 816d0be into issue-170 Dec 5, 2024
3 of 6 checks passed
@icui icui deleted the issue-198 branch December 5, 2024 22:37
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.

3 participants