CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Location
    Sweden
    Posts
    115

    Core 2 duo problem

    Hi folks.

    We sell a measurement system that use a framegrabber card to collect images, then performs a bunch of calculations.

    There has never been any problems whatsoever with this this software we've used it on many different hardware configurations over the years. It is for instance running with very stable FPS of around 330 on a Celeron 2 GHz.

    But now we have for the first time installed it on a Core 2 Duo (3GHz) and for some reason there software just goes nuts. FPS jumps 9, 100, 22 and so on. There is no reason we can think of that this computer configuration could cause any problems, other than the dual core processor.

    Is there any risk whatsoever that a Core 2 duo could cause problems when running an application not developed for multiple CPU:s?

    OS: Win XP SP3

  2. #2
    Join Date
    Feb 2002
    Posts
    4,640

    Re: Core 2 duo problem

    I suppose it's possible that when switching from one core to the other, a lot of data needs to be flushed from various caches, and re-loaded.

    Try setting the affinity for your program to one "processor", and see if that fixes the issue. In the task manager, find the process under the "Processes" tab; right click; select "Set Affinity" and set it to run on one core.

    Viggy

  3. #3
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Core 2 duo problem

    Is your application multi-threaded?

  4. #4
    Join Date
    Jan 2003
    Location
    Sweden
    Posts
    115

    Re: Core 2 duo problem

    Quote Originally Posted by MrViggy View Post
    Try setting the affinity for your program to one "processor", and see if that fixes the issue. In the task manager, find the process under the "Processes" tab; right click; select "Set Affinity" and set it to run on one core.
    Will try that, thanks!
    Quote Originally Posted by Arjay View Post
    Is your application multi-threaded?
    Yes, the app is multi-threaded. But the threads are designed to wait for one another when necessary, so they should not mess things up...?

  5. #5
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Core 2 duo problem

    Quote Originally Posted by Cyanide View Post
    Will try that, thanks!Yes, the app is multi-threaded. But the threads are designed to wait for one another when necessary, so they should not mess things up...?
    My guess is that the thread synchronization is flawed somehow. Often times thread synchronization issues aren't exposed when only tested on a single proc/single core machine. So if you've only tested on a single proc/single core machine prior to testing on the duo, I would bet that is the issue.

    Make sure that any resources that are shared between threads are properly protected using a critical section, mutex or some other synchronization object.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured