LIBLAC - Structured Data Types and Basic Operations for Numerical Linear Algebra in an ANSI C/Fortran 77 Environment

Daniel B. Leineweber and Jochen A. Jost

Abstract. The C/Fortran library LIBLAC provides a set of convenient, structured data types and basic operations for numerical linear algebra. The library is intended to facilitate the ANSI C implementation of high-level applications which involve hierarchically structured data like partitioned vectors or block matrices. By maintaining compatibility with Fortran 77 conventions (e.g., matrices are stored by columns, and vectors may have arbitrary memory strides), the task of sharing data with existing Fortran 77 code is greatly simplified. Basic operations for data access, data copying/conversion, and input/output are supported in fully generic form. In addition, safe and user-friendly interfaces to Level 1-3 BLAS [2,3,4] and LAPACK [1] are provided, i.e., the use of existing libraries of highly efficient Fortran 77 subroutines is encouraged for performing common lower level computations. LIBLAC is easily portable to platforms supporting ANSI C and Standard Fortran 77, and it fully encapsulates the platform-dependent details of the C/Fortran interface, thereby resolving the inherent portability problems of mixed-language programs. The performance of typical applications is competitive with Fortran 77/BLAS.

  1. Anderson, E., Z. Bai, C. Bischof, J.W. Demmel, J.J. Dongarra, J. Du Croz, A. Greenbaum, S. Hammarling, A. McKenney, S. Ostrouchov, and D. Sorensen: LAPACK Users' Guide. Second Edition. SIAM, Philadelphia, PY, 1995.
  2. Dongarra, J.J., J. Du Croz, S. Hammarling, and R.J. Hanson: An extended set of Fortran Basic Linear Algebra Subprograms. ACM Trans. Math. Softw. 14(1):1-17, 1988.
  3. Dongarra, J.J., J. Du Croz, S. Hammarling, and I. Duff: A set of Level 3 Basic Linear Algebra Subprograms. ACM Trans. Math. Softw. 16(1):1-17, 1990.
  4. Lawson, C.L., R.J. Hanson, D.R. Kincaid, and F.T. Krogh: Basic Linear Algebra Subprograms for Fortran usage. ACM Trans. Math. Softw. 5(3):308-323, 1979.


Correspondence should be addressed to daniel.leineweber.dl@bayertechnology.com