Author: bugman Date: Fri Sep 25 14:03:20 2015 New Revision: 27869 URL: http://svn.gna.org/viewcvs/relax?rev=27869&view=rev Log: Merged revisions 27841-27843 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r27841 | tlinnet | 2015-05-27 03:09:50 +0200 (Wed, 27 May 2015) | 2 lines Adding to user function minimise.execute() the keyword "mp_verbosity", to control the amount of information to print when running multi processors. ........ r27842 | tlinnet | 2015-05-27 03:09:52 +0200 (Wed, 27 May 2015) | 1 line In multi.processor(), moving up the debugging print-out of running sets of calculatation. ........ r27843 | tlinnet | 2015-05-27 03:09:55 +0200 (Wed, 27 May 2015) | 1 line In pipe_control of minimise, adding the possibility to control verbosity in multi processor mode. ........ Modified: branches/frame_order_cleanup/ (props changed) branches/frame_order_cleanup/multi/processor.py branches/frame_order_cleanup/pipe_control/minimise.py branches/frame_order_cleanup/user_functions/minimisation.py Propchange: branches/frame_order_cleanup/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Fri Sep 25 14:03:20 2015 @@ -1 +1 @@ -/trunk:1-27797,27800-27840 +/trunk:1-27797,27800-27843 Modified: branches/frame_order_cleanup/multi/processor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/multi/processor.py?rev=27869&r1=27868&r2=27869&view=diff ============================================================================== --- branches/frame_order_cleanup/multi/processor.py (original) +++ branches/frame_order_cleanup/multi/processor.py Fri Sep 25 14:03:20 2015 @@ -604,14 +604,14 @@ # Loop until the queue of calculations is depleted. while len(running_set) != 0: - # Get the result. - result = self.master_receive_result() - # Debugging printout. if verbosity.level(): print('\nIdle set: %s' % idle_set) print('Running set: %s' % running_set) + # Get the result. + result = self.master_receive_result() + # Shift the processor rank to the idle set. if result.completed: idle_set.add(result.rank) Modified: branches/frame_order_cleanup/pipe_control/minimise.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/pipe_control/minimise.py?rev=27869&r1=27868&r2=27869&view=diff ============================================================================== --- branches/frame_order_cleanup/pipe_control/minimise.py (original) +++ branches/frame_order_cleanup/pipe_control/minimise.py Fri Sep 25 14:03:20 2015 @@ -31,6 +31,7 @@ from lib.float import isNaN from lib.io import write_data from multi import Processor_box +from multi.misc import Verbosity; mverbosity = Verbosity() from pipe_control.mol_res_spin import return_spin, spin_loop from pipe_control import pipes from pipe_control.pipes import check_pipe @@ -428,7 +429,7 @@ cdp.grid_zoom_level = level -def minimise(min_algor=None, line_search=None, hessian_mod=None, hessian_type=None, func_tol=None, grad_tol=None, max_iter=None, constraints=True, scaling=True, verbosity=1, sim_index=None): +def minimise(min_algor=None, line_search=None, hessian_mod=None, hessian_type=None, func_tol=None, grad_tol=None, max_iter=None, constraints=True, scaling=True, verbosity=1, mp_verbosity=0, sim_index=None): """Minimisation function. @keyword min_algor: The minimisation algorithm to use. @@ -451,6 +452,8 @@ @type scaling: bool @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. @type verbosity: int + @keyword mp_verbosity: The amount of information to print from the multi processor module. The higher the value, the greater the verbosity. + @type mp_verbosity: int @keyword sim_index: The index of the simulation to optimise. This should be None if normal optimisation is desired. @type sim_index: None or int """ @@ -487,6 +490,9 @@ processor_box = Processor_box() processor = processor_box.processor + # Store the verbosity level for the multiprocessor. + mverbosity.set(mp_verbosity) + # Single Monte Carlo simulation. if sim_index != None: # Reset the minimisation statistics. @@ -511,8 +517,8 @@ api.minimise(min_algor=min_algor, min_options=min_options, func_tol=func_tol, grad_tol=grad_tol, max_iterations=max_iter, constraints=constraints, scaling_matrix=scaling_matrix, verbosity=verbosity-1, sim_index=i) # Print out. - if verbosity and not processor.is_queued(): - print("Simulation " + repr(i+1)) + if verbosity and processor.is_queued(): + print("Queueing Simulation nr:" + repr(i+1)) # Unset the status. if status.current_analysis: Modified: branches/frame_order_cleanup/user_functions/minimisation.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/user_functions/minimisation.py?rev=27869&r1=27868&r2=27869&view=diff ============================================================================== --- branches/frame_order_cleanup/user_functions/minimisation.py (original) +++ branches/frame_order_cleanup/user_functions/minimisation.py Fri Sep 25 14:03:20 2015 @@ -217,6 +217,13 @@ desc_short = "verbosity level", desc = "The amount of information to print to screen. Zero corresponds to minimal output while higher values increase the amount of output. The default value is 1." ) +uf.add_keyarg( + name = "mp_verbosity", + default = 0, + py_type = "int", + desc_short = "multi processor verbosity level", + desc = "The amount of information to print to screen when running multi processors. Zero corresponds to minimal output while higher values increase the amount of output. The default value is 0." +) # Description. uf.desc.append(Desc_container()) uf.desc[-1].add_paragraph("This will perform an optimisation starting from the current parameter values. This is only suitable for data pipe types which have target functions and hence support optimisation.")