This directory contains example programs for using the SimTKlapack library. The Makefile assumes that the libSimTKlapack library was installed in ../../lib32_64. and the SimTKlapack.h header file has been installed in ../include. You will also have to set you _PATH_ environment variable at runtime to point to the installed location of the SimTKlapack library. This directory contains two example programs for using SimTKlapack (dgesv.c and zgeev.c) and one example program for checking the version information for SimTKlapack (check_lapack_version.c) The example programs show how C programs can call the Fortran interface for LAPACK routines. The basic rules for C programs calling Fortran routines are: 1) Function names are in lower case and have an underscore appended to the name. For example, if a C program calls LAPACK's ZGEEV routine the call would be: zgeev_( ... ). 2) Fortran routines pass scalar arguments by reference. (except for character string "length" arguments that are normally hidden from FORTRAN programmers) Therefore a C program needs to pass pointers to scalar arguments. 3) In Fortran 2-D arrays are stored in column major format meaning that the matrix A = [ 1.0 2.0 ] [ 3.0 4.0 ] declared as a(2,2) would be stored in memory as 1.0, 3.0, 2.0, 4.0. While a C 2-D array declared as a[2][2], would be stored in row-major order as 1.0, 2.0, 3.0, 4.0. Therefore C programs may need to transpose 2D arrays before calling the Fortran interface. 4) The lengths of character strings need to be passed as additional arguments which are added to the end of the parameter list. For example, LAPACK's ZGEEV routine has two arguments which are character strings: JOBVL, JOBVR. ZGEEV( JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO ) A C program calling ZGEEV would need to add two additional arguments at the end of the parameter list which contain the lengths of JOBVL, JOBVR arguments: char *jobvl = "N"; char *jobvr = "V"; int len_jobvl = 1; /* length of jobvl */ int len_jobvr = 1; /* length of jobvr */ . . . zgeev_( jobvl, jobvr, &n, a, &lda, w, vl, &ldvl, vr, &ldvr, work, &lwork, rwork, &info len_jobvl, len_jobvr); ^^^^^^^^ ^^^^^^^^ additional arguments