Skip to content

A Fortran BLAS library implemented as a free-format module.

License

Notifications You must be signed in to change notification settings

urbanjost/M_blas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Name

M_blas -- BLAS routines in a Fortran module format

The BLAS (Basic Linear Algebra Subprograms) are well-established routines that provide standard building blocks for performing basic vector and matrix operations.

There are several versions of the library available; this is based off the Public Domain FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms provided by the National Science Foundation.

It has been converted to a free-format Fortran module and is in the process of being changed to use more recent Fortran features primarily for investigating the significance of what benefits this can have, such as an automatic calling interface and name collision avoidance provided by being modularized, INTENT specifications, array syntax and so on.

For compatibility purposes the wrapper file src/compatible.f90 is included, which allows for an old non-interface calling style so if you are using a BLAS library compatible with the reference version you should be able to use this library (and the accompanying module) as a drop-in replacement at the cost of loosing the strict interface the module provides and the additional call overhead to the wrapper.

If that works with your existing code, the next step is to then include USE statements in the calling source and to remove src/compatible.f90 and rebuild.

If there are significant benefits the idea is to then proceed with a similar transformation of LAPACK, but I am just beginning this and unless someone else is excited about it and wants to join in this is a rainy-day project at this point, and should not be considered stable.

I would love to hear from anyone who tries this as a replacement for their current libblas.a or libregblas.a.

Documentation docs

A WIP (work in progress)

All documents are contained in the docs/ directory including archive files of man(1) pages that can be installed on ULS (Unix-Like Systems).

real man-pages gmake

Download and Build

gmake gmake

    git clone https://github.com/urbanjost/M_blas.git
    cd M_blas/src
    # change Makefile compiler information as appropriate in Makefile
    make # for gfortran

This will compile the M_blas module and test programs.

fpm fpm

Alternatively, download the github repository and build it with fpm ( as described at Fortran Package Manager )

     git clone https://github.com/urbanjost/M_blas.git
     cd M_blas
     # currently the tests are run from a script because they need redirection
     # and I want some timing information and to test multiple compilers. You
     # will have to make your own run script or run the tests manually if you
     # do not have bash(1).
     #
     # Take out or add the compilers from run.sh you wish to run then execute
     # the run.sh(1) script, twice if you just want run-times:
     bash run.sh
     # or just run "fpm build".

or just list it as a dependency in your fpm.toml project file.

        [dependencies]
        M_blas        = { git = "https://github.com/urbanjost/M_blas.git" }

References



About

A Fortran BLAS library implemented as a free-format module.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages