Guidelines for contributing/maintaining code in LAPACK

Here are some of the tools and "tricks of the trade" that I use to maintain LAPACK.

  1. Since 1999, LAPACK has been maintained in cvs. ~susan/CVS/LAPACK/.
  2. LAPACK is ANSI standard Fortran 77 (no extensions like DO ... END DO, DO WHILE, dynamic memory allocation, etc) We do, however, allow subroutine names longer than 6 characters.

    LAPACK is backward compatible. If you need to change the calling sequence to an existing routine, or its amount of workspace, then you MUST create a new routine. You cannot make any change that would break a user's existing code calling LAPACK.

  3. Ftnchek (syntax checker for ANSI Fortran 77)

    The most useful options to ftnchek are:

          ftnchek -declare -noextern -portability -library *.f > ~/listing

    For example, if I want to check the s.p.complex and d.p.complex EIG codes (source and testers), I would type:

        alias ftnchek 'ftnchek -declare -noextern -portability -library'
        ftnchek c*.f z*.f ../../SRC/c*.f ../../SRC/z*.f ~/eig.listing
    and then view the listing file for errors...

    Be aware that d.p.complex is not part of the ANSI standard, so it won't recognize a lot of the COMPLEX*16 stuff, and will thus give a lot of extraneous error messages.

  4. NAGWare Fortran 77 tools (nag_decs, etc)

    These tools polish the new codes so that they conform to to the LAPACK style. I use the same for LAPACK.

  5. Portability testing (compiler flags for subscript checking and uninitialized variables...)
        SGI IRIX64
          f77 -g -DEBUG:subscript_check=ON -trapuv *.f
        ALPHA Tru64
          f77 -C=all *.f
          xlf -C *.f
          f77 -C *.f 

    Refer to the release_notes.html file for "machine specific installation hints".

    If the code passes these tests, then we say that it can be included in LAPACK.

  6. Documentation. Two Installation Guides and Users' Guide are maintained in LaTeX. Generate ps, pdf, and html version (using latex2html).