1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Dual core programming

  1. Aug 20, 2006 #1
    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
  2. jcsd
  3. Aug 20, 2006 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Just use more than one thread, and the OS will automatically load-balance the two cores effectively.

    - Warren
  4. Aug 21, 2006 #3


    User Avatar
    Science Advisor

    You can also assign different threads to run on different processors if you want to ensure they'll be running on different processors.
  5. Aug 22, 2006 #4
    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,
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Dual core programming
  1. HMI programming (Replies: 1)