Skip to content
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

provide a test script for travis to test mpi #228

Merged
merged 2 commits into from
Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
language: python
python:
- "2.7"
- "3.5"
#- "2.7"
#- "3.5"
- "3.6"
- "3.7"

# command to install dependencies
# this ubuntu distribution has sure the libopenmpi-dev packages available
dist: bionic

# command to install dependencies
install:
- sudo apt-get update
- sudo apt install libopenmpi-dev openmpi-bin
- pip install mpi4py
- python setup.py install
- pip install coveralls
- pip install pathos
Expand All @@ -15,17 +22,18 @@ install:
- pip install scipy
- pip install click
- pip install deap
# Need to force pytest-cov to v2.6 as current version (2.6.1) is deprecated
# Need to force pytest-cov to v2.6 as current version (2.6.1) is deprecated and pytest:3.10.1
- pip install pytest==3.10.1 pytest-pep8 pytest-cov==2.6
# Use docutils to generate html describe
- pip install docutils
- pip install numba
- pip install tables



script:
- pip uninstall spotpy -y
- py.test spotpy/unittests/test_* --cov spotpy --cov-report term-missing -v

- mpirun -c 2 python spotpy/examples/dds/dds_parallel.py 10
after_success:
- coveralls
2 changes: 1 addition & 1 deletion spotpy/examples/dds/dds_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
print(dds_elapsed)

benchmarks_duration["dds_duration"].append(dds_elapsed)
benchmarks_duration["dds_like"].append(dds_sampler.status.objectivefunction)
benchmarks_duration["dds_like"].append(dds_sampler.status.objectivefunction_max)
benchmarks_duration["rep"].append(rep)

print(benchmarks_duration)
Expand Down
1 change: 1 addition & 0 deletions spotpy/examples/dds/dds_parallel_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"dds_duration": [], "rep": [], "dds_like": []}