CHTML
The Chunks and Tasks Matrix Library
This is the page of the Chunks and Tasks Matrix Library (CHTML).
CHTML is a hierarchical matrix library written using the Chunks and
Tasks programming model.
Within CHTML matrices are represented using a quad-tree data
structure, see the CHTML article for further
details.
Compiling and running a CHTML sample program using CHT-serial
As a specific example, here follows a description of how to compile
and run the
CHTML matrix sample
code using CHT-serial.
We assume here that the CHT-serial, CHTML, and CHTML matrix sample
source code packages cht-serial-2.0.tar.gz, cht-matrix-lib-2.0.tar.gz,
and sample-chtml-symatrix-square.tar.gz are placed in the user's home
directory, in this example /home/emanuel/.
First, unpack and build the CHT-serial library:
tar -xzf cht-serial-2.0.tar.gz
cd cht-serial-2.0/
make
Unpack the CHTML library:
cd ~
tar -xzf cht-matrix-lib-2.0.tar.gz
Unpack the CHTML matrix sample and rename Makefile.serial to Makefile:
tar -xzf sample-chtml-symatrix-square.tar.gz
cd sample-chtml-symatrix-square/
mv Makefile.serial Makefile
Edit the first line of the Makefile so that CHTPATH points to the
directory containing the CHT-serial library files:
CHTPATH=/home/emanuel/cht-serial-2.0/source
Edit the second line of the Makefile so that CHTMLPATH points to the
directory containing the CHTML library files:
CHTMLPATH=/home/emanuel/cht-matrix-lib-2.0/source
Now you can compile using make:
make
Now the executable file test_symm_square_serial has been created. Run the program in the usual way:
./test_symm_square_serial
Note that since CHTML is a header-only library there is nothing to build in that directory.
Compiling and running a CHTML sample program using CHT-MPI
As a specific example, here follows a description of how to compile
and run the
CHTML matrix sample
code using CHT-MPI.
We assume here that the CHT-MPI, CHTML, and CHTML matrix sample
source code packages cht-mpi-2.0.tar.gz, cht-matrix-lib-2.0.tar.gz,
and sample-chtml-symatrix-square.tar.gz are placed in the user's home
directory, in this example /home/emanuel/.
First, unpack and build the CHT-MPI library:
tar -xzf cht-mpi-2.0.tar.gz
cd cht-mpi-2.0/
make
Now, the CHT-MPI library file /home/emanuel/cht-mpi-2.0/source/libcht.a
has been created.
Unpack the CHTML library:
cd ~
tar -xzf cht-matrix-lib-2.0.tar.gz
Unpack the CHTML matrix sample and rename Makefile.parallel to Makefile:
tar -xzf sample-chtml-symatrix-square.tar.gz
cd sample-chtml-symatrix-square/
mv Makefile.parallel Makefile
Edit the first line of the Makefile so that CHTPATH points to the
directory containing the CHT-MPI library files:
CHTPATH=/home/emanuel/cht-mpi-2.0/source
Edit the second line of the Makefile so that CHTMLPATH points to the
directory containing the CHTML library files:
CHTMLPATH=/home/emanuel/cht-matrix-lib-2.0/source
Now you can compile using make:
make
Now the executable file test_symm_square_manager and cht_worker have been created. Run the program using mpirun:
mpirun -np 1./test_symm_square_manager
Note that although cht_worker is not directly invoked from the command
line, it is still essential since the test_symm_square_manager program
will spawn worker processes that run the cht_worker executable.
Source code
To download CHTML source code, please follow this link: source code download
Click here to return to the Other resources page.