How
to install the library
The library is available by ftp:
Here are the instructions to install the library:
- If you get the file synaps-2.1.0.tar.gz by ftp, type
tar zxvf synaps-2.1.0.tar.gz
(or gzip -dc synaps-2.1.0.tar.gz |tar -xvf -). You will otain a directory
synaps-2.1.0 containing the current distribution, that you will put at
your convenience in a place that we will refer hereafter by
<synaps-2.1.0>.
- Move in <synaps-2.1.0> and type ./configue; make &&
make install. You
will obtain
- the script s++ configured for your environnement and that
you can then put where you want (eg. in your PATH),
- documentation files in the directory doc.
See ./configure -h
for the different options.
Here is an example, that we use on our site (see configure-sophia file)
./configure \
--with-blas= [where is the libblas.a] \
--with-lapack= [where is the liblapack.a] \
--with-gmp= [where is the directory gmp] \
--with-mpsolve= [where is the directory mpsolve] \
--infodir= [where to install the documentation, with make install] \
--bindir= [where to install s++, with make install] \
--prefix= [where to install the rest of the library]
In order to install it, type
./configure
make && make install
In order to tune the configuration to your site, consider the
options given by
./configure -h
You may also look at the exemple configure-sophia that we are using.
Warning
The version of the g++ compiler should be at least
g++ 3.*
ie. the c++ compiler should support the Koenig lookup mechanism.
Once the s++ script has been generated, it can
be used as a compiler command, as follows:
s++ <file>.[cc|C]
It will generate an executable file <file>.ex You can try a
first example from the directory <synaps>:
s++ test/linalg.cc
3.1 Compilation under emacs
It is convenient to use the emacs compile-mode, to compile such a
<file>.cc:
- Edit the <file>.cc with emacs
- Compile it Esc-x compile [return] s++ <file>.cc
- If errors appear, click on the corresponding hightlighted part to go to
their locations and to correct them.
3.2 The options
The options of the command s++ are optained by typing
s++ -h
Any option not present there is passed directly to the c++ compile,
as shown here:
s++ file.cc -Wall -O6 -mcpu=
3.3 Check the installation
A usefull command to check the installation is s++ -v, which
produces:
VERSION = <time when you produce the s++ command>
SOURCES = <source dir>
INCDIR = -I<includedir1> ...
LIBDIR = -L<libdir1> ...
LIB = -llib1 ...
OPTION = <options of compilation>
OBJ = <list of object files>
CXX = <c++ compiler used>
...
No file specified
3.4 Separate compilation
Files can be compiled separately. Using the option -c as follows
s++ -c <file>.cc
will produce a file.o, which you will be able to link to another
application.
3.5 Compile and run the executable
The file that you compile can be executed by
s++ <file>.cc -run # Compile and run the <file>.ex
s++ <file>.cc -exe # Execute the <file>.ex
The library synaps is connected to external libraries of the
roxane project. For more information on how to get these libraries
and to install them, see
In order to install synaps in a previous configuration, see
./configure -h
for the different options.
If you want to contribute to its development you may also
get it via the cvs server, by typing:
cvs -d :pserver:cvs@cvs-sop.inria.fr:/CVS/galaad login
cvs -d :pserver:cvs@cvs-sop.inria.fr:/CVS/galaad co synaps
This will allow you to update easily the forthcomming versions, by typing
in the synaps directory:
cvs update -Pd
Before you install the library, you have to type
./init_step.sh
then
./configure ... && make
Before you commit anything, to type
make check