unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Tk <tk.code@protonmail.com>
To: Zelphir Kaltstahl <zelphirkaltstahl@gmail.com>
Cc: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: Matrix or array operations library
Date: Mon, 24 Dec 2018 23:06:59 +0000	[thread overview]
Message-ID: <fCPtwbR_sCYSaefuPLYWg3U0aeNEAbzI1Ij32ALLt39fYGHai2yONu4XXPoK8LMQsPByYswTV3qCtxhpUB7D_LBGrbOPxQlKIh67yDYKkkw=@protonmail.com> (raw)
In-Reply-To: <7a362a59-3a4d-44c8-f4cd-5b232b6dffce@gmail.com>

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, 24 December 2018 23:01, Zelphir Kaltstahl <zelphirkaltstahl@gmail.com> wrote:

> Hello Guile Users,
>
> Is there some library, that enables high performance matrix operations
> or even n-dimensional array operations? I am thinking of something like
> NumPy in the Python ecosystem. I think NumPy in turn also uses some
> lower level thing to do what it does. I think OpenBLAS or MKL, depending
> on the architecture. I wonder if there is any wrapper around OpenBLAS
> for Guile or something similar.
>
> I am writing a little code for matrix operations and currently I am
> using Guile arrays, as they are made of vectors and have constant access
> time, which is already great. My guess is, that this would be the right
> choice if using pure Guile. I am writing data abstraction procedures, so
> that later on I could exchange what is used to represent the data.
>
> Maybe, if there is something like NumPy or lower level, I should use
> that instead? (Would I have to learn how to use FFI first?)
>
> Or maybe Guile's implementation is already so fast, that it would not
> make that much difference to use a lower level thing?
>
> Currently I have only a little experimental program, started today, so
> no huge plan. OK, one can fantasize about stuff like Pandas data frames
> in Guile, but I have no illusion, that it is a work of a few days or
> even weeks. It would be nice to learn, how to use a low level thing or
> maybe even Pandas, if there are any such bindings for Guile. I could
> make the implementation use different representations, depending on a
> parameter or something like that.
>
> Regards,
>
> Zelphir


I took a different route. Instead of merely binding functionality in a lower level language, I use Guile to generate lean-and-mean modern Fortran code. The building blocks can be found here: https://gitlab.com/codetk/schemetran (wanted to save this for potluck, but here it goes ... ). Fortran compilers take care of efficient execution on HPC platforms. Actually, it is beyond me why anyone would bother with any other programming language when it comes to expressing maths efficiently.

I built a pseudo-spectral Navier-stokes solver that can work on MPI, shared-mem (OpenMP), and hopefully soon GPU/Xeon accelerators (OpenMP 4) atop of schemetran. I still need to see about publishing it under an Libre licence.







  reply	other threads:[~2018-12-24 23:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c2172031-a0a6-9dd3-6ceb-7b6d94648475@gmail.com>
2018-12-24 22:01 ` Matrix or array operations library Zelphir Kaltstahl
2018-12-24 23:06   ` Tk [this message]
2018-12-25  0:21   ` Matt Wette
2018-12-25  0:32     ` ndarray [was: Matrix or array operations library] Matt Wette
2018-12-25 17:12   ` Matrix or array operations library David Pirotte
2019-06-02 21:44   ` Linas Vepstas
     [not found] <mailman.73.1545757221.8862.guile-user@gnu.org>
2018-12-26 11:38 ` Zelphir Kaltstahl
2018-12-27 14:20   ` Matt Wette
2018-12-27 14:38     ` Mike Gran
     [not found] <mailman.108.1545930019.12294.guile-user@gnu.org>
2018-12-27 18:43 ` Daniel Llorens
2018-12-27 21:24   ` John Cowan
2018-12-27 22:24   ` Matt Wette
     [not found] <mailman.32929.1546007691.1283.guile-user@gnu.org>
2018-12-28 20:23 ` Daniel Llorens
2018-12-28 23:16   ` John Cowan
2018-12-29  0:17     ` Daniel Llorens
2019-01-27 18:41       ` Matt Wette
2018-12-28 23:24   ` Matt Wette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='fCPtwbR_sCYSaefuPLYWg3U0aeNEAbzI1Ij32ALLt39fYGHai2yONu4XXPoK8LMQsPByYswTV3qCtxhpUB7D_LBGrbOPxQlKIh67yDYKkkw=@protonmail.com' \
    --to=tk.code@protonmail.com \
    --cc=guile-user@gnu.org \
    --cc=zelphirkaltstahl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).