Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > dual opteron prog. help

Reply
Thread Tools

dual opteron prog. help

 
 
kingsolomon2000@yahoo.com
Guest
Posts: n/a
 
      10-13-2006
Hi!

Can anyone please show me an example how to write a very simple C
program such that it runs on a specific processor?

I want to run a very simple program, 2 programs identical, and one runs
one one processor and the other program (same one) runs on a different
processor.

How do I specify which processor in the code to force the program to
run on a specific processor.

ex: would be if I ran the 2 programs on the same processor, it should
run slower but if ran on separate processors (I have a dual opteron
244) the programs should run at their normal speed. I know they won't
increase in speed but I want to specify in code how to choose a
processor.

I have Fedora Core 3 at the moment.

I would be most grateful for any help!

 
Reply With Quote
 
 
 
 
Tom St Denis
Guest
Posts: n/a
 
      10-13-2006

wrote:
> Hi!
>
> Can anyone please show me an example how to write a very simple C
> program such that it runs on a specific processor?
>
> I want to run a very simple program, 2 programs identical, and one runs
> one one processor and the other program (same one) runs on a different
> processor.
>
> How do I specify which processor in the code to force the program to
> run on a specific processor.
>
> ex: would be if I ran the 2 programs on the same processor, it should
> run slower but if ran on separate processors (I have a dual opteron
> 244) the programs should run at their normal speed. I know they won't
> increase in speed but I want to specify in code how to choose a
> processor.


Not a comp.lang.c subject but look at sched_setaffinity().

Tom

 
Reply With Quote
 
 
 
 
Clever Monkey
Guest
Posts: n/a
 
      10-13-2006
wrote:
> Can anyone please show me an example how to write a very simple C
> program such that it runs on a specific processor?
>

Probably off-topic here. See if Googling "processor affinity" yields
anything helpful, or consult your system documentation.

I suspect anything you find will be extremely platform specific,
requiring platform specific, non-Standard APIs in whatever language you
choose.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Core Opteron and Java threads Andy Java 5 03-09-2006 01:52 AM
Itanium vs Opteron Dual Core =?Utf-8?B?Q2xpdmUgQ3JvY2tlcg==?= Windows 64bit 2 09-29-2005 02:33 PM
Virtual Server 2005 on 64bit and Opteron Dual Core =?Utf-8?B?U29uIG9mIFN0b25l?= Windows 64bit 1 09-28-2005 07:15 PM
Dual Opteron 275's - are they supported? =?Utf-8?B?QW5kcmV3X05a?= Windows 64bit 10 06-28-2005 08:37 PM
Advice needed for new PC: dual Xeon or dual Opteron, or neither... Toby Computer Information 65 04-22-2004 12:30 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57