RadioAstronomySoftwareGroup / pyuvsim

A ultra-high precision package for simulating radio interferometers in python on compute clusters.
https://pyuvsim.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
43 stars 7 forks source link

Parallel test bug resolution #342

Closed aelanman closed 3 years ago

aelanman commented 3 years ago

Description

Generalizes parallel tests to run with different "root" processes. Writing this uncovered a bug in parallel pytest, which is also resolved here. Also adds a ParallelFlag class which isn't used, but might be useful. This provides a set of flags across all MPI processes which can be checked asynchronously by the root process.

Motivation and Context

Currently, parallelized tests which pass with Npus > 1 but fail with Npus == 1 will fail in general with pytest due to this bug. Ideally, the parallel marker means that a given test should be pass with the specified Npus, and whether or not it passes with Npus==1 is irrelevant.

Fixes #341

Types of changes

Checklist:

For all pull requests:

Bug fix checklist:

New feature checklist:

codecov[bot] commented 3 years ago

Codecov Report

Merging #342 (05237d1) into main (d701412) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #342   +/-   ##
=======================================
  Coverage   99.01%   99.01%           
=======================================
  Files          13       13           
  Lines        1931     1931           
=======================================
  Hits         1912     1912           
  Misses         19       19           
Impacted Files Coverage Δ
pyuvsim/utils.py 97.40% <ø> (ø)
pyuvsim/mpi.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d701412...05237d1. Read the comment docs.

aelanman commented 3 years ago

@mkolopanis I just didn't want to delete it after writing it, but it doesn't need to be there. I'll remove it.

mkolopanis commented 3 years ago

I totally understand that. Never fun to write something, then throw it away.