mailRe: r10997 - /branches/bieri_gui/gui_bieri/controller.py


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

Header


Content

Posted by Edward d'Auvergne on March 16, 2010 - 00:07:
Threading in a GUI is quite different to threading in the
multi-processor code.  The multi-processor code could have threading
added to split up the calculations, the only problem is that Python
threading is not real threading.  If you have a quad-core processor,
all the threads will only run on one of the cores.  This is a Python
thread design issue.  Note that the threading here would be called a
multi-processor fabric.  The fabrics currently implemented are the
mpi4py (using MPI,
http://en.wikipedia.org/wiki/Message_Passing_Interface) and the
uni-processor.

Having threads in the GUI is quite different.  The purpose is to let
other parts of the program continue to run as another part of the GUI
is in use.  I think the relax controller is a perfect example of this.
 Threading is difficult to perfect though, because locking problems
can be difficult to understand and resolve.  Using the threading
module will help a lot for this.

Regards,

Edward


On 15 March 2010 22:24, Michael Bieri <michael.bieri@xxxxxx> wrote:
I will also try to change the controller from a wx.Dialog to a wx.Frame.
It might be that this already solves a lot of problems, as the dialog
locks a lot of functions in the main loop. Ideally, we could even avoid
using threads to catch the system output. How is the multi processor
working? Is it one job that is split to multiple processors or does
relax start several jobs at once (in threads) ?



Edward d'Auvergne schrieb:
Hi,

This should give you access to the info the relax controller needs.
If additional information is required, I can add this to the 1.3 line.
 Note that the current use of the thread python package might cause a
problem when reading this.  Switching to the threading module should
help.  As a last resort, I have written a thread safe version of the
status relax module that I can commit to the 1.3 line.

Regards,

Edward



On 14 March 2010 23:45,  <michael.bieri@xxxxxx> wrote:

Author: michaelbieri
Date: Sun Mar 14 23:45:25 2010
New Revision: 10997

URL: http://svn.gna.org/viewcvs/relax?rev=10997&view=rev
Log:
The status information of the singleton is integrated in the relaxGUI 
controller.

Modified:
   branches/bieri_gui/gui_bieri/controller.py

Modified: branches/bieri_gui/gui_bieri/controller.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/controller.py?rev=10997&r1=10996&r2=10997&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/controller.py (original)
+++ branches/bieri_gui/gui_bieri/controller.py Sun Mar 14 23:45:25 2010
@@ -31,6 +31,9 @@
 import time
 import thread
 import wx
+
+# relax module imports.
+from status import Status

 # relaxGUI module imports.
 from gui_bieri.execution.calc_noe import make_noe
@@ -68,6 +71,9 @@
        # Button actions
        self.Bind(wx.EVT_BUTTON, self.cancel_calculation, 
self.cancel_button)
        self.Bind(wx.EVT_BUTTON, self.handler_close, self.close_button)
+
+        # Integrate Singleton object.
+        status = Status()

        # Start Calculation in Thread
        #if WHICH_CALC == 'Rx':


_______________________________________________
relax (http://nmr-relax.com)

This is the relax-commits mailing list
relax-commits@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits



_______________________________________________
relax (http://nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel



_______________________________________________
relax (http://nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel




Related Messages


Powered by MHonArc, Updated Tue Mar 16 00:40:33 2010