tomMoral / dicodile

Experiments for "Distributed Convolutional Dictionary Learning (DiCoDiLe): Pattern Discovery in Large Images and Signals"
https://tommoral.github.io/dicodile/
BSD 3-Clause "New" or "Revised" License
18 stars 10 forks source link

Fix worker problems emerging with mpirun #37

Closed hndgzkn closed 3 years ago

hndgzkn commented 3 years ago

Runs the tests using mpiexec -np 1 --host localhost:16 python -m pytest command.

Stops the workers after running dicodile.

codecov[bot] commented 3 years ago

Codecov Report

Merging #37 (8833ee4) into main (3aace8f) will increase coverage by 0.16%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #37      +/-   ##
==========================================
+ Coverage   74.46%   74.62%   +0.16%     
==========================================
  Files          43       43              
  Lines        2604     2609       +5     
==========================================
+ Hits         1939     1947       +8     
+ Misses        665      662       -3     
Flag Coverage Δ
unittests 74.62% <100.00%> (+0.16%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
dicodile/update_z/dicod.py 77.96% <ø> (ø)
dicodile/_dicodile.py 79.76% <100.00%> (+0.24%) :arrow_up:
dicodile/update_z/distributed_sparse_encoder.py 76.84% <100.00%> (+0.49%) :arrow_up:
.../update_z/tests/test_distributed_sparse_encoder.py 100.00% <100.00%> (ø)
dicodile/workers/reusable_workers.py 86.58% <100.00%> (+0.16%) :arrow_up:
dicodile/workers/dicod_worker.py 94.07% <0.00%> (+0.59%) :arrow_up:

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 3aace8f...8833ee4. Read the comment docs.

hndgzkn commented 3 years ago

@tomMoral we could not figure out why the coverage decreases after running the tests with mpirun.

But all tests run without problems with both using mpirun and without it.

hndgzkn commented 3 years ago

@tomMoral We still could not figure out the problem with coverage when run with mpirun. It cannot get coverage for functions run by spawned processes. So we decided to run tests with pytest and have coverage.

This pull request fixes the problems with unstopped workers.

We can try running tests with mpirun for testing mpich implementation.