bug-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-glpk] Different generated model on ARMv7 and x86-64


From: Andrew Makhorin
Subject: Re: [Bug-glpk] Different generated model on ARMv7 and x86-64
Date: Sun, 06 Aug 2017 14:51:33 +0300

Hi Heinrich,

> the appended file test.mod is examples/threads/clustering.mod with
> appended line
> 
> printf {t in T} "%d -> %d\n", t,  pt[t];
> 
> Essentially the line prints out part of the generated problem.
> 
> The output on x86-64 ends with:
> 
> 49 -> 608
> 50 -> 334
> Model has been successfully processed
> 
> The output on ARMv7 ends with:
> 
> 49 -> 852
> 50 -> 472
> Model has been successfully processed
> 
> How can it be that the generated model differs depending on the CPU
> architecture?

I think this is due to round-off errors, because you are using
floating-point computations in your model.

Please conduct the following experiment: move the statement

printf {t in T} "%d -> %d\n", t,  pt[t];

immediately before 'minimize', i.e. make it the very first one.
And then compare the output for both platforms. 

BTW, does ARMv7 use the same floating-point representation (including
long double) as x86-64?

> 
> If I run
> printf {1..10000} "%16.15f\n", Uniform01();
> I get the same result on both architectures:
> 
> 0.443241402972490
> Model has been successfully generated
> 
> So it is not a problem in the random number generation.
> 
> If I remove all variables and constraints from appended test.mod I also
> get the same result on both architectures.
> 

Best,

Andrew Makhorin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]