tech-pkg archive

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

Re: BLAS in pkgsrc: present and future



On 2019-05-30 01:26, Dr. Thomas Orgis wrote:
Am Wed, 29 May 2019 17:12:18 -0500
schrieb Jason Bacon <outpaddling%yahoo.com@localhost>:

I think we need a way to override BLAS_TYPE gracefully, perhaps by
building with the first variant in BLAS_ACCEPTED when none of them match
BLAS_TYPE?
Sure. Since they all can be installed at the same time, this does make
sense. We had this discussion on variable names and semantics. Is this a conclusion we can agree on?

mk.conf variables:

PKGSRC_BLAS_PREFERRED: a list of implementations the user prefers
PKGSRC_BLAS_TYPE: hard override to choose exactly one

package variables:

PKGSRC_BLAS_ACCEPTED: implementations that the package works with

Then, blas.buildlink3.mk uses this logic:

1. If PKGSRC_BLAS_TYPE is set, use that and error out if it is
    not in the list PKGSRC_BLAS_ACCEPTED.

2. If PKGSRC_BLAS_PREFERRED is set, match against PKGSRC_BLAS_ACCEPTED
    and use the first match to set PKGSRC_BLAS_TYPE. If there is no
    match, the first entry in PKGSRC_BLAS_ACCEPTED is used.

3. If only PKGSRC_BLAS_ACCEPTED is set, use the first in that to set
    PKGSRC_BLAS_TYPE.

4. Otherwise, resort to a default (netlib).

The package uses PKGSRC_BLAS_TYPE for the build.


Alrighty then,

Thomas

I think this would be reasonable behavior using these three variables.

We may have discussed this before and I missed/forgot it, but what is the reasoning behind creating a situation where a build fails? It's hard for me to imagine a user wanting a build to fail simply because the package is marked incompatible with their chosen BLAS implementation.?? The system you've created seems to make this unnecessary: just install a compatible BLAS and carry on. Eliminating this possibility simplifies the interface to two settable variables, which we would probably call PKGSRC_BLAS_PREFERRED and PKGSRC_BLAS_ACCEPTED.?? PKGSRC_BLAS_TYPE could serve the same purpose internally but not be considered user-settable.

Cheers,

?????? JB


Home | Main Index | Thread Index | Old Index