From 9931154d5939d4c080a89b7995cf42de1af8c94b Mon Sep 17 00:00:00 2001 From: 1313e Date: Thu, 28 Mar 2019 18:52:21 +1100 Subject: [PATCH] Added the mpi4pyd requirement to the package. Changed several instances to use the new mpi4pyd package instead of the e13Tools package. --- .travis.yml | 6 +++++- prism/__init__.py | 5 +++-- prism/_internal.py | 8 +++----- requirements.txt | 3 ++- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 96722c0..f47808e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,4 +81,8 @@ deploy: tags: true notifications: - email: false + email: + recipients: + - evandervelden@swin.edu.au + on_success: change + on_failure: always diff --git a/prism/__init__.py b/prism/__init__.py index 6566448..0281521 100644 --- a/prism/__init__.py +++ b/prism/__init__.py @@ -29,8 +29,9 @@ import warnings # Package imports -from e13tools import (MPI as _MPI, aux_char_list, - compare_versions as _compare_versions, import_cmaps) +from e13tools import (aux_char_list, compare_versions as _compare_versions, + import_cmaps) +from mpi4pyd import MPI as _MPI # PRISM imports from .__version__ import prism_version as __version__ diff --git a/prism/_internal.py b/prism/_internal.py index ba3f864..35c03fb 100644 --- a/prism/_internal.py +++ b/prism/_internal.py @@ -21,9 +21,10 @@ from textwrap import dedent # Package imports -from e13tools import InputError, MPI, compare_versions +from e13tools import InputError, compare_versions from e13tools.utils import raise_error, raise_warning import h5py +from mpi4pyd import MPI import numpy as np from pkg_resources import get_distribution @@ -74,6 +75,7 @@ class FeatureWarning(FutureWarning): # Make a custom MPI.Comm class that uses a special broadcast method +# TODO: Combine this class with dummyMPI into a separate dedicated package? class PRISM_Comm(object): """ Custom :class:`~MPI.Intracomm` class that automatically makes use of the @@ -715,10 +717,6 @@ def get_info(): # Get list of all PRISM requirements req_list = [req.name for req in prism_dist.requires()] - # If imported MPI is mpi4py, add it to the list as well - if(MPI.__package__ == 'mpi4py'): - req_list.append('mpi4py') - # Sort the requirements list req_list.sort() diff --git a/requirements.txt b/requirements.txt index e83589b..a24ea44 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,9 @@ -e13tools>=0.5.6 +e13tools>=0.6.0 h5py>=2.8.0 hickle>=3.4.0 matplotlib>=2.2.4 mlxtend>=0.9.1 +mpi4pyd>=0.1.0 numpy>=1.12.0 scikit-learn>=0.19.1 scipy>=1.0.0