smp and gcc

smp and gcc

Post by Japi » Sun, 31 Dec 2000 03:39:19



Hello

I have a dual celeron board and I recently build gcc and make on it.
They (and other apps) gave me the message that I have a
i686-pc-linux-blah,blah.
But is it possible to build programs special for smp?
I can't find that anyware.

--

Groetjes Japie

   .~.
  / V \
 /( _ )\
   ^ ^

 
 
 

smp and gcc

Post by Kaz Kylhe » Sun, 31 Dec 2000 03:56:42



>Hello

>I have a dual celeron board and I recently build gcc and make on it.
>They (and other apps) gave me the message that I have a
>i686-pc-linux-blah,blah.
>But is it possible to build programs special for smp?
>I can't find that anyware.

You have to use threads, processes, or else a special compiler that can
parallelize language-level constructs such as multi-dimensional loops,
using threads underneath. I don't know of such things being available
for Linux, and really they are only suitable for number crunching
applications, rather than arbitrary uses of parallelism.  Your best bet
is to learn how to use threads, or to architect your application
such that it's divided into multiple processes.

 
 
 

smp and gcc

Post by D. Stimit » Sun, 31 Dec 2000 11:29:03



> Hello

> I have a dual celeron board and I recently build gcc and make on it.
> They (and other apps) gave me the message that I have a
> i686-pc-linux-blah,blah.
> But is it possible to build programs special for smp?
> I can't find that anyware.

> --

> Groetjes Japie

>    .~.
>   / V \
>  /( _ )\
>    ^ ^

As a general option to compilers for optimizing, there is no smp
optimization. It is part of the program as to whether it works that way
or not, rather than being part of the compiler.
 
 
 

smp and gcc

Post by Pat Shelto » Mon, 01 Jan 2001 14:15:28


It depends on what you mean.  You don't have to compile a program
for SMP, Linux supports SMP so different tasks will run in parallel.
If you want a parallel program then you will have to use threads or
different processes using shared memory.  The only compiler to
support parallel code is Fortran and there is Fortran 90, 95, and HPF.
Parallel compilers are available for Linux but they are not free.
Check out the NAS compiler, Portland Compiler, etc.  Search the web
for this stuff.

Regards.


> Hello

> I have a dual celeron board and I recently build gcc and make on it.
> They (and other apps) gave me the message that I have a
> i686-pc-linux-blah,blah.
> But is it possible to build programs special for smp?
> I can't find that anyware.

> --

> Groetjes Japie

>    .~.
>   / V \
>  /( _ )\
>    ^ ^

 
 
 

smp and gcc

Post by Japi » Wed, 03 Jan 2001 02:43:47




> It depends on what you mean.  You don't have to compile a program for
> SMP, Linux supports SMP so different tasks will run in parallel.

Yes I saw that in my cpumon. but is that optimal?
I was wondering if a special smp-compiled version of kde should run
faster than a non-smp one (on a smp-machine)
Or should smp-specific funktions already exist in the sources?

Quote:> The only compiler to support parallel
> code is Fortran and there is Fortran 90, 95, and HPF. Parallel compilers
> are available for Linux but they are not free. Check out the NAS
> compiler, Portland Compiler, etc.  Search the web for this stuff.

Are those C-compilers and can I use them instead of gcc?

--

Groetjes Japie

   .~.
  / V \
 /( _ )\
   ^ ^

 
 
 

smp and gcc

Post by Japi » Wed, 03 Jan 2001 06:48:05




> It depends on what you mean.  You don't have to compile a program for
> SMP, Linux supports SMP so different tasks will run in parallel.

Yes I saw that in my cpumon. but is that optimal?
I was wondering if a special smp-compiled version of kde should run
faster than a non-smp one (on a smp-machine)
Or should smp-specific funktions already exist in the sources?

Quote:> The only compiler to support parallel
> code is Fortran and there is Fortran 90, 95, and HPF. Parallel compilers
> are available for Linux but they are not free. Check out the NAS
> compiler, Portland Compiler, etc.  Search the web for this stuff.

Are those C-compilers and can I use them instead of gcc?

--

Groetjes Japie

   .~.
  / V \
 /( _ )\
   ^ ^

 
 
 

smp and gcc

Post by Ronald Col » Wed, 03 Jan 2001 09:12:39



> Yes I saw that in my cpumon. but is that optimal?
> I was wondering if a special smp-compiled version of kde should run
> faster than a non-smp one (on a smp-machine)
> Or should smp-specific funktions already exist in the sources?

I think there is a confusion.  Parallelism is achieved through the use
of threads, which is a library issue and not a compiler issue.  It is
the scheduler in the kernel that places threads on CPUs.

--
Forte International, P.O. Box 1412, Ridgecrest, CA  93556-1412

President, CEO                             Fax: (760) 499-9152
My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084  4A88 8851 E6C8 69E3 B00B

 
 
 

smp and gcc

Post by David Wrag » Wed, 03 Jan 2001 10:27:01



> I think there is a confusion.  Parallelism is achieved through the use
> of threads, which is a library issue and not a compiler issue.  It is
> the scheduler in the kernel that places threads on CPUs.

In current practice, thread-level parallelism tends not to be a
compiler issue (though instruction-level parallelism certainly is).

However, this is partly a reflection of the state of the art in
parallelizing compilers, and partly because C is an awful language as
far as parallelizing compilers are concerned.  As someone else
mentioned, parallelizing FORTRAN compilers are available, and a lot of
academic research effort has been directed at parallel implementations
of other more obscure languages.

David Wragg

 
 
 

smp and gcc

Post by Nix » Fri, 05 Jan 2001 07:50:39


On 01 Jan 2001, Ronald Cole stated:

Quote:> I think there is a confusion.  Parallelism is achieved through the use
> of threads, which is a library issue and not a compiler issue.

Not necessarily true. Vectorizing compilers (some were given earlier in
the thread by Pat Shelton) can decompose many common operations
(e.g. iterating over the elements of arrays) into parallel threads.

(Of course, this is never going to be as good as you could get by
discretizing your application into lots of pieces yourself, but it can
be *very* much less work.)

There has been some discussion about doing such optimizations in g95
(the under-construction pre-pre-pre-pre-alpha replacement for G77), but
I don't know if much has come of them (yet).

--
`Umbilical cords are weird squishy *y things.
 Kinda like clams.' --- Dan Birchall in the Monastery

 
 
 

smp and gcc

Post by Thaddeus L Olcz » Fri, 05 Jan 2001 15:42:28





>>Hello

>>I have a dual celeron board and I recently build gcc and make on it.
>>They (and other apps) gave me the message that I have a
>>i686-pc-linux-blah,blah.
>>But is it possible to build programs special for smp?
>>I can't find that anyware.

>You have to use threads, processes, or else a special compiler that can
>parallelize language-level constructs such as multi-dimensional loops,
>using threads underneath. I don't know of such things being available
>for Linux, and really they are only suitable for number crunching
>applications, rather than arbitrary uses of parallelism.  Your best bet
>is to learn how to use threads, or to architect your application
>such that it's divided into multiple processes.

Is there a way of setting affinities in gcc?