* GNAT and multi-processor
@ 2005-12-21 9:08 huynh
2005-12-21 14:25 ` Marc A. Criley
2005-12-21 20:49 ` Jeffrey R. Carter
0 siblings, 2 replies; 3+ messages in thread
From: huynh @ 2005-12-21 9:08 UTC (permalink / raw)
Hi
I have big problems with Ada/GNAT programs running on multi-processor
or
hyperthreaded Linux machines :
segmentation fault resulting in STORAGE_ERROR or PROGRAM_ERROR.
When they run on Linux mono-processor or Solaris machines, there is no
problem !
- Is there any way to make my programs use only ONE processor ?
- Or any way to change the threading policy ? (I cannot use FSU-threads
because of I/O that would block the entire process)
Any idea is welcome !
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GNAT and multi-processor
2005-12-21 9:08 GNAT and multi-processor huynh
@ 2005-12-21 14:25 ` Marc A. Criley
2005-12-21 20:49 ` Jeffrey R. Carter
1 sibling, 0 replies; 3+ messages in thread
From: Marc A. Criley @ 2005-12-21 14:25 UTC (permalink / raw)
huynh@cena.fr wrote:
> I have big problems with Ada/GNAT programs running on multi-processor
> or
> hyperthreaded Linux machines :
> segmentation fault resulting in STORAGE_ERROR or PROGRAM_ERROR.
>
> When they run on Linux mono-processor or Solaris machines, there is no
> problem !
>
> - Is there any way to make my programs use only ONE processor ?
> - Or any way to change the threading policy ? (I cannot use FSU-threads
> because of I/O that would block the entire process)
Genuinely concurrent programming is hard. It's only been relatively
recently that multi-processor and multi-core systems have become
widespread, so up till now most multi-tasking programs haven't been
exposed to executing separate tasks truly simultaneously.
Simulated multi-tasking wherein the reality is that actually only one
task is ever executing at a time can cover up implementation defects
relating to race conditions, deadlock, and simultaneously
updating/accessing an unprotected resource.
While locking the program to one CPU would likely resolve your issue,
it's at best a short-term fix. In all likelihood, there's an error in
your implementation where an implicit assumption is being made that only
one task is ever executing at a time, and that's what needs to be
addressed. Judging by the failures you're getting, my first guess would
be that a simultaneous access/update is occurring.
For a general overview of multi-core and multi-processor issues, try (I
believe) the 9/05 issue of ACM Queue; here's a representative article:
http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=333.
-- Marc A. Criley
-- McKae Technologies
-- DTraq - XPath In Ada - XML EZ Out
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GNAT and multi-processor
2005-12-21 9:08 GNAT and multi-processor huynh
2005-12-21 14:25 ` Marc A. Criley
@ 2005-12-21 20:49 ` Jeffrey R. Carter
1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey R. Carter @ 2005-12-21 20:49 UTC (permalink / raw)
huynh@cena.fr wrote:
> I have big problems with Ada/GNAT programs running on multi-processor
> or
> hyperthreaded Linux machines :
> segmentation fault resulting in STORAGE_ERROR or PROGRAM_ERROR.
>
> When they run on Linux mono-processor or Solaris machines, there is no
> problem !
Are the Solaris machines mono- or multi-processors? If the former, there's
likely an error in your SW that assumes the semantics of a mono-processor
system; if the latter, there's probably an error in the Linux GNAT version
you're using.
What version of GNAT are you using? I know that the SGI Ada compiler, which is
supplied by AdaCore and invoked by "gnatmake", worked fine on SGI
multi-processor systems in 2000.
--
Jeff Carter
"C++: The power, elegance and simplicity of a hand grenade."
Ole-Hjalmar Kristensen
90
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-12-21 20:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-21 9:08 GNAT and multi-processor huynh
2005-12-21 14:25 ` Marc A. Criley
2005-12-21 20:49 ` Jeffrey R. Carter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox