Interfacing librsb into Epetra
Created by: michelemartone
Hi. After my talk at EUROTUG'16 on Apr. 18-20 2016 near Munich [ https://www.mhpc.mw.tum.de/index.php?id=38 ] and subsequent discussion with Michael and Mark I've been encouraged to propose an incremental integration of the sparse matrix type RSB (provided by librsb [ http://librsb.sourceforge.net/ ]) into Epetra. So following such a minimalist approach I have modified a few lines in Epetra_CrsMatrix (from trilinos-12.6.1) to use librsb for: MV/MTV/SV/SM, in code delimited by the HAVE_EPETRA_RSB preprocessor symbol; and constructs in Epetra_CrsMatrix::FillComplete and in the copy constructor. So the prototype I am providing creates an RSB copy of the matrix just for the purposes of using it in the operations above.
I am also working on a proper "Epetra_RsbMatrix" class, but let's first see if this one here is able to sustain some tests for the above operations.
The way I suggest to build this is:
- use attached version of Epetra_CrsMatrix.cpp and Epetra_CrsMatrix.h and put attached rsb.hpp (the Epetra-agnostic C++ wrapper to librsb) into e.g. /opt/librsb/include/
- build Epetra including e.g.
- link with e.g.
/opt/librsb/bin/librsb-config --ldflags-fopenmp -lm -lz
I attach the source files I have used, with ".txt" appended to the filename. The rsb.hpp file is meant to become part of a future release of librsb.
I am new here, so if there is a more practical approach to follow to provide this proof-of-concept test, please suggest it to me.