dual opteron prog. help

K

kingsolomon2000

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!
 
T

Tom St Denis

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
 
C

Clever Monkey

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Help 1
Dual Edged Counter 6
Need your help for a young programmer 0
dual core and c 14
Please help 7
Processing in Python help 0
While loop unclear, can someone help? 4
Using Java with Dual & Quad Processors. 2

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top