|
|
Installation of the Parallel templates for numerical linear algebra library
- Make sure the BSP library is correctly installed on your system.
- Download the library from the Download section
- Extract the library, e.g.
koster@secantate:/tmp$ mkdir partempl
koster@secantate:/tmp$ cd partempl
koster@secantate:/tmp/partempl$ gzip -cd /your/download/dir/partempl-0.7.1.tar.gz | tar xvf -
- Link the appropriate configuration file from the config/ directory to config.target file in the base directory. By default
the config.target file points to config/config.linux. The config.linux file specifies the gcc and g++ compiler to perform compilation.
If the target system provides the GNU compiler this compiler should preferably be used. Likewise some system-specific settings for the
BSP compiler are set in this file. Feel free to experiment with these settings.
Linking a file can be accomplished by:
koster@secantate:/tmp/partempl$ rm -f config.target
koster@secantate:/tmp/partempl$ ln -s config/config.linux config.target
- type `make' to start compiling:
koster@secantate:/tmp/partempl$ make
Sometimes (still working on that) our Makefile is not compatible with the default make program; if this is this case one can try to
use the GNU make command by issueing:
koster@secantate:/tmp/partempl$ gmake
- Compilation should now start; the current version still exhibits two warnings, solving this has been added to the TODO list.
We have also noticed that the compiler of the Cray T3E is very noisy about our source-code, generating a seemingly endless list
of warnings. This is normal ;). In essence the (too old) Cray T3E compiler complains about almost the same virtual function
specifications. Since our library is intended to be used both in parallel and sequentially our source-code has to contain almost
the same virtual function declarations (polymorphisms) whenever sequential behaviour has to be overridden.
- After compilation the symbolic links in the lib/ directory are valid and the benchmarking programs have
been created (see benchmark/ directory). The libraries:
libnumalgbsp.a -> ../src/bsp/libnumalgbsp.a
libnumalgbspd.a -> ../src/bspd/libnumalgbspd.a
libnumalgseq.a -> ../src/seq/libnumalgseq.a
libnumalgseqd.a -> ../src/seqd/libnumalgseqd.a
The appended 'd' refers to debug variants that wil generate (per processor) a log file of the program-flow. Notice that a 20 iteration
run of GMRES will generate a log file of approximately 256K per processor. Applications that one whishes to run in debug mode should
be compiled with the flag _DEBUG defined and linked to the appropriated debug-library.
For normal execution (without debugging) the libnumalgbsp.a or libnumalgseq.a libraries should be linked with the application.
Example (non-debug):
bspc++ -flibrary-level 2 -O3 -D__CORE_BSP myprogram.cc \
-o myprogram -lnumalgbsp
g++ -O3 -D__CORE_SEQ myprogram.cc -o myprogram -lnumalgseq
Example (debug):
bspc++ -flibrary-level 2 -O3 -D_DEBUG -D__CORE_BSP myprogram.cc \
-o myprogram -lnumalgbspd
g++ -D_DEBUG -O3 -D__CORE_SEQ myprogram.cc -o myprogram -lnumalgseqd
- For actual programming usage: for the moment look at the benchmark programs like bicg (benchmarks/bicg) for example usage.
In future a users-guide will be made available.
- Questions/Remarks/Bugs: mailto:jhhkoste@xs4all.nl
|
|