Prev: Dhrystone
Next: Learning Ada
From: Dmitry A. Kazakov on
On Mon, 26 Jul 2010 10:08:09 -0700 (PDT), Ada novice wrote:

> On Jul 26, 4:52�pm, "Dmitry A. Kazakov" <mail...(a)dmitry-kazakov.de>
> wrote:
>> On Mon, 26 Jul 2010 06:40:49 -0700 (PDT), Ada novice wrote:
>
>>> Would you be kind enough to elaborate on your above comments a little
>>> more?
>>
>> Project IMSL as written does not describe any entity to build. It does a
>> subcomponent of such an entity, like the test project, which defines an
>> executable. An executable can be built, a component cannot.
>>
>> When bindings are mature and need to be redistributed, deployed, become a
>> part of some large project like Linux distribution with it specific
>> requirements etc, there is a need to pack the bindings code into a
>> pre-built library, static, shared or both. A project that describes such a
>> library is compilable, because a library has to be built. A library would
>> most likely have at least two different projects:
>>
>> 1. compilable "implementation" used by the library developer to build the
>> library from the sources.
>>
>> 2. non-compilable "interface" for library users who use the built library
>> in their projects. They don't need to compile the sources. They will use
>> *.ads, *.ali, *.lib/a files instead.
>>
>> A good thing about Ada and gnatmake/grpbuid is that it is fairly simple to
>> do these things compared with the horrific make/configure.
>
> Thanks. But the library would not be portable to another machine as we
> need more than the file imslcmath_dll.lib . IMSL runs because it's
> on my Windows environment path.

For deployment of the run-time you need a DLL, assuming that
imslcmath_dll.lib is an import library of.

The library build project is about how to create such a library from your
code if you are not going to distribute the sources.

> As an engineer in another field, it's hard to grasp all that you're
> saying but I hope with time I'll understand better :). Can you
> recommend books/publications that discuss similar ideas that you have
> been mentioning?

You may not believe it, but the GNAT User's Guide describes most, if not
all of that:

http://gcc.gnu.org/onlinedocs/gnat_ugn_unw

(Software engineers used to say, if nothing else helped, try to read the
manual... (:-))

You can also read this one to get the idea of Ada software distribution in
the form libraries. It is actually for Linux, but Ada is OS-agnostic:

http://people.debian.org/~lbrenta/debian-ada-policy.html

Specifically everything about GNAT project files:

http://www.adacore.com/wp-content/files/auto_update/gprbuild-docs/html/gprbuild_ug.html

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: Ada novice on
Thanks, Dmitry for all these valuable links.

YC
From: Simon Wright on
Ada novice <posts(a)gmx.us> writes:
> On Jul 26, 1:21 am, Simon Wright <si...(a)pushface.org> wrote:
>
>> I've encoded a general complex eigenvalues function, interfacing to the
>> LAPACK procedure zgeev

> Thank you very much for your commendable efforts. This is a very good
> example to demonstrate how Ada can be binded with LAPACK.

Well, it's a start!

>>(b) the results
>> are the same with GNAT GPL 2010 and GCC 4.5.0, (c) the output looks good
>> (from your inputs) ..
>>
>>    $ ./test_zgeev
>>     2.00000000000000E+00  4.00000000000000E+00
>>     2.00000000000000E+00 -4.00000000000000E+00
>>     9.99999999999996E-01  2.07319734774360E-16
>
>
> I have Win XP and gcc (GCC) 4.3.6 20100603 for GNAT GPL 2010
> (20100603). I get slightly different output:
>
> 1.99999999999999E+00 3.99999999999999E+00
> 2.00000000000000E+00 -4.00000000000000E+00
> 1.00000000000000E+00 -3.45920620709768E-16
>
> Your GCC version is more recent than mine. Maybe this is causing the
> discrepancies or maybe it's because of your different OS. Did you
> install your GCC separately? I got mine bundled with the GNAT GPL
> 2010.

Mine was part of GNAT GPL 2010, but on Mac OS X LAPACK and BLAS come
with the OS; I suspect that on Windows they don't.
From: Dmitry A. Kazakov on
On Mon, 26 Jul 2010 20:46:10 +0100, Simon Wright wrote:

> Ada novice <posts(a)gmx.us> writes:
>> On Jul 26, 1:21�am, Simon Wright <si...(a)pushface.org> wrote:

>>>(b) the results
>>> are the same with GNAT GPL 2010 and GCC 4.5.0, (c) the output looks good
>>> (from your inputs) ..
>>>
>>> � �$ ./test_zgeev
>>> � � 2.00000000000000E+00 �4.00000000000000E+00
>>> � � 2.00000000000000E+00 -4.00000000000000E+00
>>> � � 9.99999999999996E-01 �2.07319734774360E-16
>>
>>
>> I have Win XP and gcc (GCC) 4.3.6 20100603 for GNAT GPL 2010
>> (20100603). I get slightly different output:
>>
>> 1.99999999999999E+00 3.99999999999999E+00
>> 2.00000000000000E+00 -4.00000000000000E+00
>> 1.00000000000000E+00 -3.45920620709768E-16
>>
>> Your GCC version is more recent than mine. Maybe this is causing the
>> discrepancies or maybe it's because of your different OS. Did you
>> install your GCC separately? I got mine bundled with the GNAT GPL
>> 2010.
>
> Mine was part of GNAT GPL 2010, but on Mac OS X LAPACK and BLAS come
> with the OS; I suspect that on Windows they don't.

It makes little sense to compare decimal representations, which aren't
exact on most machines. Then before comparing any results, they should be
rounded to the accuracy of the given method.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: Ada novice on
On Jul 26, 9:46 pm, Simon Wright <si...(a)pushface.org> wrote:

>
> Mine was part of GNAT GPL 2010, but on Mac OS X LAPACK and BLAS come
> with the OS; I suspect that on Windows they don't.

No they don't come pre-installed with windows. This means that the
"mathematical functions" that I have from BLAS /LAPACK in the GNAT
folder is the subset of the full versions that you have on your MAC OS
X.

YC
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Prev: Dhrystone
Next: Learning Ada