From: jonathan on 13 Jul 2010 10:27 On Jul 13, 8:07 am, Ada novice <po...(a)gmx.us> wrote: > On Jul 12, 11:09 pm, jonathan <johns...(a)googlemail.com> wrote: > > > > > On Jul 12, 9:13 pm, Simon Wright <si...(a)pushface.org> wrote: > > > > jonathan <johns...(a)googlemail.com> writes: > > > > Finally! The test routine is user unfriendly. (I hope you fix it up > > > > for the rest of us.) You have to enter numbers. > > > > Actually, there's a file test_generic_complex_eigenvalues.dat ... > > > ... and you have to enter these somehow, without prompt or > > instruction. > > In my Linux BASH shell it seems to be straightforward: > > > ./test_generic_complex_eigenvalues < > > test_generic_complex_eigenvalues.dat > output.txt > > > I hope that's right. Now if I compare with the expected output, > > > diff output.txt test_generic_complex_eigenvalues.out > > > I find that all of the numbers in the 2 files are different. Anything > > to > > worry about? (I say no;-) > > > J. > > I haven't had the time to test the dat file yet. Just one reminder > which I quote from an earlier post: > > The program doesn't exit well however. When the program > ( .ada) it will display the results but > in my GPS editor the line 102 is highlighted. This is where the > program stops. If the program would run fine then I would have finally > got this line displayed: DONE test_generic_complex_eigenvalues (at the > bottom of test_generic_complex_eigenvalues.ada). > > Do you have the same problem? > > YC The way test_generic_complex_eigenvalues works is still mysterious to me (I usually don't do things this way) so that's why I don't want to say too much about how to use it. When I send the data file in like this at the command line: ../test_generic_complex_eigenvalues < test_generic_complex_eigenvalues.dat then it seems to work, and for some reason stops without control-c. When I copy the matrices from the data file with the mouse and then paste them into command line prompt it works the 1st time, but maybe not the second. To me the important thing is that the tests pass, so we are off to a good start! J.
From: Warren on 13 Jul 2010 12:40 Gautier write-only expounded in news:af10bdc0-515e-4b17-a37c-47fa8809ff18 @y11g2000yqm.googlegroups.com: >> And are there other alternatives or other packages? > > Look there - excellent stuff: > http://www.csee.umbc.edu/~squire/adaclass/gnatmath95/ > The most amazing: add some "Ada." for the basic matrix packages > referenced, and you get Ada 2005 compatibility. > > G. There is some good stuff in there. I couldn't find a source code license statement anywhere. I wouldn't mind using some of this in an open sourced project. Warren
From: Ada novice on 13 Jul 2010 13:43 On Jul 13, 4:27 pm, jonathan <johns...(a)googlemail.com> wrote: > On Jul 13, 8:07 am, Ada novice <po...(a)gmx.us> wrote: > > > > > On Jul 12, 11:09 pm, jonathan <johns...(a)googlemail.com> wrote: > > > > On Jul 12, 9:13 pm, Simon Wright <si...(a)pushface.org> wrote: > > > > > jonathan <johns...(a)googlemail.com> writes: > > > > > Finally! The test routine is user unfriendly. (I hope you fix it up > > > > > for the rest of us.) You have to enter numbers. > > > > > Actually, there's a file test_generic_complex_eigenvalues.dat ... > > > > ... and you have to enter these somehow, without prompt or > > > instruction. > > > In my Linux BASH shell it seems to be straightforward: > > > > ./test_generic_complex_eigenvalues < > > > test_generic_complex_eigenvalues.dat > output.txt > > > > I hope that's right. Now if I compare with the expected output, > > > > diff output.txt test_generic_complex_eigenvalues.out > > > > I find that all of the numbers in the 2 files are different. Anything > > > to > > > worry about? (I say no;-) > > > > J. > > > I haven't had the time to test the dat file yet. Just one reminder > > which I quote from an earlier post: > > > The program doesn't exit well however. When the program > > ( .ada) it will display the results but > > in my GPS editor the line 102 is highlighted. This is where the > > program stops. If the program would run fine then I would have finally > > got this line displayed: DONE test_generic_complex_eigenvalues (at the > > bottom of test_generic_complex_eigenvalues.ada). > > > Do you have the same problem? > > > YC > >When I send the data file in > like this at the command line: > ./test_generic_complex_eigenvalues < > test_generic_complex_eigenvalues.dat > then it seems to work, and for some reason stops without control-c. > When I copy the matrices from the data file with the mouse and then > paste them into command line prompt it works the 1st time, but > maybe not the second. > Yes, I don't understand why it hangs. I've tried also the package from 83 but there the files are named "ada" which I've converted to "adb" but then it becomes a big mess to know which should be "adb" and which ones should be "ads" given the large amount of files in the library. I didn't know that Ada files had the extension "ada" in the past. A friend uses F# for numerics and here also eigenvalue computation exists only for symmetric matrices as in Ada 05. I hope that in the next next Ada release, there would be more numeric facilities. I don't program like a computer programmer as I only have a coarse knowledge of the features of Ada. Matrix operations for most of the time deals with sparse matrices and eigenvalues computation is a standard problem in all engineering areas. Hope that Ada computer programmers will roll their sleeves and consider the needs of the engineering people. YC
From: Jeffrey R. Carter on 13 Jul 2010 13:59 On 07/13/2010 10:43 AM, Ada novice wrote: > > Yes, I don't understand why it hangs. I've tried also the package from > 83 but there the files are named "ada" which I've converted to "adb" > but then it becomes a big mess to know which should be "adb" and which > ones should be "ads" given the large amount of files in the library. I > didn't know that Ada files had the extension "ada" in the past. You can run gnatchop on the .ada files; it will output files with the correct GNAT-default names. You can also delete irrelevant parts of the post you're replying to (as I have done here). That makes your posts easier to read and understand. -- Jeff Carter "When Roman engineers built a bridge, they had to stand under it while the first legion marched across. If programmers today worked under similar ground rules, they might well find themselves getting much more interested in Ada!" Robert Dewar 62
From: Georg Bauhaus on 13 Jul 2010 14:00
On 13.07.10 19:43, Ada novice wrote: > Yes, I don't understand why it hangs. I've tried also the package from > 83 but there the files are named "ada" which I've converted to "adb" > but then it becomes a big mess to know which should be "adb" and which > ones should be "ads" given the large amount of files in the library. I > didn't know that Ada files had the extension "ada" in the past. Ada source files can end in "ada", today, or in just anything. You can use GNAT's gnatname and gnatchop to convert Ada source files to Ada source files that have one compilation unit per file, ending in "ads" for specs and in "adb" for bodies. This is how GNAT/GCC wants them. Alternatively, you can write a ton of pragmas telling GNAT where to find a unit, or add this info to a project file IIRC. The "GNAT [GPL] User's Guide" has some background information. "10 Handling Arbitrary File Naming Conventions Using `gnatname' ************************************************************** "10.1 Arbitrary File Naming Conventions ====================================== "The GNAT compiler must be able to know the source file name of a compilation unit. When using the standard GNAT default file naming conventions (`.ads' for specs, `.adb' for bodies), the GNAT compiler does not need additional information. "..." Something like this should work: mkdir for-gnat cd for-gnat for file in <list-of-original-files> loop gnatchop [-r] -w file end loop |