mailr7824 - in /branches/multi_processor_merge: generic_fns/minimise.py prompt/minimisation.py


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

Header


Content

Posted by edward on October 19, 2008 - 16:50:
Author: bugman
Date: Sun Oct 19 16:50:45 2008
New Revision: 7824

URL: http://svn.gna.org/viewcvs/relax?rev=7824&view=rev
Log:
Shifted the multiprocessor queue running calls from the prompt interface to 
the generic_fns code.

This code was in the wrong place as the prompt code is reserved solely for 
argument checking and
passing these onto the functional code (as well as providing documentation 
and the user interface).


Modified:
    branches/multi_processor_merge/generic_fns/minimise.py
    branches/multi_processor_merge/prompt/minimisation.py

Modified: branches/multi_processor_merge/generic_fns/minimise.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_processor_merge/generic_fns/minimise.py?rev=7824&r1=7823&r2=7824&view=diff
==============================================================================
--- branches/multi_processor_merge/generic_fns/minimise.py (original)
+++ branches/multi_processor_merge/generic_fns/minimise.py Sun Oct 19 
16:50:45 2008
@@ -29,6 +29,7 @@
 # relax module imports.
 from generic_fns.mol_res_spin import spin_loop
 from generic_fns import pipes
+from multi.processor import Processor_box
 from relax_errors import RelaxError
 from specific_fns.setup import get_specific_fn
 
@@ -184,6 +185,12 @@
     # Grid search.
     else:
         grid_search(lower=lower, upper=upper, inc=inc, 
constraints=constraints, verbosity=verbosity)
+
+    # Get the Processor box singleton (it contains the Processor instance).
+    processor_box = Processor_box() 
+
+    # Execute the queued elements.
+    processor_box.processor.run_queue()
 
 
 def minimise(min_algor=None, min_options=None, func_tol=None, grad_tol=None, 
max_iterations=None, constraints=True, scaling=True, verbosity=1, 
sim_index=None):
@@ -239,6 +246,12 @@
     else:
         minimise(min_algor=min_algor, min_options=min_options, 
func_tol=func_tol, grad_tol=grad_tol, max_iterations=max_iterations, 
constraints=constraints, scaling=scaling, verbosity=verbosity)
 
+    # Get the Processor box singleton (it contains the Processor instance).
+    processor_box = Processor_box() 
+
+    # Execute the queued elements.
+    processor_box.processor.run_queue()
+
 
 def return_conversion_factor(stat_type):
     """Dummy function for returning 1.0.

Modified: branches/multi_processor_merge/prompt/minimisation.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_processor_merge/prompt/minimisation.py?rev=7824&r1=7823&r2=7824&view=diff
==============================================================================
--- branches/multi_processor_merge/prompt/minimisation.py (original)
+++ branches/multi_processor_merge/prompt/minimisation.py Sun Oct 19 16:50:45 
2008
@@ -148,11 +148,9 @@
         if type(verbosity) != int:
             raise RelaxIntError, ('verbosity level', verbosity)
 
-        # Enqueue the functional code.
+        # Execute the functional code.
         minimise.grid_search(lower=lower, upper=upper, inc=inc, 
constraints=constraints, verbosity=verbosity)
 
-        # Execute the functional code.
-        self.relax.processor.run_queue()
 
     def minimise(self, *args, **keywords):
         """Minimisation function.
@@ -356,11 +354,9 @@
         if type(verbosity) != int:
             raise RelaxIntError, ('verbosity level', verbosity)
 
-        # Enqyueue the functional code.
+        # Execute the functional code.
         minimise.minimise(min_algor=min_algor, min_options=min_options, 
func_tol=func_tol, grad_tol=grad_tol, max_iterations=max_iterations, 
constraints=constraints, scaling=scaling, verbosity=verbosity)
 
-        # Execute the functional code.
-        self.relax.processor.run_queue()
 
     # Modify the docstring of the minimise method to include the docstring 
of the generic_minimise function in 'minimise.generic'.
     
##############################################################################################################################




Related Messages


Powered by MHonArc, Updated Sun Oct 19 17:20:02 2008