Hi all,
Since graph theory is becoming increasingly important in the preprocessor, Ferhat and myself have agreed on reusing a standard library for graph manipulation.
A good choice seems to be the Boost Graph Library: http://www.boost.org/doc/libs/1_38_0/libs/graph/doc/index.html
It is written as C++ generic headers, and is distributed under a BSD-style license (i.e. very permissive), compatible with the GPL.
It contains various reusable structures for storing graphs (as adjacency list, adjacency matrix) and various algorithms (in particular strongly connected components).
The whole set of Boost libraries is distributed as Debian and Cygwin packages.
This leads me to another point: if we use the BGL (boost graph library), the build system of the preprocessor needs to know where the BGL headers are. Under Debian it is /usr/include, under Cygwin /usr/include/boost-1_33_1/, and it may be somewhere else for other systems (MacOS for example).
So I think that we should now have a "configure" script at the top level of the Dynare directory, which would autodetect the location of the BGL, and other stuff (such as those that are currently tested for in the preprocessor Makefile). This "configure" script could also be extended to facilitate the building of MEX files from the command line (as it seems to be necessary for k-order perturbation DLL). It could even enable us to replace the build_matlab.m script by a Makefile. With a single "make" at the top-level, we could build the preprocessor, the documentation and the MEX files.
The only drawback of adding this is that our build system will be tightly linked to Cygwin for Windows users, but I think that many people that recompile things on Windows already use Cygwin.
Any thoughts or suggestions on the Boost Graph Library and the "configure" script ?
Best,
I'm all in favor of using Boost Graph Library. For configure, we will have to carefully document how users can manually indicate where the various libraries are. For k_order_perturbation, the DLL depends upon a DLL provided by dynare++ and Matlab Lapack and BLAS libraries.
Best
Michel
Sébastien Villemot wrote:
Hi all,
Since graph theory is becoming increasingly important in the preprocessor, Ferhat and myself have agreed on reusing a standard library for graph manipulation.
A good choice seems to be the Boost Graph Library: http://www.boost.org/doc/libs/1_38_0/libs/graph/doc/index.html
It is written as C++ generic headers, and is distributed under a BSD-style license (i.e. very permissive), compatible with the GPL.
It contains various reusable structures for storing graphs (as adjacency list, adjacency matrix) and various algorithms (in particular strongly connected components).
The whole set of Boost libraries is distributed as Debian and Cygwin packages.
This leads me to another point: if we use the BGL (boost graph library), the build system of the preprocessor needs to know where the BGL headers are. Under Debian it is /usr/include, under Cygwin /usr/include/boost-1_33_1/, and it may be somewhere else for other systems (MacOS for example).
So I think that we should now have a "configure" script at the top level of the Dynare directory, which would autodetect the location of the BGL, and other stuff (such as those that are currently tested for in the preprocessor Makefile). This "configure" script could also be extended to facilitate the building of MEX files from the command line (as it seems to be necessary for k-order perturbation DLL). It could even enable us to replace the build_matlab.m script by a Makefile. With a single "make" at the top-level, we could build the preprocessor, the documentation and the MEX files.
The only drawback of adding this is that our build system will be tightly linked to Cygwin for Windows users, but I think that many people that recompile things on Windows already use Cygwin.
Any thoughts or suggestions on the Boost Graph Library and the "configure" script ?
Best,
Michel Juillard michel.juillard@ens.fr a écrit :
I'm all in favor of using Boost Graph Library. For configure, we will have to carefully document how users can manually indicate where the various libraries are. For k_order_perturbation, the DLL depends upon a DLL provided by dynare++ and Matlab Lapack and BLAS libraries.
The standard way of doing this with configure script would give something like:
./configure --with-boost=/usr/local/include --with-matlab=/usr/local/matlab78 --with-dynare++=/home/user/dynare++
And there would be sensible default values (at least for boost) in case the user doesn't specify a location. And for example if the user doesn't specify a value for Matlab, then an Octave-only version would be built. And vice-versa if the configure tool can't find Octave, then it would build a Matlab-only version.
Note that giving the path for Matlab is enough for finding: the "mex" command line tool, the BLAS and LAPACK libraries, the blas.h and lapack.h headers.
Hi all,
I have committed a change which implements the new configuration tool for the preprocessor.
You need to install Boost, and you must run the "configure" script in order to create the Makefile for the preprocessor.
Everything is explained on the wiki: http://www.dynare.org/DynareWiki/BuildingPreprocessor
Best,