09-18-2006 02:54 PM
And here's yet another instance of serial i/o problems using the NI rs-232 library on a multi-core PC -
A DLL I wrote using CVI 6.x has worked fine for years. We recently started using it on a new system, and fairly regularly the serial I/O would mysteriously hang up. The DLL is single threaded, and uses the NI rs-232 library with a "built in" com port on a P4 hyperthreaded micro/motherboard.
I forced the new system to run as single core (changed boot.ini using msconfig) and now it runs without hangin up.
Is there a flaw in the NI rs-232 library? There have been several separately reported instances of applications that use the ni rs-232 library failing when run on a multi-core microprocessor.
Somebody at NI understands this issue I am quite sure. Why else would NI advertise a serial board (843x) as being "hyperhtread compatible"? Why wouldn't you expect a CVI app using the rs-232 library to work on a multi-core system? Why would you have to procure a "hyperthread compatible" com port card?
I have used the 843x boards, the NI 1.8 serial library, and the same rs-232 library and this combo runs just fine on multi-core systems.
Can I use the NI 1.8 serial driver on the built-in com ports on a multi-core PC? Will this fix the problem?
Menchar
09-19-2006
04:08 PM
- last edited on
11-14-2025
03:19 PM
by
Content Cleaner
Menchar,
First of all, as always, I would recommend using the latest NI Serial driver. However, in your case, nothing for Windows serial has changed since NI Serial version 1.8, so I would first suggest upgrading to this version to see if this helps.
You are correct in saying that NI advertises our boards as hyperthread compatible (link). That said, I'm not sure if our older drivers supported this technology. This would lead me to recommend to you to try and use the latest drivers and versions of the runtime engine because the software has been optimized to run with the latest software.
With that in mind, I don't think that there is a problem with NI's serial library because you stated yourself that the application works fine with NI serial boards and NI's serial library. When you are having problems, it sounds like you are using built in serial ports, which may not be hyperthread compatible themselves (even though the drivers themselves are).
Furthermore, is your program hanging from the start? Or is it hanging on the first serial execution? From the way you described it, it sounds like this is not the case, but rather it would randomly hang during execution. If this is the case, it sounds to me like NIs software is working fine, at least for a portion of time. I'm not sure why your program would be hanging; however, I don't know all of the specifics of your built in serial board.
As a temporary workaround, you noted that you could force your computer to function on one processor. This, obviously, is not optimal for every other application on your computer; however, you can actually force a thread to function on just one processor. This is described in the document Multithreading in LabWindows/CVI. If you can apply this technique to your applications that are not using NI Serial boards on multiprocessor systems it should help it not hang.
Matt Mueller
National Instruments
09-19-2006 05:17 PM - edited 09-19-2006 05:17 PM
Message Edited by menchar on 09-19-2006 03:20 PM
09-19-2006 05:23 PM
09-19-2006 05:53 PM
09-20-2006
10:03 AM
- last edited on
11-14-2025
03:19 PM
by
Content Cleaner
Menchar,
Mert added some of the information that I didn't know and I think it answers most of your questions. As Mert indicated, I don't think it is a problem with your built in com ports, rather, it is a problem with the drivers that RS-232 is using to talk to your com ports. I assume these drivers are not hyperthread compatible, so on single processor computers you would not encounter these deadlocks. I would try to find out what driver that the RS-232 library is selecting to use with your com ports and attempt to find out if that driver is hyperthread compatible.
Just to touch on a few from a couple posts ago:
You asked if other NI serial products are hyperthread compatible. The answer is: "All NI PCI and PXI serial interfaces offer multiprocessor and hyperthreading support..."
You asked if I knew of any hyperthread additions in the runtime engine, and I don't know if there were any fixes specifically targeted at this. However, NI's Serial driver did change for Windows in version 1.8.
Hope this helps and thanks again for your continuing support of NI and its products - it really helps to have dedicated customers that help us ensure that our hardware and software is working correctly.
Matt Mueller
National Instruments
09-20-2006 12:19 PM
Thanks Matt - dang, I was calling Mert Matt 😉 Thanks Mert too.
Well, the serial driver being used is whatever installs from the WinXP Pro SP2 media. And that may well be the culprit, though if the WinXP native serial driver were faulty under hyperthreading you'd think we'd have heard about it as such.
Menchar
09-21-2006 09:51 AM
09-21-2006 12:37 PM - edited 09-21-2006 12:37 PM
Message Edited by menchar on 09-21-2006 10:54 AM
09-22-2006 11:18 PM