Originally posted by: Falcon_G
Dear all
I have got a problem for which I generate the cuts in lazy constraint callback and a userCut callback.
The code works fine with a single thread.
with more threads:
Initially, I had an instance of IloFastMutext which was shared between them to lock and unlock. I expected to work properly as I have done it in the earlier versions of cplex but this time did not and causes an exception which is not catched.
Therefore, i gave one separate instance of IloFastMutex to each callback and after that it works fine with two threads.
As soon as I increase the number of threads to three 3 I get the same issue and execution ends with:
First-chance exception at 0x774745ce in bc-multi-thread.exe: 0xC0000005: Access violation reading location 0xfeeefeee.
Unhandled exception at 0x774615de in bc-multi-thread.exe: 0xC0000005: Access violation reading location 0xfeeefeee.
First-chance exception at 0x7745016e in bc-multi-thread.exe: 0x00000000: The operation completed successfully.
Unhandled exception at 0x774615de in bc-multi-thread.exe: 0x00000000: The operation completed successfully.
The program '[22708] bc-multi-thread.exe: Native' has exited with code 0 (0x0).
Again the exception is not catched in any of the following:
catch(IloMutexProblem& e)
{
cout << "IloMutexProblem::" << e << endl;
}
catch (IloException& e) {
cout << "exception::" << e << endl;
}
catch (...) {
cout << "exception::" << endl;
}
I appreciate any constructive comment.
regards,
Shahin
#CPLEXOptimizers#DecisionOptimization