Page 1 of 1

Various Answers

Posted: Wed Jan 02, 2019 9:10 am
by IamMeisam
I run a same model with same data in two different PCs with the same version of GAMS and i get different answers for decision variables. what's the reason?

Re: Various Answers

Posted: Thu Jan 03, 2019 10:16 am
by Renger
Hi
Your question is posed in a such a general way, that it is hard to give an answer.
What kind of model (where is the code), what is meant by "different"?
Cheers
Renger

Re: Various Answers

Posted: Thu Jan 03, 2019 6:39 pm
by IamMeisam
I developed a mixed integer linear programing model for wheat supply chain which is coded in GAMS. the default solver is cplex. when i run the code in my laptop, for example i get 0 for two of my decision variables and when i run the code in another laptop, the mentioned decision variables are non-zero. i get different values for all of my my decision variables when i run the code in two laptops. the version of the GAMS is same in both laptops. why is that?

Re: Various Answers

Posted: Thu Jan 03, 2019 7:14 pm
by Renger
It sounds a little bit weird but perhaps https://www-01.ibm.com/support/docview. ... wg21399979 can explain it.
Cheers
Renger

Re: Various Answers

Posted: Fri Jan 04, 2019 3:06 pm
by dirkse
There are several possible explanations for this behavior, for example:

1. Your model could have multiple optimal solutions. Even when using the same software, you cannot expect always the same answers on different machines, because solvers use automatic CPU dispatch to run code optimized for the chip it runs on. https://software.intel.com/en-us/mkl-ma ... hitectures is a link about this that Google just found me.

2. You didn't mention what your optcr setting is, or why the solver stopped. If you stop on a time limit prior to getting a proven optimal solution, I would not expect this to result in identical runs on different machines, even with identical software.

In general, you cannot expect solver runs to proceed identically on different machines. Often we do see identical runs across machines, but the solvers have multiple areas where they are or can be sensitive to the environment they run in (number of cores on the machine, CPU type, available memory, timing, sizes of the different caches in the CPU) and sometimes these result in differences.

-Steve