mailr21245 - /trunk/multi/processor.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 27, 2013 - 14:39:
Author: bugman
Date: Sun Oct 27 14:39:57 2013
New Revision: 21245

URL: http://svn.gna.org/viewcvs/relax?rev=21245&view=rev
Log:
Fix for bug #21233 (https://gna.org/bugs/?21233) - the missing mpi4py 
multi-processor messages.

When multiple commands were being sent to one slave, the captured IO was 
being overwritten by each
executed command.  Therefore the slave would only return the printouts from 
the last command.


Modified:
    trunk/multi/processor.py

Modified: trunk/multi/processor.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/multi/processor.py?rev=21245&r1=21244&r2=21245&view=diff
==============================================================================
--- trunk/multi/processor.py (original)
+++ trunk/multi/processor.py Sun Oct 27 14:39:57 2013
@@ -525,19 +525,19 @@
                     else:
                         self.result_list = None
 
+                    # Capture the standard IO streams for the slaves.
+                    self.stdio_capture()
+
                     # Execute each command, one by one.
                     for i, command in enumerate(commands):
-                        # Capture the standard IO streams for the slaves.
-                        self.stdio_capture()
-
                         # Set the completed flag if this is the last command.
                         completed = (i == len(commands)-1)
 
                         # Execute the calculation.
                         command.run(self, completed)
 
-                        # Restore the IO.
-                        self.stdio_restore()
+                    # Restore the IO.
+                    self.stdio_restore()
 
                     # Process the batched results.
                     if self.batched_returns:




Related Messages


Powered by MHonArc, Updated Sun Oct 27 15:00:01 2013