Open XeonMan opened 8 years ago
Suggest using:
var num = (int) Environment.ProcessorCount;
instead of:
var num = (int) (Math.Log(((int) Process.GetCurrentProcess().ProcessorAffinity + 1), 2));
to get the processor (thread) count in:
Encog.Util.Concurrency.DetermineWorkload > public DetermineWorkload(int threads, int workloadSize)
as var num = (int) (Math.Log(((int) Process.GetCurrentProcess().ProcessorAffinity + 1), 2)); returns 4294967295 for a dual cpu, 32 thread system whereas Environment.ProcessorCount correctly returns 32.
I am getting what seems to be an Encog (3.x) threading / workload error...
Been using Encog CS 3.1, 3.2 and 3.3 with VS.NET 2015 on two servers, each with dual X5400 series 4 core / 4 thread Xeons (8 core / 8 thread system total) without a problem. One has 32Gb RAM and the other 64Gb (though I am only actually seeing 1 busy thread, but that's another story...).
I recently tried the exact same code, compiled (exe) and on the VS IDE on a dual X7500 series 8 core / 16 thread Xeon server (16 core / 32 thread 64Gb system total) and I get this error (with the Encog CS pre-compiled DLL straight from GitHub):