Prev: Size of Vector limited to 1024 MB of Heap Size
Next: How to implement a server socket compatible to telnet?
From: Alex R. Mosteo on 7 Aug 2008 08:35 amado.alves(a)gmail.com wrote: > I manage to process 1000 x 1000 matrices with the respective Ada 2005 > standard library with GNAT GPL 2008. Processing includes > multiplication by a vector. > > Now I want larger matrices, say 5000 x 5000. The objects seem to be > allocated ok (dynamically), but mutiplication gives a "segmentation > fault." > > Any tips on how to overcome this? I will give you all the tips I remember on how to get larger stacks (in linux), but I'm going from memory so you'll have to double-check: ulimit -s unlimited at the shell level. Wrap your program, if not already, in a task to be able to use pragma Storage_Size for this task. I see in other posts that there are switches in order to set the stack size of the environment task; make your choice. The linker settings are the fuzziest part. This old thread can put you in the good track: http://groups.google.com/group/comp.lang.ada/browse_thread/thread/73c865853bdc4937 In particular the first reply mentions arguments to the linker that ring a bell to me, although I'm sure to have seen at least an alternate suggestion for a set of linker options dealing with the stack.
From: amado.alves on 7 Aug 2008 09:40 Thanks but nothing of this works. Modifying the library now.
From: Alex R. Mosteo on 7 Aug 2008 11:12 amado.alves(a)gmail.com wrote: > Thanks but nothing of this works. > Modifying the library now. I was able to raise the stack size using these methods, but maybe you're hitting some other wall. Have you tried with some simple testcase to see if you're getting a larger stack at all? I seem to remember that some linker settings were failing silently for someone, until it got it right.
From: amado.alves on 7 Aug 2008 12:25 > I was able to raise the stack size using these methods, but maybe you're > hitting some other wall. Have you tried with some simple testcase to see if > you're getting a larger stack at all? I seem to remember that some linker > settings were failing silently for someone, until it got it right. Some other time maybe I will try that. Currently it is too risky. I am pressed. Thanks.
From: amado.alves on 7 Aug 2008 14:21
Despite the risk, I gave it another try (at stack size), because something was smelly. It turns out that my system must be broken badly! Programs with tasks explode with the message "Illegal instrution". Even the simplest program procedure Simplest is task type Subtask_T; task body Subtask_T is begin null; end; Subtask : Subtask_T; begin null; end; Tomorrow in the office I'll try a different computer. |