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

Re: Compiling binaries on package installation



Hi Michael,

Thanks for the quick reply.

On 14-10-14 14:14, Michael Banck wrote:
> Hi,
> 
> On Tue, Oct 14, 2014 at 02:00:08PM +0200, L.C. Karssen wrote:
>> I'm working on a tool that uses linear algebra libraries like Lapack and
>> OpenBLAS.
>> Normally I would compile the tool on the user's machine upon
>> installation (using e.g. the -march=native GCC option) in order to
>> achieve proper performance. Is there a way to do this in a Debian
>> package so that it compiles the binary when you install the package?
>> Maybe in a similar way as some kernel modules are compiled?
> 
> Building a whole package on install looks like the wrong (from a Debian
> point of view) approach.
> 
> I think what we need is a tool more like module-assistent, which makes
> it easy to rebuild some performace-critical packages on the user's box
> with native optimisation.

That's what I meant with 'the way some kernel modules are compiled'. I
couldn't for the life of me remember the name of the tool.


>  
> If your project is using advanced CPU instructions (I guess not,
> but...), then runtime detection like fftw3 is doing it would be an
> option.

I'll check. The linear algebra code is written by an HPC guy, so I'm not
exactly sure if only Lapack and OpenBLAS need to be native, or the code
he wrote himself also needs that.

Thanks for pointing to fftw3, I'm going through the rules file there now.

> 
>> Or should I point out how to "compile your own", like it is done in the
>> "Building an optimized OpenBLAS packages on your architecture" in the
>> README.Debian file of openblas-base?
> 
> Not sure what's in those files, but I suggest to support
> DEB_BUILD_OPTIONS=custom in your Debian packaging, which would build an
> optimized package for a the user.  That's what the ATLAS package are
> (were?) doing, and if we have enough packages like that, doing the m-a
> like tool as mentioned above would be a matter of knowing which packages
> do support it.

Thanks, I'll have a look at the ATLAS package to see what they're doing.


Lennart.

> 
> 
> Michael
> 
> 

-- 
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
Utrecht
The Netherlands

lennart@karssen.org
http://blog.karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: