Openblas breaks openmp
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Yade |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Linking libopenblas as it is in ubuntu 12.04 disable multithread tasks (known issue with other applications to).
Yade -jN run the parallel tasks in a sequential way, and therefore it actually slows down for increasing N due to overheads, as noticed by [1].
The bug affects yade-daily and every build that links vs. openblas
There is a simple fix for compiled versions:
- uninstall openblas
- git clone git://github.
- edit Makefile.rule to enable openmp at line 44 in (https:/
# If you're going to use this library with OpenMP, please comment it in.
# USE_OPENMP = 1 (the problem with debian/openblas is, obviously, that it is built with USE_OPENMP = 0)
- make PREFIX=/usr/lib
- sudo make install
- run yade (no need to recompile)
This fix should also work for prebuilt yadedaily. The only problem is it has openblas as a dependency, so basically the first step above needs to also uninstall yadedaily (you could hack it somehow, of course...)
I'm not sure how to best fix yadedaily. I noticed openblas-omp packages available for Fedora and others, but not for debian.
One option is to replace libopenblas dependency by libatlas (it will also eliminate the problems with scipy). The PFV code will be suboptimal and non-parallel, but people seeking performance can always recompile with openblas.
What do you think Anton?
> I'm not sure how to best fix yadedaily. I noticed openblas-omp packages
> available for Fedora and others, but not for debian.
>
See [1], it seems there are good reasons not to use Openblas+OpenMP.
[1] https:/ /bugs.debian. org/737675
> One option is to replace libopenblas dependency by libatlas (it will also
> eliminate the problems with scipy). The PFV code will be suboptimal and
> non-parallel, but people seeking performance can always recompile with
> openblas.
>
Sure, we can switch to atlas, if you think it will fix (at least partially)
the problem.
Anton