PDA

View Full Version : dual core programming


ptabor
Aug20-06, 01:13 PM
Hello all,

I'm running a stochastic simulator for chemical rate equations and I'd like to know how to specifically impelement a dual core solution on my AMD athlon 64 X2 4200+ processors.

When I run the task manager with the simulator running, it is apparent that both cpus are running cycles - but I'd like to rig it up to do this manually.

Will I be dealing with OpenMP or MPI or something else altogether?

any info would be appreciated

chroot
Aug20-06, 01:43 PM
Just use more than one thread, and the OS will automatically load-balance the two cores effectively.

- Warren

-Job-
Aug21-06, 09:04 PM
You can also assign different threads to run on different processors if you want to ensure they'll be running on different processors.

nmtim
Aug22-06, 08:13 PM
Will I be dealing with OpenMP or MPI or something else altogether?

If you're planning on porting your code to a cluster, you'd probably want to go with a process-oriented library like MPI. Otherwise, either OpenMP or MPI should work okay. OpenMP requires compiler support. What OS are you running?

Some compilers promise to automatically parallelize your code; my (very little) experience has been this doesn't work very well.

Good luck,
Tim