Installation
The installation of the getfem-interface toolbox can be somewhat tricky, since it combines a C++ compiler, libraries and Matlab interaction...In case of troubles with a non-GNU compiler, gcc/g++ ( >= 3.0) should be a safe solution.
CAUTION:
- you should not use a different compiler than the one that was used for getfem++.
- you should have built the getfem++ static library (i.e. do not use ./configure -disable-static when building getfem++). On linux/x86_64 platforms, a mandatory option when building getfem++ and getfem-interface (and any static library linked to them) is the -with-pic option of their ./configure script.
Here we assume that getfem++ was installed in the directory gfdest_dir (i.e. you ran ./configure -prefix=gfdest_dir before compiling and installing getfem++, the default value being /usr/local).
Unpack the getfem-interface archive and run the configure script:
# gzip -dc getfem-interface-2.0.tar.gz | tar xvf -
# cd getfem-interface-2.0
If you did install getfem++, then running
./configure or ./configure -prefix=gfdest_dir
should be sufficient.
Nevertheless, if gfdest_dir/bin is not in the PATH, then you will
have to to provide the path to the getfem-config script
with -with-getfem-config=/gfdest_dir/bin/getfem-config.
You may also use -with-toolbox-dir=toolbox_dir to
change the default toolbox installation directory ($prefix/getfem_toolbox).
Use ./configure -help for more options.
When the configure is done, you can compile the toolbox (use gmake if your default make is not the GNU one)
# makeAn optional step is make check in order to check the matlab interface (this sets some environment variables and runs the check_all.m script which is the tests/matlab directory of the distribution)
and install it (the libraries will be copied in gfdest_dir/lib, while the MEX-File and M-Files will be copied in toolbox_dir)
# make install
If you want to use a different compiler than the one chosen automatically by the ./configure script, just specify its name on the command line: ./configure CXX=mycompiler.
The last step is to add the path to the toolbox in the matlab path:
- you can set the environment variable MATLABPATH to toolbox_dir (export MATLABPATH=toolbox_dir for example).
- you can put addpath('toolbox_dir') to your $HOME/matlab/startup.m
More specific instructions can be found in the README* files of the distribution.
