Author: bugman Date: Thu Mar 15 20:08:26 2012 New Revision: 15490 URL: http://svn.gna.org/viewcvs/relax?rev=15490&view=rev Log: Merged revisions 15471,15473-15474,15479-15483,15487 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3 ........ r15471 | bugman | 2012-03-12 15:26:57 +0100 (Mon, 12 Mar 2012) | 5 lines Added some code to detect the bit version of MS Windows in the information print out. This should help better determine if 32 or 64-bit Windows is being used. ........ r15473 | bugman | 2012-03-13 16:56:38 +0100 (Tue, 13 Mar 2012) | 3 lines Added the ability to skip scripts in the package __all__ list unit test checks. ........ r15474 | bugman | 2012-03-13 16:57:14 +0100 (Tue, 13 Mar 2012) | 3 lines The multi-processor package 'test_implementation.py' script is now blacklisted from the __all__ check. ........ r15479 | bugman | 2012-03-15 16:48:13 +0100 (Thu, 15 Mar 2012) | 5 lines The extern and minfx.scipy_subset relax packages are now excluded form the API documentation. This will be updated at http://www.nmr-relax.com/api/ after the next relax release. ........ r15480 | bugman | 2012-03-15 16:58:15 +0100 (Thu, 15 Mar 2012) | 3 lines Epydoc docstring fix. ........ r15481 | bugman | 2012-03-15 17:05:18 +0100 (Thu, 15 Mar 2012) | 3 lines The setup.py script can now be imported for the epydoc API documentation system. ........ r15482 | bugman | 2012-03-15 17:06:12 +0100 (Thu, 15 Mar 2012) | 5 lines The multi-processor test implementation scripts are now excluded from the API documentation. The import of the scripts was failing, and they are not part of the relax API. ........ r15483 | bugman | 2012-03-15 17:21:14 +0100 (Thu, 15 Mar 2012) | 3 lines Formatting of the epydoc exclusion list. ........ r15487 | bugman | 2012-03-15 20:05:40 +0100 (Thu, 15 Mar 2012) | 13 lines 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: branches/relax_disp/ (props changed) branches/relax_disp/generic_fns/minimise.py branches/relax_disp/info.py branches/relax_disp/multi/__init__.py branches/relax_disp/scons/manuals.py branches/relax_disp/setup.py branches/relax_disp/specific_fns/model_free/mf_minimise.py branches/relax_disp/test_suite/unit_tests/_multi/test___init__.py branches/relax_disp/test_suite/unit_tests/package_checking.py Propchange: branches/relax_disp/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Thu Mar 15 20:08:26 2012 @@ -1,1 +1,1 @@ -/1.3:1-15467 +/1.3:1-15489 Modified: branches/relax_disp/generic_fns/minimise.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/generic_fns/minimise.py?rev=15490&r1=15489&r2=15490&view=diff ============================================================================== --- branches/relax_disp/generic_fns/minimise.py (original) +++ branches/relax_disp/generic_fns/minimise.py Thu Mar 15 20:08:26 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: branches/relax_disp/info.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/info.py?rev=15490&r1=15489&r2=15490&view=diff ============================================================================== --- branches/relax_disp/info.py (original) +++ branches/relax_disp/info.py Thu Mar 15 20:08:26 2012 @@ -28,7 +28,7 @@ if hasattr(ctypes, 'windll'): import ctypes.wintypes import numpy -from os import popen3 +from os import environ, popen3 import platform from string import split import sys @@ -397,6 +397,8 @@ text = text + (format % ("Distribution: ", (platform.dist()[0] + " " + platform.dist()[1] + " " + platform.dist()[2]))) if hasattr(platform, 'platform'): text = text + (format % ("Full platform string: ", (platform.platform()))) + if hasattr(ctypes, 'windll'): + text = text + (format % ("Windows architecture: ", (self.win_arch()))) # Python info. text = text + ("\nPython information:\n") @@ -436,6 +438,25 @@ return text + def win_arch(self): + """Determine the MS Windows architecture. + + @return: The architecture string. + @rtype: str + """ + + # 64-bit versions. + if environ.has_key('PROCESSOR_ARCHITEW6432'): + arch = environ['PROCESSOR_ARCHITEW6432'] + + # Default 32-bit. + else: + arch = environ['PROCESSOR_ARCHITECTURE'] + + # Return the architecture. + return arch + + class MemoryStatusEx(ctypes.Structure): """Special object for obtaining hardware info in MS Windows.""" Modified: branches/relax_disp/multi/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/multi/__init__.py?rev=15490&r1=15489&r2=15490&view=diff ============================================================================== --- branches/relax_disp/multi/__init__.py (original) +++ branches/relax_disp/multi/__init__.py Thu Mar 15 20:08:26 2012 @@ -157,7 +157,7 @@ @param processor_name: Name of the processor module/class to load. @type processor_name: str @keyword verbosity: The verbosity level at initialisation. This can be changed during program execution. A value of 0 suppresses all output. A value of 1 causes the basic multi-processor information to be printed. A value of 2 will switch on a number of debugging print outs. Values greater than 2 currently do nothing, though this might change in the future. - @type keyword: int + @type verbosity: int @return: A loaded processor object or None to indicate failure. @rtype: multi.processor.Processor instance """ Modified: branches/relax_disp/scons/manuals.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/scons/manuals.py?rev=15490&r1=15489&r2=15490&view=diff ============================================================================== --- branches/relax_disp/scons/manuals.py (original) +++ branches/relax_disp/scons/manuals.py Thu Mar 15 20:08:26 2012 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2006-2011 Edward d'Auvergne # +# Copyright (C) 2006-2012 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -93,7 +93,15 @@ # exclude # The list of objects to exclude. - exclude = ['graphics', 'sample_scripts', 'scripts'] + exclude = [ + 'extern', + 'graphics', + 'minfx.scipy_subset', + 'multi.test_implementation', + 'multi.test_implementation2', + 'sample_scripts', + 'scripts' + ] # output # The type of output that should be generated. Should be one Modified: branches/relax_disp/setup.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/setup.py?rev=15490&r1=15489&r2=15490&view=diff ============================================================================== --- branches/relax_disp/setup.py (original) +++ branches/relax_disp/setup.py Thu Mar 15 20:08:26 2012 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2011 Edward d'Auvergne # +# Copyright (C) 2011-2012 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -38,7 +38,10 @@ # Python module import. from os import getcwd, listdir, sep from re import search -from setuptools import setup +try: + from setuptools import setup +except ImportError: + setup = None import sys # relax module imports. Modified: branches/relax_disp/specific_fns/model_free/mf_minimise.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_fns/model_free/mf_minimise.py?rev=15490&r1=15489&r2=15490&view=diff ============================================================================== --- branches/relax_disp/specific_fns/model_free/mf_minimise.py (original) +++ branches/relax_disp/specific_fns/model_free/mf_minimise.py Thu Mar 15 20:08:26 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() Modified: branches/relax_disp/test_suite/unit_tests/_multi/test___init__.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/unit_tests/_multi/test___init__.py?rev=15490&r1=15489&r2=15490&view=diff ============================================================================== --- branches/relax_disp/test_suite/unit_tests/_multi/test___init__.py (original) +++ branches/relax_disp/test_suite/unit_tests/_multi/test___init__.py Thu Mar 15 20:08:26 2012 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2009 Edward d'Auvergne # +# Copyright (C) 2009-2012 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -38,3 +38,6 @@ self.package = multi self.package_name = 'multi' self.package_path = sys.path[0] + sep + 'multi' + + # Blacklisted scripts. + self.blacklist = ['test_implementation.py'] Modified: branches/relax_disp/test_suite/unit_tests/package_checking.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/unit_tests/package_checking.py?rev=15490&r1=15489&r2=15490&view=diff ============================================================================== --- branches/relax_disp/test_suite/unit_tests/package_checking.py (original) +++ branches/relax_disp/test_suite/unit_tests/package_checking.py Thu Mar 15 20:08:26 2012 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2009-2011 Edward d'Auvergne # +# Copyright (C) 2009-2012 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -47,6 +47,10 @@ if file == '__init__.py': continue + # Skip blacklisted files. + if hasattr(self, 'blacklist') and file in self.blacklist: + continue + # Remove the '.py' part. module = file[:-3]