comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: ANN: Ada 2005 Math Extensions 20120712
Date: Fri, 27 Jul 2012 22:03:05 +0100
Date: 2012-07-27T22:03:05+01:00	[thread overview]
Message-ID: <m2mx2kq5me.fsf@nidhoggr.home> (raw)
In-Reply-To: 65f76f80-a1e5-4c60-8002-45becc2a1198@googlegroups.com

Ada novice <shai.lesh@gmx.com> writes:

> After knowing that the lapack and blas libraries are functional on my
> linux system, I tried the new math extension package. I do not
> understand however how lapack and blas are called.
>
> After issuing the command: $ gnatmake -p -P demo_extensions, I see
> further down the output these lines:
>
> gnatbind -E -I- -x /home/work/ada/simon2012/test/.build/demo_extensions.ali
> gnatlink /home/work/ada/simon2012/test/.build/demo_extensions.ali -g
> /home/work/ada/simon2012/lib/libgnat_math_extensions.a
> -Wl,-rpath,/usr/local/gnat-2012/lib/gcc/i686-pc-linux-gnu/4.5.4/adalib/
> -llapack -lblas -o
>
> So the linker is calling -llpack and -lblas. 
>
> When I execute $ ./demo_extensions, I do get a long list of outputs
[...]
> as expected from the code
>
> My question is at which stage -llpack and -lblas are called? The file
> demo_extensions.gpr does not have these "switches" in the linker
> section.

demo_extensions.gpr starts

   with "../gnat_math_extensions";

and gnat_math_extensions.gpr contains

   package Linker is
      for Linker_Options use ("-llapack", "-lblas");
   end Linker;

> I would like to know what lapack and blas libraries are being called,
> and if I can switch to the ACML ones which also work well for other
> Ada programs.

"ldd demo_extensions" will show you which shareable libraries are used
by the executable demo_extensions.

You should be able to switch to the ACML libraries without trouble. You
may be able to do so without re-linking; I don't remember how to do that
(setting the env var LD_PRELOAD to the replacement libraries??)



  reply	other threads:[~2012-08-01  2:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 19:44 ANN: Ada 2005 Math Extensions 20120712 Simon Wright
2012-07-13 11:12 ` Ken Thomas
2012-07-14  8:13 ` Ada novice
2012-07-14 10:43   ` Simon Wright
2012-07-14 14:18     ` Ada novice
2012-07-27 19:23       ` Ada novice
2012-07-27 21:03         ` Simon Wright [this message]
2012-07-28 13:01           ` Ada novice
2012-07-28 19:10             ` Simon Wright
2012-07-28 19:33             ` Simon Wright
2012-07-29 14:05               ` Ada novice
2012-07-29 14:22                 ` Nasser M. Abbasi
2012-07-29 14:34                   ` Ada novice
2012-07-29 14:52                     ` Nasser M. Abbasi
2012-07-29 15:02                       ` Ada novice
2012-07-29 15:31                       ` Ada novice
2012-07-30 18:59               ` Ada novice
replies disabled

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