[CMake] CMake 2.8.7-rc2 ready for testing!

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Dec 30 15:25:42 EST 2011


I have investigated further, and I now think Dave is right with his
desire to go ahead with the release of the rc2 versions of the
lapack/blas find modules.  (Sorry, Dave, for this flip-flop at the
last minute, but such deeper investigations take time.)

What appears to be going on is that in 2.8.5 the usual mechanisms to
choose libraries (CMAKE_LIBRARY_PATH, CMAKE_FIND_ROOT_PATH) work
correctly because they trump (according to my tests) the vendor choice
(which defaults to ALL).
So even though my system has both an atlas and generic version of blas installed, that
is ignored for 2.8.5 and the generic blas version is used instead from
the location designated by CMAKE_LIBRARY_PATH or CMAKE_FIND_ROOT_PATH).

But in 2.8.7-rc2, the vendor choice trumps CMAKE_LIBRARY_PATH and
CMAKE_FIND_ROOT_PATH.  So given a choice between the generic version
of blas in CMAKE_LIBRARY_PATH and my system's generic and atlas
versions of blas, rc2 picks the system atlas version.  I guess that is
a reasonable choice because for large matrices atlas is normally
faster than the generic version.  However, for small matrices (such as
in FreeEOS) it is noticeably slower.

So in sum, there has been a fundamental shift in how the lapack/blas
libraries are chosen.  I assume that was a deliberate change in design
so it was probably unfair for me to call it a regression, but a
prominent announcement of this important change would have been
appropriate to avoid misunderstandings.

For my own use case, I have found setting -DBLA_VENDOR:STRING=Generic
and CMAKE_LIBRARY_PATH (or presumably CMAKE_FIND_ROOT_PATH which
I haven't tested for this configuration) gives me

-- LAPACK_LIBRARIES =
/home/software/lapack/install_double/lib/liblapack.a;/home/software/lapack/install_double/lib/libblas.a

i.e., the results I want for FreeEOS both 2.8.5 and 2.8.7-rc2.

That'a slightly more complicated for FreeEOS users (which tend to have
their own built versions of lapack/blas just like I do) than what
worked up to and including CMake-2.8.5.  But that additional
complication is completely acceptable.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list