Skip to content

Create MPI wrapper module#97

Merged
danielhollas merged 2 commits intomasterfrom
mod-mpi
Mar 30, 2022
Merged

Create MPI wrapper module#97
danielhollas merged 2 commits intomasterfrom
mod-mpi

Conversation

@danielhollas
Copy link
Copy Markdown
Contributor

The idea here is to centralize certain calls to MPI library in one place, with proper error handling.
This should reduce the amount of #ifdef USE_MPI throughout the codebase.

We also encapsule MPI initialization and finalization, and provide helper functions for error handling.

@danielhollas danielhollas added the refactor No functional changes, just refactoring or cleaning up the code. label Mar 29, 2022
@danielhollas danielhollas self-assigned this Mar 29, 2022
openmpi_build:
name: OpenMPI build
runs-on: ubuntu-18.04
timeout-minutes: 30
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I noticed lately that sometimes the OpenMPI job in Github Actions hangs when running the tests. I haven't been able to figure out why, since it seems to occur randomly. As a stopgap measure I add here a timeout so that we don't needlessly consume resources.

Comment thread src/init.F90
end if

if (en_restraint >= 1) then
call en_rest_init()
Copy link
Copy Markdown
Contributor Author

@danielhollas danielhollas Mar 29, 2022

Choose a reason for hiding this comment

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

I noticed that this init function is called before the natom is read from the XYZ file. So I think this would fail unless natom was provided in the input file. I moved the call later in the init. It would be nice to have a test for this functionality. 😊

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Whops, noted!

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 29, 2022

Codecov Report

Merging #97 (7a8795b) into master (f0ad0b6) will decrease coverage by 0.31%.
The diff coverage is 78.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #97      +/-   ##
==========================================
- Coverage   85.55%   85.24%   -0.32%     
==========================================
  Files          41       42       +1     
  Lines        5780     5821      +41     
==========================================
+ Hits         4945     4962      +17     
- Misses        835      859      +24     
Impacted Files Coverage Δ
src/en_restraint.F90 0.00% <0.00%> (ø)
src/force_tera.F90 92.53% <ø> (-2.99%) ⬇️
src/force_terash.F90 94.54% <ø> (ø)
src/tera_mpi_api.F90 88.88% <0.00%> (-10.59%) ⬇️
src/mpi_wrapper.F90 76.25% <76.25%> (ø)
src/abin.F90 91.60% <85.71%> (-0.65%) ⬇️
src/init.F90 74.47% <90.90%> (+1.80%) ⬆️
src/remd.F90 83.06% <100.00%> (+1.08%) ⬆️
src/water.F90 100.00% <100.00%> (ø)
... and 2 more

@danielhollas danielhollas requested a review from suchanj March 30, 2022 00:04
The idea here is to centralize certain calls
to MPI library in one place, with proper error handling.
This should reduce the amount of '#ifdef USE_MPI'
throughout the codebase.

We also encapsule MPI initialization and finalization,
and provide helper functions for error handling.

GHA: Set timeout for OpenMPI job, which lately
began intermittently hanging during e2etests.
@danielhollas danielhollas merged commit 3d8283b into master Mar 30, 2022
@danielhollas danielhollas deleted the mod-mpi branch March 30, 2022 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor No functional changes, just refactoring or cleaning up the code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants