mailr21012 - /trunk/pipe_control/minimise.py


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

Header


Content

Posted by edward on October 07, 2013 - 21:13:
Author: bugman
Date: Mon Oct  7 21:13:45 2013
New Revision: 21012

URL: http://svn.gna.org/viewcvs/relax?rev=21012&view=rev
Log:
Added multi-processor support for Monte Carlo simulations.

This simply involves accessing the multi-processor box singleton and running 
the
processor.run_queue() method within the pipe_control.minimise.minimise() 
function.  This currently
does nothing as the processor queue is always empty.  But if the code in the 
specific_analyses
package is modified to add slave commands to the processor but not execute 
the run_queue() method,
then the Monte Carlo simulations will be automatically parallelised.


Modified:
    trunk/pipe_control/minimise.py

Modified: trunk/pipe_control/minimise.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/minimise.py?rev=21012&r1=21011&r2=21012&view=diff
==============================================================================
--- trunk/pipe_control/minimise.py (original)
+++ trunk/pipe_control/minimise.py Mon Oct  7 21:13:45 2013
@@ -27,6 +27,7 @@
 
 # relax module imports.
 from lib.errors import RelaxError
+from multi import Processor_box
 from pipe_control.mol_res_spin import return_spin, spin_loop
 from pipe_control import pipes
 import specific_analyses
@@ -224,6 +225,13 @@
     else:
         minimise(min_algor=min_algor, min_options=min_options, 
func_tol=func_tol, grad_tol=grad_tol, max_iterations=max_iter, 
constraints=constraints, scaling=scaling, verbosity=verbosity)
 
+    # Get the Processor box singleton (it contains the Processor instance) 
and alias the Processor.
+    processor_box = Processor_box() 
+    processor = processor_box.processor
+
+    # Execute any queued commands.
+    processor.run_queue()
+
 
 def reset_min_stats(data_pipe=None, spin=None):
     """Function for resetting the minimisation statistics.




Related Messages


Powered by MHonArc, Updated Mon Oct 07 21:20:01 2013