Skip to content

Commit

Permalink
Merge pull request #203 from UT-CHG/v2_master
Browse files Browse the repository at this point in the history
V2 master
  • Loading branch information
smattis committed May 26, 2016
2 parents 47725a2 + 4ab2ac1 commit c48fb2f
Show file tree
Hide file tree
Showing 69 changed files with 9,801 additions and 3,374 deletions.
33 changes: 19 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,27 @@ python:
#- "3.2"
#- "3.3"
#- "3.4"
# command to install dependencies

before_install:
- sudo apt-get install gfortran libblas-dev liblapack-dev mpich2 libmpich2-dev python-dev python-numpy python-scipy python-matplotlib python-nose python-pip
- pip install pyDOE mpi4py
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sudo apt-get install gfortran libblas-dev liblapack-dev mpich2 libmpich2-dev
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- conda update --yes conda

install:
- conda install --yes python=$TRAVIS_PYTHON_VERSION pip numpy scipy nose
- pip install pyDOE mpi4py
- python setup.py install

# install package:
- python setup.py install
# script to run before running tests
before_script:
- mkdir -p shippable/testresults
# command to run tests
script:
- nosetests --with-xunit --xunit-file=shippable/testresults/nosetests_mpi4py_serial.xml
- mpirun -n 2 nosetests --with-xunit --xunit-file=shippable/testresults/nosetests_mpi4py_parallel.xml
- pip uninstall -y mpi4py
- nosetests --with-xunit --xunit-file=shippable/testresults/nosetests_nompi4py.xml
- nosetests
- mpirun -n 2 nosetests
- pip uninstall -y mpi4py
- nosetests

# notification settings
notifications:
email:
Expand All @@ -34,4 +39,4 @@ notifications:
branches:
only:
- master

- v2_master
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ You will need to run sphinx-apidoc AND reinstall BET anytime a new module or met

Useful scripts are contained in ``examples/``

Tests
-----

To run tests in serial call::

nosetests tests

To run tests in parallel call::

mpirun -np NPROC nosetets tests

Dependencies
------------

Expand Down
13 changes: 12 additions & 1 deletion bet/Comm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2014-2015 The BET Development Team
# Copyright (C) 2014-2016 The BET Development Team

"""
This module provides a workaround for people without mpi4py installed
Expand All @@ -18,7 +18,9 @@ def __init__(self):
"""
Initialization
"""
#: size, 1
self.size = 1
#: rank, 0
self.rank = 0
pass

Expand Down Expand Up @@ -146,6 +148,11 @@ def Barrier(self):
"""
pass

def barrier(self):
"""
Does nothing in serial.
"""
pass

class MPI_for_no_mpi4py(object):

Expand All @@ -158,9 +165,13 @@ def __init__(self):
"""
Initialization
"""
#: fake sum
self.SUM = None
#: float type
self.DOUBLE = float
#: int type
self.INT = int
#: bool type
self.BOOL = bool

try:
Expand Down
7 changes: 5 additions & 2 deletions bet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2014-2015 The BET Development Team
# Copyright (C) 2014-2016 The BET Development Team

"""
Butler, Estep, Tavener Method
Expand All @@ -23,7 +23,10 @@
postProcess :mod:`~bet.postProcess` provides plotting tools and tools to sort
samples by probabilities.
sample :mod:`~bet.sample` provides data structures to store sets of samples and
their associated arrays.
"""

__all__ = ['sampling', 'calculateP', 'postProcess', 'sensitivity', 'util',
'Comm']
'Comm', 'sample']
Loading

0 comments on commit c48fb2f

Please sign in to comment.