mailr15609 - /1.3/multi/processor.py


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

Header


Content

Posted by edward on March 23, 2012 - 11:20:
Author: bugman
Date: Fri Mar 23 11:20:07 2012
New Revision: 15609

URL: http://svn.gna.org/viewcvs/relax?rev=15609&view=rev
Log:
Partially implemented the Processor.data_update() method.

This now should work when the rank argument is not supplied.


Modified:
    1.3/multi/processor.py

Modified: 1.3/multi/processor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/multi/processor.py?rev=15609&r1=15608&r2=15609&view=diff
==============================================================================
--- 1.3/multi/processor.py (original)
+++ 1.3/multi/processor.py Fri Mar 23 11:20:07 2012
@@ -105,6 +105,7 @@
 from multi.misc import Capturing_exception, raise_unimplemented, Verbosity; 
verbosity = Verbosity()
 from multi.processor_io import Redirect_text
 from multi.result_commands import Batched_result_command, 
Null_result_command, Result_exception
+from multi.slave_commands import Slave_storage_command
 
 
 class Data_store:
@@ -236,7 +237,26 @@
         @type rank:     None or int
         """
 
-        raise_unimplemented(self.data_upload)
+        # The range.
+        if rank != None:
+            rank_list = [rank]
+        else:
+            rank_list = range(1, self.processor_size()+1)
+
+        # Create the command list.
+        queue = []
+        for i in rank_list:
+            # Create and append the command.
+            command = Slave_storage_command()
+
+            # Add the data to the command.
+            command.add(name, value)
+
+            # Add the command to the queue.
+            queue.append(command)
+
+        # Run the queue of data transfer commands.
+        self.run_command_queue(queue)
 
 
     def get_intro_string(self):




Related Messages


Powered by MHonArc, Updated Fri Mar 23 12:20:01 2012