mailr15487 - in /1.3: generic_fns/minimise.py specific_fns/model_free/mf_minimise.py


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

Header


Content

Posted by edward on March 15, 2012 - 20:05:
Author: bugman
Date: Thu Mar 15 20:05:40 2012
New Revision: 15487

URL: http://svn.gna.org/viewcvs/relax?rev=15487&view=rev
Log:
Fix for bug #19528 (https://gna.org/bugs/?19528).

This bug was reported by Hugh Dannatt (h dott dannatt att sheffield dot ac 
dot uk).

The problem was in the multi-processor code for the model-free calculations, 
specifically for the
Monte Carlo simulations.  Rather than processing the queue of slave processor 
commands for the
model-free calculation for each spin system at the end of each simulation, 
the processing of the
queue was happening at the end of all Monte Carlo simulations.  This caused 
memory usage to bloat!
A full description of the problem can be found at
https://mail.gna.org/public/relax-users/2012-03/msg00037.html (Message-id:
<CAED9pY_Z1wGEg3gZo3WCkhvYTBdqs-Feex5Og4vJFovgJkUOyw@xxxxxxxxxxxxxx>).


Modified:
    1.3/generic_fns/minimise.py
    1.3/specific_fns/model_free/mf_minimise.py

Modified: 1.3/generic_fns/minimise.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/minimise.py?rev=15487&r1=15486&r2=15487&view=diff
==============================================================================
--- 1.3/generic_fns/minimise.py (original)
+++ 1.3/generic_fns/minimise.py Thu Mar 15 20:05:40 2012
@@ -29,7 +29,6 @@
 # relax module imports.
 from generic_fns.mol_res_spin import return_spin, spin_loop
 from generic_fns import pipes
-from multi import Processor_box
 from relax_errors import RelaxError
 import specific_fns
 from status import Status; status = Status()
@@ -138,12 +137,6 @@
     # 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):
@@ -214,12 +207,6 @@
     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 reset_min_stats(data_pipe=None, spin=None):
     """Function for resetting the minimisation statistics.

Modified: 1.3/specific_fns/model_free/mf_minimise.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/mf_minimise.py?rev=15487&r1=15486&r2=15487&view=diff
==============================================================================
--- 1.3/specific_fns/model_free/mf_minimise.py (original)
+++ 1.3/specific_fns/model_free/mf_minimise.py Thu Mar 15 20:05:40 2012
@@ -1589,6 +1589,9 @@
             num_data_sets = 0
             data_store.num_spins = 1
 
+        # Get the Processor box singleton (it contains the Processor 
instance) and alias the Processor.
+        processor_box = Processor_box() 
+        processor = processor_box.processor
 
         # Loop over the minimisation instances.
         #######################################
@@ -1683,10 +1686,6 @@
             if min_algor == 'back_calc':
                 return self.mf.calc_ri()
 
-            # Get the Processor box singleton (it contains the Processor 
instance) and alias the Processor.
-            processor_box = Processor_box() 
-            processor = processor_box.processor
-
             # Parallelised grid search for the diffusion parameter space.
             if match('^[Gg]rid', min_algor) and data_store.model_type == 
'diff':
                 # Print out.
@@ -1707,6 +1706,9 @@
                     memo = MF_memo(model_free=self, 
model_type=data_store.model_type, spin=spin, sim_index=sim_index, 
scaling=scaling, scaling_matrix=data_store.scaling_matrix)
                     processor.add_to_queue(command, memo)
 
+                # Execute the queued elements.
+                processor.run_queue()
+
                 # Exit this method.
                 return
 
@@ -1724,3 +1726,6 @@
             # Set up the model-free memo and add it to the processor queue.
             memo = MF_memo(model_free=self, 
model_type=data_store.model_type, spin=spin, sim_index=sim_index, 
scaling=scaling, scaling_matrix=data_store.scaling_matrix)
             processor.add_to_queue(command, memo)
+
+        # Execute the queued elements.
+        processor.run_queue()




Related Messages


Powered by MHonArc, Updated Thu Mar 15 20:20:07 2012