Welcome to the pytest-easyMPI package!
This package aims at making MPI code testing as similar to testing regular serial code as possible. In doing so hopefully the users of this plugin can focus more on writing tests of their MPI code and spend less time figuring out how to integrate MPI tests into their other test cases.
Short example
The following shows an example of how to combine a serial and a parallel test in a single test file. The parallel test is run using 4 MPI ranks:
from pytest_easyMPI import mpi_parallel
def test_serial():
assert True
@mpi_parallel(4)
def test_parallel():
# Import MPI only inside the test that needs it
# (to avoid spawning too many MPI communicators)
from mpi4py import MPI
data = MPI.COMM_WORLD.gather(MPI.COMM_WORLD.Get_rank())
if MPI.COMM_WORLD.Get_rank() == 0:
assert sum(range(MPI.COMM_WORLD.Get_size())) == sum(data)
The test can then be run by calling:
pytest
Metadata
Release files for pytest-easyMPI 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pytest-easyMPI-0.0.1.tar.gz | 9.0 kB | Without provenance | Details |
Release files / pytest-easyMPI-0.0.1.tar.gz
| Download URL | pytest-easyMPI-0.0.1.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d664cbc12643c37307ad5be1ded83145ec2b2b0d2686edaed7d5178661cd2d67
|
|
BLAKE2b-256 checksum How to use checksums |
c8a7378664b4f9bf9f059f43d8fe8eb6ca726be7c93a7fcccc5018605ac143be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.3
|
Security for pytest-easyMPI 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.