[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: Bits about Intel MKL packaging -- Higher Priority than OpenBLAS



OBOn Mon, Apr 30, 2018 at 05:49:16PM +0200, Sébastien Villemot wrote:
> On Mon, Apr 30, 2018 at 03:31:29PM +0000, Lumin wrote:
> 
> > Four symbol links are installed to usr/lib/${DEB_HOST_MULTIARCH}/mkl/
> > directory, see [2][3]. Using ld.so environt variable to switch
> > blas/lapack is documented in README.Debian [4].
> 
> Reading that README.Debian, I realize that your implementation of the debconf
> prompt changes the priority to 50. This is not what I had in mind. I think that
> the priority should be left unchanged if the user answers yes to the prompt,
> but in that case the postinst script would manually select the MKL alternative
> using an extra command:
> 
>  update-alternatives --set libblas.so.3-@DEB_HOST_MULTIARCH@ /usr/lib/@DEB_HOST_MULTIARCH@/libmkl_rt.so
> 
> (and similarly for other alternative groups)

And, if the user replies no, then the script should put back the alternative in
automatic mode if it was previously pointing on MKL. This could be done with:

if [ $(update-alternatives --query libblas.so.3-@DEB_HOST_MULTIARCH@ | grep ^Value: | cut -d ' ' -f 2) = /usr/lib/@DEB_HOST_MULTIARCH@/libmkl_rt.so ]; then
  update-alternatives --auto libblas.so.3-@DEB_HOST_MULTIARCH@
fi

In this way, the script will work as expected:

- if MKL was not already selected and the user says no, the setting will be
  left untouched (either in automatic or manual mode, depending on the user
  customization)

- if MKL was already selected and the user says no (e.g. after a reconfigure),
  then MKL will be unselected (and the BLAS with the highest priority will
  become the current alternative)

- if the user says yes, MKL is selected (while with your actual code, if the
  alternative was in manual mode, then MKL would still be unselected even with
  priority 50)

-- 
⢀⣴⠾⠻⢶⣦⠀  Sébastien Villemot
⣾⠁⢠⠒⠀⣿⡁  Debian Developer
⢿⡄⠘⠷⠚⠋⠀  http://sebastien.villemot.name
⠈⠳⣄⠀⠀⠀⠀  http://www.debian.org

Attachment: signature.asc
Description: PGP signature


Reply to: