|
[Rivet] Eigen2Andy Buckley andy.buckley at ed.ac.ukTue Nov 3 23:31:29 GMT 2009
Hendrik Hoeth wrote: > Thus spake Frank Siegert (frank.siegert at durham.ac.uk): > >> Andy Buckley, Tuesday 03 November 2009: >> >>> We can certainly install these headers... I'd forgotten that we >>> were previously installing the eigen headers. I'll add something >>> equivalent for eigen2. >> Is that really something that should live in the Rivet source tree? > > I vote against it. We've failed before with that kind of experiment > (bundling boost with Rivet), and I really don't see why we need a > multi-MByte replacement for some few-kByte headers that we had before. I actually agree... I hadn't realised eigen2 was so big... nor that it had become a system package that we could think about relying on. In general, I do want to move away from eigen1, since it's unmaintained and the hyperactivity in eigen2 has produced some really cool stuff that it would definitely be nice to benefit from, if it's cheap to do so. But this overhead/dependency seems overly heavy to me right now. So I'll push this into a branch for future resurrection when it seems viable... having done the migration work I don't want to throw it away entirely! I'll revert to the previous use of eigen1, but re-port the extra fuzzyEquals comparators for Matrix and Vector types and the extra testMatVec assert checks. >> If we were to make it external: Which Rivet features depend on it? I >> have to admit that I wasn't aware of eigen being used in and part of >> Rivet before this change. The internal representations of the matrices and vectors have always been done via eigen... it could have been done by hand but when there's a high quality (and for eigen1, lightweight) library available for the core linear algebra stuff, it seemed/seems sensible to use it and benefit from someone else doing the optimisation and debugging. > I didn't know that either, so I'm also interested in an answer to this > question. And I want to add another one: How much of an performance > improvement is it really to switch from eigen-1 to eigen-2? How much > time do we actually spend in matrix operations? Hard to tell, because it all inlines: the matrices include all the vector operations, too, of which there are a lot in Rivet. I've not tried any profiling, but it's an obvious area where computational benefit can be gained by using someone else's library. > If upgrading to eigen2 indeed has a large impact, then I'd still add it > as external requirement rather than bloating the Rivet package with it. > If the improvement is not dramatic, I'd keep eigen rather than > introducing a new dependency. Agreed, and I'll do that. When it's not socially hard to do the upgrade, I'll reinstate this code, since there is something to be gained in performance and in making sure that the 3rd party code we use is actively maintained. >> While talking about not finding headers needed to compile with >> Rivet... shouldn't we add the -I/path/to/boost/include and >> -I/path/to/eigen2 to rivet-config --cppflags? > > I guess that can't hurt ... Sounds good to me: please add them! Andy -- Dr Andy Buckley SUPA Advanced Research Fellow Particle Physics Experiment Group, University of Edinburgh The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
More information about the Rivet mailing list |