comp.lang.ada
 help / color / mirror / Atom feed
* Gnat2007 and Ada.Numerics.Generic_Real_Arrays
@ 2007-05-25 17:12 Yves Bailly
  2007-05-25 18:47 ` Anh Vo
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Yves Bailly @ 2007-05-25 17:12 UTC (permalink / raw)


Hello all,

I just downloaded Gnat2007, then tried this little program:
--8<-----8<-----8<-----8<-----8<-----8<-----8<---
with Ada.Numerics.Long_Real_Arrays;
use Ada.Numerics.Long_Real_Arrays;
procedure Test_Matrix is
   v: Real_Vector(1..3) := (1.0, 2.0, 3.0);
   d: Long_Float := v*v;
begin
   null;
end Test_Matrix;
--8<-----8<-----8<-----8<-----8<-----8<-----8<---

But when trying to create the executable, I get a link error:
--8<-----8<-----8<-----8<-----8<-----8<-----8<---
gnatlink /home/yves/Programs/Ada/test_matrix.ali -o /home/yves/Programs/Ada/test_matrix
/home/yves/Programs/Ada/test_matrix.o: In function `_ada_test_matrix':
test_matrix.adb:(.text+0x40): undefined reference to
`ada__numerics__long_real_arrays__Omultiply'
--8<-----8<-----8<-----8<-----8<-----8<-----8<---

Nothing about those packages in the provided doc... Too bad, I've
been waiting for those packages since they appeared in the RM.
Am I missing something?

Any hint would be much appreciated!

--   Yves Bailly




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Gnat2007 and Ada.Numerics.Generic_Real_Arrays
  2007-05-25 17:12 Gnat2007 and Ada.Numerics.Generic_Real_Arrays Yves Bailly
@ 2007-05-25 18:47 ` Anh Vo
  2007-05-25 18:59   ` Gautier
  2007-06-01  2:01 ` Anh Vo
  2007-06-06  8:19 ` Maxim Reznik
  2 siblings, 1 reply; 12+ messages in thread
From: Anh Vo @ 2007-05-25 18:47 UTC (permalink / raw)


On May 25, 10:12 am, Yves Bailly <kafka...@laposte.net> wrote:
> But when trying to create the executable, I get a link error:
> --8<-----8<-----8<-----8<-----8<-----8<-----8<---
> gnatlink /home/yves/Programs/Ada/test_matrix.ali -o /home/yves/Programs/Ada/test_matrix
> /home/yves/Programs/Ada/test_matrix.o: In function `_ada_test_matrix':
> test_matrix.adb:(.text+0x40): undefined reference to
> `ada__numerics__long_real_arrays__Omultiply'
> --8<-----8<-----8<-----8<-----8<-----8<-----8<---

I had similar problem, undefined reference to `sgetrf_', when using
inverse matrix operation under instantiation of
Ada.Numerics.Generic_Real_Arrays with Float. This problem had been
reported to AdaCore.

AV




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Gnat2007 and Ada.Numerics.Generic_Real_Arrays
  2007-05-25 18:47 ` Anh Vo
@ 2007-05-25 18:59   ` Gautier
  2007-05-26  7:53     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 12+ messages in thread
From: Gautier @ 2007-05-25 18:59 UTC (permalink / raw)


Anh Vo:

> I had similar problem, undefined reference to `sgetrf_', when using
> inverse matrix operation under instantiation of
> Ada.Numerics.Generic_Real_Arrays with Float. This problem had been
> reported to AdaCore.

This seems to mean that the Lapack library needs to be bound with.
BTW, a very good thing that Lapack is being used by the new Ada.Numerics.* !
______________________________________________________________
Gautier         -- http://www.mysunrise.ch/users/gdm/index.htm
Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Gnat2007 and Ada.Numerics.Generic_Real_Arrays
  2007-05-25 18:59   ` Gautier
@ 2007-05-26  7:53     ` Dmitry A. Kazakov
  2007-05-26  9:31       ` Georg Bauhaus
  0 siblings, 1 reply; 12+ messages in thread
From: Dmitry A. Kazakov @ 2007-05-26  7:53 UTC (permalink / raw)


On Fri, 25 May 2007 20:59:58 +0200, Gautier wrote:

> This seems to mean that the Lapack library needs to be bound with.
> BTW, a very good thing that Lapack is being used by the new Ada.Numerics.* !

BTW, where it is hosted now? The old link to Lapack Ada I once had, does
not work anymore.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Gnat2007 and Ada.Numerics.Generic_Real_Arrays
  2007-05-26  7:53     ` Dmitry A. Kazakov
@ 2007-05-26  9:31       ` Georg Bauhaus
  2007-05-26 10:21         ` Dmitry A. Kazakov
  2007-05-28 10:19         ` Dirk Craeynest
  0 siblings, 2 replies; 12+ messages in thread
From: Georg Bauhaus @ 2007-05-26  9:31 UTC (permalink / raw)


Dmitry A. Kazakov wrote:
> On Fri, 25 May 2007 20:59:58 +0200, Gautier wrote:
> 
>> This seems to mean that the Lapack library needs to be bound with.
>> BTW, a very good thing that Lapack is being used by the new Ada.Numerics.* !
> 
> BTW, where it is hosted now? The old link to Lapack Ada I once had, does
> not work anymore.
> 

Here's one:
http://topo.math.u-psud.fr/~sands/Programs/BLAS/index.html

Has all public NYU Ada stuff been saved to Ada Belgium
servers, BTW?



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Gnat2007 and Ada.Numerics.Generic_Real_Arrays
  2007-05-26  9:31       ` Georg Bauhaus
@ 2007-05-26 10:21         ` Dmitry A. Kazakov
  2007-05-29  8:56           ` Ken
  2007-05-28 10:19         ` Dirk Craeynest
  1 sibling, 1 reply; 12+ messages in thread
From: Dmitry A. Kazakov @ 2007-05-26 10:21 UTC (permalink / raw)


On Sat, 26 May 2007 11:31:44 +0200, Georg Bauhaus wrote:

> Dmitry A. Kazakov wrote:
>> On Fri, 25 May 2007 20:59:58 +0200, Gautier wrote:
>> 
>>> This seems to mean that the Lapack library needs to be bound with.
>>> BTW, a very good thing that Lapack is being used by the new Ada.Numerics.* !
>> 
>> BTW, where it is hosted now? The old link to Lapack Ada I once had, does
>> not work anymore.
> 
> Here's one:
> http://topo.math.u-psud.fr/~sands/Programs/BLAS/index.html

Thanks

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Gnat2007 and Ada.Numerics.Generic_Real_Arrays
  2007-05-26  9:31       ` Georg Bauhaus
  2007-05-26 10:21         ` Dmitry A. Kazakov
@ 2007-05-28 10:19         ` Dirk Craeynest
  1 sibling, 0 replies; 12+ messages in thread
From: Dirk Craeynest @ 2007-05-28 10:19 UTC (permalink / raw)


In article <4657fde5$0$23140$9b4e6d93@newsspool1.arcor-online.net>,
Georg Bauhaus  <bauhaus.rm.tsoh@maps.futureapps.de> wrote:
[...]
>Has all public NYU Ada stuff been saved to Ada Belgium
>servers, BTW?

I'm not sure Georg got my e-mailed response, as I had to guess his
real address, hence this follow-up.

In a nutshell: yes, all "public NYU Ada stuff" that was in the
cs.nyu.edu:/pub/gnat directory is still available at
<ftp://ftp.cs.kuleuven.be/pub/Ada-Belgium/mirrors/gnu-ada>.

I refer to my older posting that describes the NYU Ada mirror on the
Ada-Belgium server:
<http://groups.google.be/group/comp.lang.ada/browse_thread/thread/281f51aa0dcc9033/48e99dafe9e3c8b0?hl=nl#48e99dafe9e3c8b0>.

HTH

Dirk
Dirk.Craeynest@cs.kuleuven.be (for Ada-Belgium/-Europe/SIGAda/WG9 mail)

+-------------/  Home: http://www.cs.kuleuven.be/~dirk/ada-belgium
|Ada-Belgium /    FTP: ftp://ftp.cs.kuleuven.be/pub/Ada-Belgium
|on Internet/  E-mail: ada-belgium-board@cs.kuleuven.be
+----------/ Maillist: ada-belgium-info-request@cs.kuleuven.be

*** 12th Intl.Conf.on Reliable Software Technologies - Ada-Europe'2007
*** June 25-29, 2007 * Geneva, Switzerland * http://www.ada-europe.org



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Gnat2007 and Ada.Numerics.Generic_Real_Arrays
  2007-05-26 10:21         ` Dmitry A. Kazakov
@ 2007-05-29  8:56           ` Ken
  2007-05-29 10:47             ` Yves Bailly
  0 siblings, 1 reply; 12+ messages in thread
From: Ken @ 2007-05-29  8:56 UTC (permalink / raw)


On May 26, 11:21 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> On Sat, 26 May 2007 11:31:44 +0200, Georg Bauhaus wrote:
> > Dmitry A. Kazakov wrote:
> >> On Fri, 25 May 2007 20:59:58 +0200, Gautier wrote:
>
> >>> This seems to mean that the Lapack library needs to be bound with.
> >>> BTW, a very good thing that Lapack is being used by the new Ada.Numerics.* !
>
> >> BTW, where it is hosted now? The old link to Lapack Ada I once had, does
> >> not work anymore.
>
> > Here's one:
> >http://topo.math.u-psud.fr/~sands/Programs/BLAS/index.html
>
> Thanks
>
> --
> Regards,
> Dmitry A. Kazakovhttp://www.dmitry-kazakov.de

I have looked at the GNAT2007 and Ada.Generic_Real_Arrays. It needs a
link to a BLAS/LAPACK library. I have tested it with compiled BLAS/
LAPACK with the gnat FORTRAN compiler. Some timing on Windows XP
(Intel Core 2CPU): to multiply two matrices of size 500 produced a
rate of 1.17 GFlops/sec.

Some questions
How do you use other blas/lapack for example Intel or atlas?
How do you increase the stack size (I would like to try 1000 by 1000
and I have 2GB of memory)?

Ken Thomas




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Gnat2007 and Ada.Numerics.Generic_Real_Arrays
  2007-05-29  8:56           ` Ken
@ 2007-05-29 10:47             ` Yves Bailly
  2007-06-01  9:40               ` Ken
  0 siblings, 1 reply; 12+ messages in thread
From: Yves Bailly @ 2007-05-29 10:47 UTC (permalink / raw)


Ken wrote:
> [...]
> I have looked at the GNAT2007 and Ada.Generic_Real_Arrays. It needs a
> link to a BLAS/LAPACK library. I have tested it with compiled BLAS/
> LAPACK with the gnat FORTRAN compiler. Some timing on Windows XP
> (Intel Core 2CPU): to multiply two matrices of size 500 produced a
> rate of 1.17 GFlops/sec.

Can you share the switches you used? I tried installing LAPACK using
the GNU gfortran compiler, but I still get link errors...

Thanks.

YB




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Gnat2007 and Ada.Numerics.Generic_Real_Arrays
  2007-05-25 17:12 Gnat2007 and Ada.Numerics.Generic_Real_Arrays Yves Bailly
  2007-05-25 18:47 ` Anh Vo
@ 2007-06-01  2:01 ` Anh Vo
  2007-06-06  8:19 ` Maxim Reznik
  2 siblings, 0 replies; 12+ messages in thread
From: Anh Vo @ 2007-06-01  2:01 UTC (permalink / raw)


On May 25, 10:12 am, Yves Bailly <kafka...@laposte.net> wrote:
> But when trying to create the executable, I get a link error:
> --8<-----8<-----8<-----8<-----8<-----8<-----8<---
> gnatlink /home/yves/Programs/Ada/test_matrix.ali -o /home/yves/Programs/Ada/test_matrix
> /home/yves/Programs/Ada/test_matrix.o: In function `_ada_test_matrix':
> test_matrix.adb:(.text+0x40): undefined reference to
> `ada__numerics__long_real_arrays__Omultiply'
> --8<-----8<-----8<-----8<-----8<-----8<-----8<---

I had similar problem, undefined reference to `sgetrf_', when using
inverse matrix operation under instantiation of
Ada.Numerics.Generic_Real_Arrays with Float. This problem had been
reported to AdaCore.

AV




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Gnat2007 and Ada.Numerics.Generic_Real_Arrays
  2007-05-29 10:47             ` Yves Bailly
@ 2007-06-01  9:40               ` Ken
  0 siblings, 0 replies; 12+ messages in thread
From: Ken @ 2007-06-01  9:40 UTC (permalink / raw)


On May 29, 11:47 am, Yves Bailly <kafka...@laposte.net> wrote:
> Ken wrote:
> > [...]
> > I have looked at the GNAT2007 and Ada.Generic_Real_Arrays. It needs a
> > link to a BLAS/LAPACK library. I have tested it with compiled BLAS/
> > LAPACK with the gnat FORTRAN compiler. Some timing on Windows XP
> > (Intel Core 2CPU): to multiply two matrices of size 500 produced a
> > rate of 1.17 GFlops/sec.
>
> Can you share the switches you used? I tried installing LAPACK using
> the GNU gfortran compiler, but I still get link errors...
>
> Thanks.
>
> YB

The library was built using the FORTRAN Compiler in the MinGW
installation. The compile options were -O4

>From gnatmake, the link options were:

-largs -LW:\d-drive\LAPACK -llapack_WindowsXP -lblas_WindowsXP  -LC:
\MinGW\lib -lg2c


The libraries refer to those created by G77 and we note the need for
some modules from g2c.

I have used both Float and Long_Float in instaniations.

Hope this helps.

Ken




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Gnat2007 and Ada.Numerics.Generic_Real_Arrays
  2007-05-25 17:12 Gnat2007 and Ada.Numerics.Generic_Real_Arrays Yves Bailly
  2007-05-25 18:47 ` Anh Vo
  2007-06-01  2:01 ` Anh Vo
@ 2007-06-06  8:19 ` Maxim Reznik
  2 siblings, 0 replies; 12+ messages in thread
From: Maxim Reznik @ 2007-06-06  8:19 UTC (permalink / raw)


On 25    , 20:12, Yves Bailly <kafka...@laposte.net> wrote:
> /home/yves/Programs/Ada/test_matrix.o: In function `_ada_test_matrix':
> test_matrix.adb:(.text+0x40): undefined reference to
> `ada__numerics__long_real_arrays__Omultiply'

Try to link with libgnala.a (included in gnat-gpl-2007) and lapack
+blas libraries like this:
gnatmake ... -largs -lgnala -llapack -lblas

I've managed to work with matrixes this way under Linux. I installed
lapack and blas from my linux distribution (Gentoo: emerge blas
lacpack). No idea where are this libraries for windows.

--
Maxim Reznik




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-06-06  8:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-25 17:12 Gnat2007 and Ada.Numerics.Generic_Real_Arrays Yves Bailly
2007-05-25 18:47 ` Anh Vo
2007-05-25 18:59   ` Gautier
2007-05-26  7:53     ` Dmitry A. Kazakov
2007-05-26  9:31       ` Georg Bauhaus
2007-05-26 10:21         ` Dmitry A. Kazakov
2007-05-29  8:56           ` Ken
2007-05-29 10:47             ` Yves Bailly
2007-06-01  9:40               ` Ken
2007-05-28 10:19         ` Dirk Craeynest
2007-06-01  2:01 ` Anh Vo
2007-06-06  8:19 ` Maxim Reznik

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