[Yt-svn] commit/yt: samskillman: Improvements to how the streamlines are parallelized and finalized.

Bitbucket commits-noreply at bitbucket.org
Fri Feb 25 09:19:02 PST 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/a0ac3326fe87/
changeset:   r3774:a0ac3326fe87
branch:      yt
user:        samskillman
date:        2011-02-25 18:18:52
summary:     Improvements to how the streamlines are parallelized and finalized.
Now uses the new _mpi_allsum.
affected #:  1 file (36 bytes)

--- a/yt/visualization/streamlines.py	Fri Feb 25 08:39:43 2011 -0800
+++ b/yt/visualization/streamlines.py	Fri Feb 25 10:18:52 2011 -0700
@@ -107,11 +107,10 @@
     def integrate_through_volume(self):
         nprocs = self._mpi_get_size()
         my_rank = self._mpi_get_rank()
-        self.streamlines = self.streamlines[my_rank::nprocs]
-        self.streamlines[:,0,:] = self.start_positions[my_rank::nprocs]
+        self.streamlines[my_rank::nprocs,0,:] = self.start_positions[my_rank::nprocs]
 
         pbar = get_pbar("Streamlining", self.N)
-        for i,stream in enumerate(self.streamlines):
+        for i,stream in enumerate(self.streamlines[my_rank::nprocs]):
             step = self.steps
             while (step > 1):
                 this_brick = self.volume.locate_brick(stream[-step,:])
@@ -123,7 +122,7 @@
 
     @parallel_passthrough
     def _finalize_parallel(self,data):
-        self.streamlines = self._mpi_cat_na_array(self.streamlines)
+        self.streamlines = self._mpi_allsum(self.streamlines)
         
     def _integrate_through_brick(self, node, stream, step, periodic=False):
         while (step > 1):

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list