GithubHelp home page GithubHelp logo

jacob-roth / hsl.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juliasmoothoptimizers/hsl.jl

0.0 2.0 0.0 72 KB

Julia interface to the HSL Mathematical Software Library

License: Other

Julia 100.00%

hsl.jl's Introduction

HSL

These are the beginnings of a set of interfaces to HSL packages for sparse linear algebra.

Certain HSL packages are freely available to all, others are freely available to academics only. Please refer to the website above for licensing information. In all cases, users are responsible for obtaining HSL packages.

Installing

julia> Pkg.clone("https://github.com/JuliaSmoothOptimizers/HSL.jl.git")

At this point, make sure that there isn't a stray METIS library on your library path. You especially want to make sure that METIS 5 is not accessible because the HSL library currently interfaced only supports METIS 4. If you have such library accessible, it is important to remove it from the library path, at least temporarily. For example, if you are on OSX and are using Homebrew, you can hide METIS 5 with brew unlink metis. After the install procedure is complete, it is fine to link metis again with brew link metis.

The source archive, as obtained from the HSL download process, should be placed as is in Pkg.dir("HSL", "deps", "downloads"). The HSL Julia module will take care of compilation. Once the source archives have been placed in the location indicated, run

julia> Pkg.build("HSL")
julia> Pkg.test("HSL")

Note that a C and Fortran compilers are required.

Supported Packages

HSL_MA97

HSL_MA97 version 2.4.0: an OpenMP-based direct solver for symmetric linear systems. Example:

using MatrixMarket
using HSL

K = MatrixMarket.mmread("K.mtx")  # only the lower triangle
rhs = readdlm("rhs.rhs")

LBL = Ma97(K)
ma97_factorize(LBL)
x = ma97_solve(LBL, rhs)  # or x = LBL \ rhs

Rectangular Systems

There is a convenience interface to solve rectangular systems that complements the sparse QR factorization in Julia.

When A is m-by-n with m < n and has full row rank,

(x, y) = ma97_solve(A, b)

solves for the minimum-norm solution, i.e., x such that Ax = b and x + Aᵀ y = 0. The call

(x, y) = ma97_min_norm(A, b)

is also defined, and is equivalent to the above.

When m > n and has full column rank,

(r, x) = ma97_solve(A, b)

solves for the least-squares solution, i.e., x such that r = b - Ax satisfies Aᵀ r = 0. The call

(r, x) = ma97_least_squares(A, b)

is also defined, and is equivalent to the above.

TODO List

  • Convenient constructor for rectangular matrices to enable \
  • Convenient access to control parameters, especially pivot tolerance
  • Real single precision arithmetic (e59c501)
  • Complex single precision arithmetic (e59c501)
  • Complex double precision arithmetic (e59c501)

This content is released under the MIT License. MIT license

hsl.jl's People

Contributors

dpo avatar abelsiqueira avatar lruthotto avatar lrsantos11 avatar

Watchers

James Cloos avatar Jake Roth avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.