Different CPLEX threads influences final results?

Problems with syntax of GAMS
Post Reply
GabrielYin
User
User
Posts: 52
Joined: 7 months ago
Location: Dallas, TX, USA

Different CPLEX threads influences final results?

Post by GabrielYin » 1 week ago

Hi all,

I have tried to set different threads for CPLEX solver to facilitate my computation, but weirdly, different threads gave different final results. Based on my knowledge, setting threads will only influence the speed because it is for parallel computing, but will not have any impact on the execution results. I state my program as follows:

Each iteration runs a MIQCP problem (obtain UB) and a MILP problem (obtain LB). The maximum iteration limit is 10. I also set a convergence criterion (UB-LB)/UB<1e-2 at 16th iteration. The following are the three reports of results based on different thread settings.

First: option threads = 8;

Code: Select all

----    809 PARAMETER LB  

1  5965.400,    2 49104.258,    3 53720.551,    4 58302.189,    5 58786.475


----    809 PARAMETER UB  

1 589447.897,    2 589447.897,    3 444602.048,    4 134614.155
At iteration 5, it terminated with an error (UB=0) when calculating the convergence criterion (UB-LB)/UB<1e-2.
elapsed time: 2min42sec

Second: option threads = 4;

Code: Select all

----    809 PARAMETER LB  

1   5965.400,    2  50115.912,    3  53957.301,    4  56612.179,    5  58400.315
6  59126.019,    7  59962.922,    8  59261.724,    9  59705.817,    10 59691.876


----    809 PARAMETER UB  

1  589447.897,    2  589447.897,    3  418927.137,    4  418927.137
5  134227.995,    6  108560.247,    7  108560.247,    8  107887.845
9   60539.785,    10  60539.785
elapsed time:

Third: option threads = 1;

Code: Select all

----    809 PARAMETER LB  

1   5965.400,    2  52546.437,    3  55356.249,    4  59074.509,    5  58976.462
6  59126.019,    7  59323.676,    8  59126.019,    9  59705.414,    10 59261.724


----    809 PARAMETER UB  

1 589447.897,    2 589447.897,    3 461349.575,    4  61684.534,    5  61684.534
6  61684.534,    7  61684.534,    8  61684.534,    9  61684.534
elapsed time: 6min37sec

I did not use GUSS or other advanced tools, just regular coding. Any idea about the treads issue? Which one should I trust as the true results? Thanks in advance!

Gabriel

GabrielYin
User
User
Posts: 52
Joined: 7 months ago
Location: Dallas, TX, USA

Re: Different CPLEX threads influences final results?

Post by GabrielYin » 1 week ago

Sorry, for threads = 4 case, the elapsed time is 5min38sec.

Gabriel

Post Reply