randoll wrote:
How to write windows application which will crash at multicore affinity?
I don't know about this exact application but there are some typical cases that one should keep in mind to avoid crashing on multicore configuration.
One of my typical examples: using RDTSC directly instead of doing system/library calls. TSC counter is often non-synchronized between different cores (even when they're inside one CPU) and it cannot be synchronized between separate CPUs. So when you start measurement on some core and then scheduler moves you to another one - it's possible to get negative or even zero result of (time_end - time_start). This can break some calculations and lead to exceptions.
Another common option: usage of non-reentrant/thread unsafe libraries (especially if authors tried to add some parallel computation support but didn't verify/test it enough).
Bender wrote:
There is a dirty trick, you disable the initialize other cores on startup in msconfig.
Oh, why would anyone ( who knows about `CPU affinity' ) try such a dirty trick instead of looking for a way to tell OS (AFAIR, Linux and Windows include such support) about required affinity at process start time? Yes, this way looks easier but it brings possibility of breaking your OS installation, and reinstallation is often a hard process (especially when you have done a lot of customizations but don't have space for backups).