1

enter image description here

I have recently upgraded to ILNumerics version 4.3. I see the above exception frequently popping up in my application when working with ILNumerics arrays. Unfortunately I cudn't reproduce it in the debug mode, so not sure what part of my code is triggering this.

Did anyone had similar issues? Also to add, I have not modified any of the ILNumerics default settings.

Any suggestions to try?

Neelima
  • 243
  • 1
  • 8

2 Answers2

0

Try it with the latest version! If that does not help, configure the number of threads to use explicitely, as let's say '2'. This enables multithreading even in debug mode. That way you may be able to reproduce the exception and find the area causing it.

Using multiple threads in debug mode may cause strange behavior in the IDE. Especially when working with the immediate window. So you better not use that method unless really necessary.

Haymo Kutschbach
  • 3,322
  • 1
  • 17
  • 25
0

I have the same problem and it only happens on production machine. I think the problem is multi-threading. I guess you might have something like Parallel.ForEach in your code.

Take a look at their official document: Settings.MaxNumberThreads.

"In order to maximize execution speed of numerical algorithms, the value of MaxNumberThreads should be equal to the number of real processor cores on the system. For processors utilizing Hyper-threading the number on virtual cores may be higher. However, since those virtual cores share certain ressources for execution, parallel utiliziation can not efficently be done with them. In this cases, the number of 'cores' appearing e.g. in the windows task manager is misleading and the true number of independent cores should be used for MaxNumberThreads instead. Consult your proccessor vendor in order to find out, how many independant cores your system utilizes.

Since the number of independent cores is not reliably determined by .NET, ILNumerics defaults to 2 cores on all multicore machines. Therefore, this setting should be set manually for better processor utilization on multicore machines.

If your algorithm uses custom parallel execution models, it may be necessary to set this value to '1'. ILNumerics will run single threaded than - leaving you the option to configure the execution on parallel threads on your own.

The setting of this value also effects the corresponding value of any unmanaged optimized support library (e.g. MKL) internally used by ILNumerics.

[ILNumerics Core Module]"

You may try to set the above option to 1.

evertqin
  • 70
  • 5
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Bhavesh Odedra Oct 08 '15 at 16:12
  • @Odedra, Thanks for the advice! Just updated the post. – evertqin Oct 09 '15 at 16:19