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):
_______________________________________________
relax (http://nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits