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

Re: Compiling binaries on package installation



On Tue, Oct 14, 2014 at 02:56:43PM +0200, L.C. Karssen wrote:
> 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.

Hrm, but m-a is a user-centric tool and not automated on package
installation I believe.
 
The building-on-install approach would be DKMS, which I believe is how
kernel modules are treated nowadays.

Note that an additional requirement/use-case for this is that users
might very well have a lot of different kernel versions installed, and a
kernel module needs to be built for all.  Also kernel module building
time is not orders of magnitude longer than the installation of other
packages.
 
> > 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.

Well, in that case it would make (even) more sense to have optimized
linear algebra libraries installed, as opposed to building your project
in an optimized fashion?
 

Michael


Reply to: