This is the README file for the package CamlFloat. CamlFloat is a stylized interface to the Fortran libraries Lapack and Blas for OCaml (http://www.ocaml.org). The authors are Shivkumar Chandrasekaran (shiv@ece.ucsb.edu) and Bill Lyons (lyons@math.ucsb.edu). There is a tutorial and reference documentation for the interface. These will be installed as part of the package. INSTALLATION ============ This package has been installed and tested on Mac OS X (10.2.6), Linux (Gentoo), and Windows XP machines. It should pretty much install on any Unix (including Cygwin) environment that is friendly to an OCaml (>= 3.07) implementation. OCaml 3.06 has a bug that makes CamlFloat crash in single precision in Mac OS X. 1. First install Atlas BLAS on your machine. Both Debian and Gentoo linux users should be able to use their packages managers to install this. However, remember that it is worth compiling from source rather than installing a binary. Mac OS X users can use fink or they can adapt the Makefile to use the built-in vecLib framework. For others, Atlas' homepage is http://math-atlas.sourceforge.net. In my Windows XP test I used Cygwin. 2. Next install Lapack 3.0. You can get it at http://www.netlib.org/lapack. Follow the instructions, making sure you make BLASLIB point to the Atlas libraries. You should produce a file called lapack_linux.a, or somesuch, depending on your platform. Rename this to the more conventional name "liblapack.a" and stick it in /usr/local/lib or /usr/lib, or someplace else. Remember where you put it. In my Windows XP test I used mingw. Note: Mac OS X users using vecLib framework can skip this step. If you do this alter the makefile changes in the next step to reflect the different configuration. 3. Next edit the Makefile. Make sure that the string /usr/local/lib/ocaml is changed to point to the right place for your OCaml installation. Next modify the variable LAPACKLIB to point to the position where you installed liblapack.a. There are multiple options in the Makefile for each variable. Choose the right one for your system. 4. Do "make testNla". If everything goes right you should get an executable called testNla. Executing it will run a bunch of tests. 5. Do "make testNlaX". It should produce a native-code executable called testNlaX. Run it and make sure all tests are passed. 6. Do "make doc.html". This will produce html documentation in the directory Doc. Check out Doc/index.html for the reference documentation. 7. Do "make camlFloat". This will produce the camlFloat toplevel and allow you to work through the tutorial and experiment with code fragments. 8. Do "make tutorial.pdf". This should produce the tutorial in tutorial.pdf. Read it for a quick introduction to the library. This requires that the ConTeXt macro package be present. I have not tested this part in Windows XP. 9. To use the library in your own byte-code programs, you will need to link against nla.cmo and mylibs.cma. For your native-code programs you will need to link with nla.cmx and mylibs.cmxa. Check the target testNla and testNlaX in the provided Makefile. 10. I have not yet figured out how to "install" an OCaml library in some standard way. Any advice will be welcome. Also, currently the -pack option is not being used.
::: back :::