mailRe: [task #6847] The Bieri graphical user interface.


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

Header


Content

Posted by Edward d'Auvergne on March 05, 2010 - 10:58:
Hi,

This is a very strange problem.  Can you try it again with a
completely unmodified version of the bieri_gui branch?  Running the
test suite with 'relax -x' passes perfectly.  But when I change line
157 from:

                print(("Simulation " + repr(i+1)))

to:

                rint(("Simulation " + repr(i+1)))

Then the test suite fails with 5 system test errors "NameError: global
name 'rint' is not defined".  This is a clear indication that
threading is causing the problem, and that the problem lies elsewhere.
 The "print 'Test'" replacement might just have been lucky and the
thread failure was avoided.  Have you made any changes to your local
copy of the branch?  Note that the test suite does not run any of the
tests in a thread.  I don't know if that is even possible.

Regards,

Edward



On 4 March 2010 23:12, Michael Bieri <michael.bieri@xxxxxx> wrote:
Hi Edward

It was the problem in line 157 in minimise.py. I just replaced it with
'print 'Test' (I know it is silly) and it works fine!

i was also thinking to replace the threading, as with the other modules,
we will be able to kill processes much easier (cancel button in controller).

Cheers
Michael


Edward d'Auvergne schrieb:
Hi,

For this problem, I think we need to first implement proper exception
handling in threads.  This will allow the errors to be properly
reported.  And this is up to the GUI as this runs the auto-analyses in
threaded mode.  According to the 'thread' module documentation
(http://docs.python.org/library/thread.html), "The threading module
provides an easier to use and higher-level threading API built on top
of this module".  I really think we should be using this instead, and
the thread handling should be more advanced (and exceptions should be
better handled).  Low level modules should only be touched by
hard-core coders who like pain - and 'thread' is one of those modules.
 I used it back before Gary wrote the multi-processor code, so I know
the pain.  I switched to the 'threading' module and, although this is
much easier, it can still be quite painful to run correctly.

The threading module will require study
(http://docs.python.org/library/threading.html).  Threads are complex
beasts and need to be handled very carefully.  To help, there are many
tutorials on the Internet that can be found through Google
(http://www.google.com/search?hl=en&safe=off&q=python+threading+tutorial&aq=1&aqi=g10&aql=&oq=python+threading).
 Once threads are correctly handled, then these error messages will
make more sense.  Note that this traceback is not actually where the
problem occurred!  That line 157 of generic_fns/minimise.py is
perfectly fine.  Therefore until we switch to the 'threading' module
and have exceptions properly handled, we will never know what went
wrong.

Regards,

Edward



On 4 March 2010 00:30, Michael Bieri <NO-REPLY.INVALID-ADDRESS@xxxxxxx> 
wrote:

Follow-up Comment #40, task #6847 (project relax):

Hi Edward

There seems to be a problem during dauvergne.py automatic model-free
analysis; i.e. during the final calculation.

I get the error message:

relax> minimise(*args=('newton',), func_tol=1e-25, 
max_iterations=10000000,
constraints=True, scaling=True, verbosity=1)


Over-fit spin deselection.


Simulation 1Unhandled exception in thread started by
Traceback (most recent call last):
 File
"/home/mbieri/LinuxBox/bieri_gui/gui_bieri/analyses/auto_model_free.py", 
line
835, in execute_thread
   dAuvergne_protocol(diff_model=global_model, mf_models=data.mf_models,
local_tm_models=data.local_tm_models, pdb_file=data.structure_file,
seq_args=data.seq_args, het_name=data.het_name, 
relax_data=data.relax_data,
unres=data.unres, exclude=data.exclude, bond_length=data.bond_length,
csa=data.csa, hetnuc=data.hetnuc, proton=data.proton, 
grid_inc=data.grid_inc,
min_algor=data.min_algor, mc_num=data.mc_num, conv_loop=data.conv_loop)
 File 
"/home/mbieri/LinuxBox/bieri_gui/auto_analyses/dauvergne_protocol.py",
line 395, in __init__
   self.interpreter.minimise(self.min_algor)
 File "/home/mbieri/LinuxBox/bieri_gui/prompt/minimisation.py", line 294, 
in
minimise
   minimise.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)
 File "/home/mbieri/LinuxBox/bieri_gui/generic_fns/minimise.py", line 157,
in minimise
   print(("Simulation " + repr(i+1)))


Cheers
Michael


p.s.: I will work on the code next week, so reverting the auto_analysis
changes.

   _______________________________________________________

Reply to this item at:

 <http://gna.org/task/?6847>

_______________________________________________
 Nachricht geschickt von/durch Gna!
 http://gna.org/


_______________________________________________
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 Mon Mar 15 00:00:38 2010