Bug 1920009

Summary: Forced use of openblas-serial globally
Product: [Fedora] Fedora Reporter: Susi Lehtola <susi.lehtola>
Component: nwchemAssignee: marcindulak <Marcin.Dulak>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: i.ucar86, Marcin.Dulak
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nwchem-7.0.2-6.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-07 01:32:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Susi Lehtola 2021-01-25 14:41:34 UTC
Launching Octave I get the FlexiBLAS error message

$ octave
flexiblas BLAS backend  "OPENBLAS-SERIAL" not found. Loading default (OPENBLAS-OPENMP) instead.
GNU Octave, version 5.2.0

even though all OpenBLAS libraries are installed.

$ rpm -q octave openblas-serial 
octave-5.2.0-7.fc33.x86_64
openblas-serial-0.3.12-1.fc33.x86_64

Comment 1 Iñaki Ucar 2021-01-25 14:49:05 UTC
Do you have flexiblas-openblas-serial installed?

Comment 2 Susi Lehtola 2021-01-25 15:04:59 UTC
Doesn't seem like it.

If it is the default backend, why isn't it installed automatically?

Comment 3 Iñaki Ucar 2021-01-25 15:13:22 UTC
It is not the default backend. In fact, from your first comment:

flexiblas BLAS backend  "OPENBLAS-SERIAL" not found. Loading default (OPENBLAS-OPENMP) instead.

openblas-openmp is the default backend. Maybe you modified the user config? Please, run `flexiblas list` to see what's in there.

Comment 4 Susi Lehtola 2021-01-25 15:38:52 UTC
I have not touched any settings. This is in fact a fresh install of Fedora 33 from scratch a new laptop.

$ flexiblas list
System-wide:
System-wide (config directory):
 NETLIB
   library = libflexiblas_netlib.so
   comment = 
 OPENBLAS-OPENMP
   library = libflexiblas_openblas-openmp.so
   comment = 
User config:
Host config:
Enviroment config:

Comment 5 Iñaki Ucar 2021-01-25 16:03:10 UTC
Strange. Could you please also run `echo $FLEXIBLAS`? It should be empty.

Comment 6 Iñaki Ucar 2021-01-25 16:29:55 UTC
I cannot reproduce this with the fedora:33 docker image. If you did a fresh install, the only thing I can think of is that some package is defining the FLEXIBLAS environment variable and exporting it globally.

Comment 7 Susi Lehtola 2021-01-25 16:38:05 UTC
That's indeed the case.

$ echo $FLEXIBLAS
openblas-serial

/etc/profile.d/nwchem.csh:setenv FLEXIBLAS openblas-serial
/etc/profile.d/nwchem.sh:export FLEXIBLAS=openblas-serial

In other words, the NWChem package is forcing everything else to run in sequential mode, which is an utterly horrible performance degeneration.

Comment 8 Iñaki Ucar 2021-01-25 17:30:32 UTC
@marcindulak nwchem shouldn't be adding either FLEXIBLAS nor OMP_NUM_THREADS to the global profile, as you were discussing in [https://github.com/edoapra/fedpkg/issues/10]. This effectively forces everyone and everything else to run under such parameters. If nwchem requires openblas-serial, you should

- add Requires: flexiblas-openblas-serial
- add a launcher that calls nwchem with FLEXIBLAS and/or OMP_NUM_THREADS set **locally**

Comment 9 Fedora Update System 2021-01-29 12:22:22 UTC
FEDORA-2021-b8628ad5c4 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-b8628ad5c4

Comment 10 Iñaki Ucar 2021-01-29 12:51:28 UTC
Thank you. Hopefully, future versions of flexiblas will have a mechanism to set a backend per application in the configuration, eliminating the need for a wrapper.

Comment 11 Fedora Update System 2021-01-30 01:29:20 UTC
FEDORA-2021-b8628ad5c4 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-b8628ad5c4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-b8628ad5c4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2021-02-07 01:32:28 UTC
FEDORA-2021-b8628ad5c4 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.