diff --git a/.travis.yml b/.travis.yml index 997ea041..be0152d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -15,7 +22,7 @@ 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 @@ -23,9 +30,10 @@ install: - 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 diff --git a/spotpy/examples/dds/dds_parallel.py b/spotpy/examples/dds/dds_parallel.py index 264bfa90..15af96d0 100644 --- a/spotpy/examples/dds/dds_parallel.py +++ b/spotpy/examples/dds/dds_parallel.py @@ -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) diff --git a/spotpy/examples/dds/dds_parallel_data.json b/spotpy/examples/dds/dds_parallel_data.json new file mode 100644 index 00000000..f3e7bcd8 --- /dev/null +++ b/spotpy/examples/dds/dds_parallel_data.json @@ -0,0 +1 @@ +{"dds_duration": [], "rep": [], "dds_like": []} \ No newline at end of file