Compilation:
For any operating system/machine type, you should be able to compile, using the liblapack.c and libblas.c files as ordinaly C files. For instance, in Linux, you would compile with the following commands:
cc -O3 -fomit-frame-buffer -c liblapack.c cc -O3 -fomit-frame-buffer -c libblas.c cc -O3 -fomit-frame-buffer -c lapack.c cc -O3 -fomit-frame-pointer lapack.o p480.o nrutil.o liblapack.o libblas.o -lm
If you have linux, you should also be able to use the vendor-supplied blas library. To compile with this, you would use
cc -O3 -fomit-frame-pointer -c liblapack.c cc -O3 -fomit-frame-pointer -c lapack.c cc -O3 -fomit-frame-pointer lapack.o p480.o nrutil.o liblapack.o -L. -lblas -lf2c -lmIf you find error messages like
xerbla.o(.text+0x1e): undefined reference to `do_fio' xerbla.o(.text+0x2b): undefined reference to `do_fio' xerbla.o(.text+0x30): undefined reference to `e_wsfe' xerbla.o(.text+0x3c): undefined reference to `s_stop'then you are mising the libf2c.a library mentioned at the top of this page. If this is the case, copying the libf2c.a file into your compilation directory should work (provided your version of Linux is compatible with ours, etc., etc.)
(grader writing)
For Windows users, there exists a package called the Intel Math Kernal Library which has the BLAS routines as well as FFT routines and some of LAPACK routines (not the "driver" routines, which are the highest level ones that you're most likely to call from your program). There are versions for Pentium II and Pentium III, and with different calling conventions. Below you can download the versions of the library appropriate for use with Visual Studio for PII or PIII (the computers in B3 are PIIs). The library comes with a C-interface, so you can call the routines like C-functions---passing by value instead of by reference. For this to happen the ordinary BLAS names are prefixed by "cblas_".
To download the whole package go to the Intel website.
It was my belief that one could call by either the cblas name or the ordinary name and the correct function would be linked in from the same library. I cannot find anything in the documentation that says otherwise. However I was unable to link using the ordinary names; only the cblas names worked; and this meant making changes in the lapack routines that we're using wherever a BLAS routine is called---adding the "cblas_" to the name (there was also a trailing underscore to be removed), for the arguments, adding "*"s or removing "&"s, changing string arguments to corresponding enum arguments, for level 2 and 3 routines adding an extra argument which specifies column order or row order. Lapack does everything in column order. The file "liblapackWin.c" contains the necessary lapack source code for calling dgesv_, modified as I described. "mkl_cPII.lib" and "mkl_cPIII.lib" are the libraries (i.e. object code---binary files) containing the BLAS functions.