bugGNU Octave - Bugs: bug #37344, GUI Octave freezes when plotting...

 
 

bug #37344: GUI Octave freezes when plotting is used with OpenBLAS

Submitted by:  None
Submitted on:  Thu 13 Sep 2012 03:29:16 PM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: RüdigerOriginator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 21 Nov 2013 07:48:14 PM UTC, comment #9:

Closing the report.

Torsten <ttl>
Project Member
Mon 28 Oct 2013 02:57:30 AM UTC, comment #8:

Sorry, I forgot to reply to your latest. This bug no longer seems to be present, possibly because of jwe's change to how the GUI is started. I am definitely testing with OpenBLAS and it no longer freezes when plotting.

Mike Miller <mtmiller>
Project Administrator
Sun 20 Oct 2013 07:56:28 AM UTC, comment #7:

Mike, is it sufficient to set the variable in the program that uses the openBLAS lib or has it to be set globally? I have attached a patch that provides an option in the settings dialog and sets the environment variable for octave accordingly.

(file #29422)

Torsten <ttl>
Project Member
Thu 10 Oct 2013 05:11:49 PM UTC, comment #6:

What about an option in the settings dialog? The user can decide what to do and it only affects the GUI mode.

Torsten <ttl>
Project Member
Thu 10 Oct 2013 01:05:30 PM UTC, comment #5:

Yes, both OPENBLAS_NUM_THREADS=1 and OMP_NUM_THREADS=1 prevent the freeze.

I'm not sure if this is something Octave should be setting or not. If it does, it should only be in GUI mode. Both plotting and solving linear equations with openblas works fine in command-line mode.

Mike Miller <mtmiller>
Project Administrator
Thu 10 Oct 2013 04:45:46 AM UTC, comment #4:

Mike, did you test whether setting the environment variable OPENBLAS_NUM_THREADS=1 prevents the GUI from freezing? If so, should octave set this variable at startup?

Torsten <ttl>
Project Member
Sun 28 Jul 2013 11:06:23 PM UTC, comment #3:

Actually, I was just confirming the behavior reported by the OP, that the GUI freezes when calling a plot routine while OpenBLAS is the active BLAS library.

Now that I did a little bit of stack tracing myself and some searching, maybe it is just a documented feature that this simply won't work?

Quoting from:

https://github.com/xianyi/OpenBLAS/wiki/faq#wiki-multi-threaded

"If your application is already multi-threaded, it will conflict with OpenBLAS multi-threading. Thus, you must set OpenBLAS to use single thread as following..."

For the record, here's the stacktrace I see on the thread that is using up all of the CPU:

Mike Miller <mtmiller>
Project Administrator
Sun 28 Jul 2013 10:24:30 PM UTC, comment #2:

If OpenBLAS is deadlocking, isn't the bug there, not in Octave? We don't have several Octave threads calling BLAS functions, do we?

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Sun 28 Jul 2013 07:30:09 PM UTC, comment #1:

Confirmed on hg revision e7a059a9a644 with Debian openblas 0.2.6-2.

Mike Miller <mtmiller>
Project Administrator
Thu 13 Sep 2012 03:29:16 PM UTC, original submission:

Using the Octave GUI (hg tip -> 15362:48cb1a5bb64d) with OpenBLAS (0.1alpha2.2-3 on Ubuntu 12.04) causes octave to freeze and use 100% CPU when trying to plot (e.g. stem([1 2 3 4])). It works however fine in --no-gui mode.

Using gdb it seems that there is a deadlock caused in OpenBLAS.

A workarround is switching to the reference BLAS implementation or setting the number of OpenMP threads to 1 (export GOTO_NUM_THREADS=1)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #29422:  bug_37344_p01.diff added by ttl (6KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ttl (Posted a comment)
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 21 Nov 2013 07:48:14 PM UTCttlStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Sun 20 Oct 2013 07:56:28 AM UTCttlAttached File-=>Added bug_37344_p01.diff, #29422
      StatusConfirmed=>Patch Submitted
    Sun 28 Jul 2013 07:30:09 PM UTCmtmillerStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1