(:notabs:)
The BLAD - MULTIPLE - INTERFACES library is a C library which implements interfaces between the BLAD libraries, and various computer algebra systems such as MAPLE and SAGE. The corresponding MAPLE package is called DifferentialAlgebra. The corresponding SAGE package is currently under development. The BMI library is protected by the Lesser General Public License.
The first open source version bmi-2.0 was released on October 25th, 2010. The version bmi-3.0 was released on February 3rd, 2012. Starting from release 3.10, the version number of BMI follows the one of BLAD, i.e. bmi-3.10 is supposed to be used with blad-3.10.
BMI version 3.10.5 was released on February 1st, 2013 (it works with BLAD version 3.10.4).
Last update of these instructions: January 22, 2013, with MAPLE 16.
The following instructions aim at upgrading the versions of BLAD and BMI which are shipped with MAPLE using more recent ones. They build a directory tree which eventually looks as follows (there is a slight variant for users who download source code directly from the svn repository https://forge.lifl.fr/DifferentialAlgebra).
The following instructions are supposed to work with MAPLE 14, 15 and 16 over LINUX. They should also work on Sun Solaris, though I lack feedback concerning this platform.
DifferentialAlgebra (say, in $HOME) mkdir $HOME/DifferentialAlgebra
cd $HOME/DifferentialAlgebra
blad directory.
blad-3.10 (you may need to change it) and that blad-3.10.tgz is present in the DifferentialAlgebra directory tar xzf blad-3.10.tgz mv blad-3.10 blad
blad but under blad/trunk svn checkout --username your-login https://forge.lifl.fr/DifferentialAlgebra/svn/main/blad
blad/trunk/configure file. cd blad/trunk
mkdir config
libtoolize --force --copy
aclocal
autoheader
automake --add-missing --copy
autoconf
automake and autoconf.
cd $HOME/DifferentialAlgebra
mkdir blad-build
cd blad-build
../blad/configure --prefix=$HOME/DifferentialAlgebra/blad-install
../blad/trunk/configure at line 4.
libgmp-dev, because you need the header file gmp.h. If this library is installed in some directory (say) /usr/local/gmp, which is not automatically scanned by the C compiler, you should pass the option --with-gmp=/usr/local/gmp at line 4.
blad-install directory and the files blad-install/lib/libblad.so.* make
make check [optional]
make install
bmi directory (see remarks at step 2).
tar xzf bmi-3.10.tgz
mv bmi-3.10 bmi
svn checkout --username your-login https://forge.lifl.fr/DifferentialAlgebra/svn/main/bmi
bmi/trunk/configure file (see remarks at step 3). cd bmi/trunk
mkdir config
libtoolize --force --copy
aclocal
autoheader
automake --add-missing --copy
autoconf
cd $HOME/DifferentialAlgebra
mkdir bmi-build
cd bmi-build
../bmi/configure --prefix=$HOME/DifferentialAlgebra/bmi-install --with-blad=$HOME/DifferentialAlgebra/blad-install --enable-maple=yes
../bmi/trunk/configure at line 4.
/usr/local/gmp, which is not automatically scanned by the C compiler, you should pass the option --with-gmp=/usr/local/gmp at line 4.
/usr/local/maple16, you should specify it at the beginning of line 4, starting the command by: MAPLE=/usr/local/maple16/bin/maple ../bmi/configure
bmi-install directory and the file bmi-install/lib/libbmi.so make
make install
DifferentialAlgebra0 package is created and installed in the bmi-install/maple directory.
cd /usr/local/maple/bin.OS
mv libblad.so libblad.so.orig
mv libbmi.so libbmi.so.orig
ln -s $HOME/DifferentialAlgebra/blad-install/lib/libblad.so.0.0.0 libblad.so
ln -s $HOME/DifferentialAlgebra/bmi-install/lib/libbmi.so.0.0.0 libbmi.so
OS suffix at line 1 depends on your architecture (e.g. X86_64_LINUX on a 64 bits Linux). This directory can be determined using the kernelopts(bindir) command, in MAPLE.
sudo command.
blad-install/lib and bmi-install/lib directories, there are actual dynamic libraries and various symbolic links. Using ls -l and looking at the sizes of the files, it is easy to find out the names of the actual dynamic libraries. The symbolic links should point to these libraries.
bindir directory. The advantage/drawback of symbolic links is: next time you upgrade BLAD and BMI, MAPLE gets automatically updated.
libblad.so and libbmi.so by the original files, in the MAPLE bin.OS directory (see former step). $ maple
> with (DifferentialAlgebra):
> R := DifferentialRing (derivations = [x], blocks = [y]);
DifferentialAlgebra0 package. It is sufficient to modify the MAPLE libname variable, so that it mentions the $HOME/DifferentialAlgebra/bmi-install/maple directory. Observe that shell variables have to be replaced by their values. Here is an example. $ maple
> libname := "/home/boulier/DifferentialAlgebra/bmi-install/maple", libname:
> integrate := DifferentialAlgebra0:-Integrate;
DifferentialAlgebra and DifferentialAlgebra0 take advantage of the new libraries. They can be used at the same time.
svn update commands) and to perform again steps 3 to 5 and 7 to 9.
On this platform, this issue lies in the fact that MAPLE uses a specific GMP (the names of the GMP functions and the name of the library itself are not the standard ones) and that BLAD and BMI must use it. In the following, we assume that MAPLE is installed in /Library/Framework/Maple.Framework/Versions/16.
DifferentialAlgebra (say, in $HOME) mkdir $HOME/DifferentialAlgebra
cd $HOME/DifferentialAlgebra
blad directory.
blad-3.10 (you may need to change it) and that blad-3.10.tgz is present in the DifferentialAlgebra directory tar xzf blad-3.10.tgz
mv blad-3.10 blad
blad but under blad/trunk svn checkout --username your-login https://forge.lifl.fr/DifferentialAlgebra/svn/main/blad
blad/trunk/configure file. cd blad/trunk
mkdir config
glibtoolize --force --copy
aclocal
autoheader
automake --add-missing --copy
autoconf
automake and autoconf.
glibtoolize instead of libtoolize.
DifferentialAlgebra directory. For the GMP dynamic library, we reuse the one of MAPLE. cd $HOME/DifferentialAlgebra
mkdir maplegmp
mkdir maplegmp/include
mkdir maplegmp/lib
mv gmp.h maplegmp/include
ln -s /Library/Frameworks/Maple.framework/Versions/16/bin.APPLE_UNIVERSAL_OSX/libmgmp.dylib maplegmp/lib/libgmp.dylib
cd $HOME/DifferentialAlgebra
mkdir blad-build
cd blad-build
../blad/configure --prefix=$HOME/DifferentialAlgebra/blad-install --with-gmp=$HOME/DifferentialAlgebra/maplegmp
../blad/trunk/configure at line 4.
blad-install directory and the files blad-install/lib/libblad.dylib make
make install
make check is not supposed to work with this version of GMP.
bmi directory (see remarks at step 2).
tar xzf bmi-3.10.tgz
mv bmi-3.10 bmi
svn checkout --username your-login https://forge.lifl.fr/DifferentialAlgebra/svn/main/bmi
bmi/trunk/configure file (see remarks at step 3). cd bmi/trunk
mkdir config
glibtoolize --force --copy
aclocal
autoheader
automake --add-missing --copy
autoconf
cd $HOME/DifferentialAlgebra
mkdir bmi-build
cd bmi-build
../bmi/configure --prefix=$HOME/DifferentialAlgebra/bmi-install --with-blad=$HOME/DifferentialAlgebra/blad-install --with-gmp=$HOME/DifferentialAlgebra/maplegmp --enable-maple=yes
../bmi/trunk/configure at line 4.
MAPLE=/Library/Frameworks/Maple.framework/Versions/16/bin/maple ../bmi/configure
bmi-install directory and the files bmi-install/lib/libbmi.dylib make
make install
DifferentialAlgebra0 package is created and installed in the bmi-install/maple directory.
otool -L $HOME/DifferentialAlgebra/blad-install/lib/libblad.dylib
...
libmgmp.dylib (compatibility version 8.0.0, current version 8.1.0)
...
nm $HOME/DifferentialAlgebra/blad-install/lib/libblad.dylib | grep gmp
U ___maple_gmp_get_memory_functions
U ___maple_gmp_set_memory_functions
U ___maple_gmpn_lshift
...
libmgmp, not libgmp. In the result of the second command, one should see the ___maple_ prefix before all GMP functions.
cd /Library/Frameworks/Maple.framework/Versions/16/bin.APPLE_UNIVERSAL_OSX
mv libblad.dylib libblad.dylib.orig
mv libbmi.so libbmi.so.orig
ln -s $HOME/DifferentialAlgebra/blad-install/lib/libblad.0.dylib libblad.dylib
ln -s $HOME/DifferentialAlgebra/bmi-install/lib/libbmi.0.dylib libbmi.so
sudo command.
blad-install/lib and bmi-install/lib directories, there are actual dynamic libraries and various symbolic links. Using ls -l and looking at the sizes of the files, it is easy to find out the names of the actual dynamic libraries. The symbolic links should point to these libraries.
libblad.dylib and libbmi.so by the original files, in the MAPLE bin.APPLE_UNIVERSAL_OSX directory (see former step). $ maple
> with (DifferentialAlgebra):
> R := DifferentialRing (derivations = [x], blocks = [y]);
DifferentialAlgebra0 package. It is sufficient to modify the MAPLE libname variable, so that it mentions the $HOME/DifferentialAlgebra/bmi-install/maple directory. Observe that shell variables have to be replaced by their values. Here is an example. $ maple
> libname := "/home/boulier/DifferentialAlgebra/bmi-install/maple", libname:
> integrate := DifferentialAlgebra0:-Integrate;
DifferentialAlgebra and DifferentialAlgebra0 take advantage of the new libraries. They can be used at the same time.
svn update commands), to recompile them and to reinstall them in blad-install and bmi-install.
Download the blad-windows-* and bmi-windows-* tarballs from the BLAD page and this one.
blad.dll and bmi.dll, plus the MAPLE library files maple.ind, maple.lib and maple.hdb containing the experimental DifferentialAlgebra0 package, for your platform. There are two possible methods
bmi.dll.
blad.dll and bmi.dll by the new ones. It is recommended to make a copy of the old files before replacement. These files are located in a directory called bin.win or bin.X86_64_WINDOWS, depending on the architecture of the machine. The location of this directory can be determined using the kernelopts(bindir) command, in MAPLE.
DifferentialAlgebra0 package. It is sufficient to list the directory containing the MAPLE library files in the MAPLE libname variable.
To be done