Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 25-11-2009, 18:52   #1
Obsfucator, Second Class
 
dacust's Avatar

Cruisers Forum Supporter

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,743
Multi-CPU Issues - a Fix

I can't remember the situation, but I remember in one of the tech threads, there was a crashing situation on multi-CPU machines that was fixed by forcing the process to only use one CPU.

Manual Fix
This was already posted by someone, but I'll recap the manual way to fix it. As my only multi-CPU system is Windows 7, that's what I will describe.

Find OpenCPN in the task manager application tab. Right click and choose "Goto Process". On the process, right click it and choose "Set Afinity". Then pick just one CPU. (For OpenCPN you can actually just go straight to the process, but the above way is a little easier...)

Permanent Fix
OK, so that fixes it. But only as long as it is running. You'll have to repeat that each time you start it up.

For that, try WinAFC (Windows AFinity Control). You can find it at SourceForge. I put it on my machine last night and tested it with FAH (Folding At Home). It is fairly easy to use and is highly configurable.

As an example, if you want to force OpenCPN to CPU 4, here is what you will need in the configuration file:

Code:
C:\Program Files (x86)\OpenCPN := CPU3
That's CPU3, because the 4 CPUs are numbered 0-3.
As I look at the example above, I realize the path I tested did not have spaces in it. You might need quotes around that. But the := makes me think it might work like it is.

It defaults to running in test mode, so after you fire it up the first time, check the log. If it looks right, comment out the Test Mode line and have it load the configuration again.

It also defaults to checking every 30 seconds. That could be a problem if what causes your crash comes up in less than that amount of time, so you might need to shorten that down a bit. Shouldn't take too much CPU to check more often. That is a command line setting. EDIT - this can be set in the config, as well.

The documentation is good and there are lots of examples.

WinAFC <- documentation with download link.

-dan
__________________

dacust is offline   Reply With Quote
Old 25-11-2009, 19:15   #2
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Affinity

Dan....

Good catch...

However, this should not be necessary to fix the crash.

In a draconian way, I have programmatically forced all Windows opencpn instances to only run on one core from Version 1.3.5 onward.

I suppose that WinAFC could "undo" this after the app is started, if needed for testing, or if one knows that virtual ports are not being used....

Could you try this out?

Thanks
Dave
__________________

__________________
bdbcat is offline   Reply With Quote
Old 25-11-2009, 19:44   #3
Obsfucator, Second Class
 
dacust's Avatar

Cruisers Forum Supporter

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,743
Yep, it will reset it.

I checked, and OpenCPN was running only on CPU0. I ran the config below and now it says ALL.

Here's the config to make it go back to all processors:

C:\Program Files (x86)\opencpn\opencpn.exe := ALL

I discovered a bug in my configuration in the first post. I put in bold what I left out the first time. It does work with embedded spaces in the path.

-dan
dacust is offline   Reply With Quote
Old 25-11-2009, 20:30   #4
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Dan...

Cool. Thanks
Dave
__________________
bdbcat is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN and Atom CPU? amadeus OpenCPN 7 03-11-2009 15:38
trying to fix problem MacPepper Electrical: Batteries, Generators & Solar 16 26-05-2008 04:39
Multi vs multi poll Keegan Multihull Sailboats 14 09-05-2008 05:28
best way to fix? turkish6 Construction, Maintenance & Refit 14 01-05-2008 21:31
Dee'll fix it CaptainK Provisioning: Food & Drink 0 10-04-2006 20:33



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 18:47.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.