comp.lang.ada
 help / color / mirror / Atom feed
From: Jerry <lanceboyle@qwest.net>
Subject: Re: gnatmake, gnat2007. Linking to lapack and blas using with Ada.Numerics.Generic_Real_Arrays;
Date: Sat, 11 Aug 2007 18:01:01 -0700
Date: 2007-08-11T18:01:01-07:00	[thread overview]
Message-ID: <1186880461.557632.250230@g12g2000prg.googlegroups.com> (raw)
In-Reply-To: <1186788863.427210.175620@g12g2000prg.googlegroups.com>

Has anyone done this on OS X? I believe that lapack and blas are pre-
installed but might be called clapack and cblas.

Jerry

On Aug 10, 4:34 pm, Nasser Abbasi <n...@12000.org> wrote:
> These are the steps I did to link a small ada program with lapack and
> blas libraries which are needed if one uses some of the  the new
> packages such as  Ada.Numerics.Generic_Real_Arrays and its linear
> algebra functions.
>
> Here is the gnatmake command:
>
> $ gnatmake solve.adb -largs -L/usr/lib  -lgnala -llapack -lblas
> gcc -c solve.adb
> gnatbind -x solve.ali
> gnatlink solve.ali -L/usr/lib -lgnala -llapack -lblas
>
> On linux Ubuntu, I used adept_manger to install blas and lapack, then
> after that, added the following symbolic links (which the link above
> would fail otherwise):
>
> su -
> cd /usr/lib
> ln -s liblapack.so.3 liblapack.so
> ln -s libblas.so libblas.so.3
>
> This is the ada program (just to test with, no data in matric to do an
> actual solve)
>
> --------------- solve.adb--------------
> $ cat solve.adb
>  with Ada.Numerics.Generic_Real_Arrays;
>
> procedure solve is
>
>    package myReals is new Ada.Numerics.Generic_Real_Arrays(Float);
>    use myReals;
>
>    nElements: constant integer:=6;
>    A: Real_Matrix(1..nElements,1..nElements):=(others => (others =>
> 0.0));
>    b: Real_Vector(1..nElements):=(Others=>0.0);
>
>    begin
>        b:=solve(A,b);
>
> end solve;
> ------------- solve--------------------
>
> Nasser





  reply	other threads:[~2007-08-12  1:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10 23:34 gnatmake, gnat2007. Linking to lapack and blas using with Ada.Numerics.Generic_Real_Arrays; Nasser Abbasi
2007-08-12  1:01 ` Jerry [this message]
2007-08-12  9:53   ` Marc Enzmann
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox