-
Notifications
You must be signed in to change notification settings - Fork 109
Bug fix in m_data_input.f90 #938
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
base: master
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug where MPI-specific code in m_data_input.f90
was still compiled when using --no-mpi
. It does so by wrapping the MPI helper subroutines and related declarations in #ifdef MFC_MPI
guards.
- Wrapped
s_setup_mpi_io_params
subroutine in an#ifdef MFC_MPI
block - Added
#ifdef MFC_MPI
around MPI declarations (status
,disp
) ins_read_ib_data_files
- Enclosed entire
s_read_parallel_conservative_data
subroutine within#ifdef MFC_MPI
Comments suppressed due to low confidence (2)
src/post_process/m_data_input.f90:433
- [nitpick] Since this
#ifdef
now controls compilation ofs_read_parallel_conservative_data
, add or update a CI test to ensure the subroutine is excluded when building with--no-mpi
to prevent accidental regressions.
#ifdef MFC_MPI
src/post_process/m_data_input.f90:111
- [nitpick] The subroutine
s_setup_mpi_io_params
has more than 6 parameters, exceeding the project guideline. Consider grouping related parameters into a derived type to reduce the argument count.
#ifdef MFC_MPI
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #938 +/- ##
=======================================
Coverage 43.71% 43.71%
=======================================
Files 68 68
Lines 18360 18360
Branches 2292 2292
=======================================
Hits 8026 8026
Misses 8945 8945
Partials 1389 1389 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
User description
Description
(#902) introduced a bug where whenever
--no-mpi
was utilized, mpi-specific variables/subroutines would still be present/used in m_data_input.f90. The PR attempts to fix it by re-arranging MFC_MPI if enclosures (#ifdef MFC_MPI .... #endif
). With the new changes,./mfc.sh build -t post_process --no-mpi
works nicely.PR Type
Bug fix
Description
Fixed MPI preprocessor directive placement in data input module
Resolved compilation issues when building with
--no-mpi
flagReorganized
#ifdef MFC_MPI
blocks to properly isolate MPI-specific codeChanges diagram
Changes walkthrough 📝
m_data_input.f90
Fix MPI preprocessor directive placement
src/post_process/m_data_input.f90
#ifdef MFC_MPI
directive befores_setup_mpi_io_params
subroutine#endif
after the subroutine#ifdef MFC_MPI
blocks ins_read_ib_data_files
s_read_parallel_conservative_data