Executing C++ program on multiple processor machine

DataMiner picture DataMiner · Oct 20, 2011 · Viewed 7.3k times · Source

I developed a program in C++ for research purpose. It takes several days to complete.

Now i executing it on our lab 8core server machine to get results quickly, but i see machine assigns only one processor to my program and it remains at 13% processor usage(even i set process priority at high level and affinity for 8 cores).

(It is a simple object oriented program without any parallelism or multi threading)

How i can get true benefit from the powerful server machine? Thanks in advance.

Answer

Ira Baxter picture Ira Baxter · Oct 20, 2011

Partition your code into chunks you can execute in parallel.

You need to go read about data parallelism and task parallelism.

Then you can use OpenMP or MPI to break up your program.