mailr10131 - /branches/multi_processor_merge/relax


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

Header


Content

Posted by edward on January 07, 2010 - 15:55:
Author: bugman
Date: Thu Jan  7 15:55:07 2010
New Revision: 10131

URL: http://svn.gna.org/viewcvs/relax?rev=10131&view=rev
Log:
The ability to perform code profiling has been restored in the 
multi_processor branch!


Modified:
    branches/multi_processor_merge/relax

Modified: branches/multi_processor_merge/relax
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_processor_merge/relax?rev=10131&r1=10130&r2=10131&view=diff
==============================================================================
--- branches/multi_processor_merge/relax (original)
+++ branches/multi_processor_merge/relax Thu Jan  7 15:55:07 2010
@@ -426,23 +426,22 @@
 
 if __name__ == "__main__":
     # Change this flag to True for code profiling.
-    profile_flag = False
+    profile_flag = True
+
+    # Instantiate the main class.
+    relax_instance = Relax()
+
+    # Process the command line arguments.
+    relax_instance.arguments()
+
+    # Set up the multi-processor elements.
+    callbacks = Application_callback(master=relax_instance)
+    relax_instance.processor = 
Processor.load_multiprocessor(relax_instance.multiprocessor_type, callbacks, 
processor_size=relax_instance.n_processors)
 
     # Normal relax operation.
     if not profile_flag:
-        # Instantiate the main class.
-        relax_instance = Relax()
-
-        # Process the command line arguments.
-        relax_instance.arguments()
-
-        # Set up the multi-processor elements.
-        callbacks = Application_callback(master=relax_instance)
-        multi_processor = 
Processor.load_multiprocessor(relax_instance.multiprocessor_type, callbacks, 
processor_size=relax_instance.n_processors)
-        relax_instance.processor = multi_processor
-
         # Execute relax in multi-processor mode (this includes the 
uni-processor for normal operation).
-        multi_processor.run()
+        relax_instance.processor.run()
 
     # relax in profiling mode.
     else:
@@ -458,4 +457,4 @@
 
         # Run relax in profiling mode.
         profile.Profile.print_stats = print_stats
-        profile.run('Relax()')
+        profile.run('relax_instance.processor.run()')




Related Messages


Powered by MHonArc, Updated Thu Jan 07 16:00:02 2010