[Yt-svn] yt: Replacing direct importing of MPI with an indirect call to t...
hg at spacepope.org
hg at spacepope.org
Wed Nov 10 09:08:58 PST 2010
hg Repository: yt
details: yt/rev/631127648216
changeset: 3520:631127648216
user: Matthew Turk <matthewturk at gmail.com>
date:
Wed Nov 10 09:08:51 2010 -0800
description:
Replacing direct importing of MPI with an indirect call to the global
configuration
diffstat:
yt/utilities/amr_kdtree/amr_kdtree.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (26 lines):
diff -r 8fc9a045dd91 -r 631127648216 yt/utilities/amr_kdtree/amr_kdtree.py
--- a/yt/utilities/amr_kdtree/amr_kdtree.py Wed Nov 10 08:45:26 2010 -0800
+++ b/yt/utilities/amr_kdtree/amr_kdtree.py Wed Nov 10 09:08:51 2010 -0800
@@ -26,18 +26,18 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import numpy as na
-from mpi4py import MPI
from yt.funcs import *
from yt.visualization.volume_rendering.grid_partitioner import HomogenizedVolume
from yt.utilities.amr_utils import PartitionedGrid
from yt.utilities.performance_counters import yt_counters, time_function
import yt.utilities.parallel_tools.parallel_analysis_interface as PT
+from yt.config import ytcfg
+
from time import time
import h5py
-comm = MPI.COMM_WORLD
-my_rank = comm.rank
-nprocs = comm.size
+my_rank = ytcfg.getint("yt", "__parallel_rank")
+nprocs = ytcfg.getint("yt", "__parallel_size")
def corner_bounds(split_dim, split, current_left = None, current_right = None):
r"""
More information about the yt-svn
mailing list