Thu 21 Nov 2013 07:48:14 PM UTC, comment #9:
Closing the report.
|
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.
|
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)
|
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.
|
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.
|
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?
|
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:
|
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?
|
Sun 28 Jul 2013 07:30:09 PM UTC, comment #1:
Confirmed on hg revision e7a059a9a644 with Debian openblas 0.2.6-2.
|
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)
|