Set processor affinity for MATLAB engine (Windows 7)
I'm developing an application in c++. One of the components of the application uses Matlab (via the Matlab engine) for data processing. At the same time, a data acquisition system is streaming data to disk. Occasionally, during periods of intensive Matlab processing, the acquisition system crashes. By setting the processor affinity of Matlab to a subset of available processors, this problem is resolved. However, as the application is launched a few times daily, and on multiple machines, manually setting the affinity each time is inconvenient. The trick of setting processor affinity via the