mailr15590 - /1.3/multi/test_implementation2.py


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

Header


Content

Posted by edward on March 21, 2012 - 12:33:
Author: bugman
Date: Wed Mar 21 12:33:49 2012
New Revision: 15590

URL: http://svn.gna.org/viewcvs/relax?rev=15590&view=rev
Log:
Updated the second multi-processor test implementation to use the new 
data_upload() API function.


Modified:
    1.3/multi/test_implementation2.py

Modified: 1.3/multi/test_implementation2.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/multi/test_implementation2.py?rev=15590&r1=15589&r2=15590&view=diff
==============================================================================
--- 1.3/multi/test_implementation2.py (original)
+++ 1.3/multi/test_implementation2.py Wed Mar 21 12:33:49 2012
@@ -29,7 +29,7 @@
 sys.path.append('..')
 
 # relax module imports.
-from multi import Application_callback, load_multiprocessor, Memo, 
Processor_box, Result_command, Slave_command
+from multi import data_upload, Application_callback, load_multiprocessor, 
Memo, Processor_box, Result_command, Slave_command
 
 
 # Module variables.
@@ -124,18 +124,19 @@
         self.num = 0
 
         # The invariant data to pass to the slaves once.
-        self.real_length = 2.0
+        real_length = 2.0
         self.vect = array([1, 2, 3], float64)
-        self.vect = self.vect / norm(self.vect) * self.real_length
+        self.vect = self.vect / norm(self.vect) * real_length
 
 
     def run(self):
         """This required method executes the entire program."""
 
+        # Send the invariant data to the slaves' data stores.
+        data_upload('vect', self.vect)
+
         # Initialise the Processor box singleton.
         processor_box = Processor_box()
-
-        print "\n\nHELLO: ", processor_box.processor.rank(), self.vect
 
         # Loop over the slaves.
         num = processor_box.processor.processor_size()




Related Messages


Powered by MHonArc, Updated Wed Mar 21 12:40:01 2012