[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-glpk] Different generated model on ARMv7 and x86-64
From: |
Heinrich Schuchardt |
Subject: |
Re: [Bug-glpk] Different generated model on ARMv7 and x86-64 |
Date: |
Sun, 6 Aug 2017 20:50:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 08/06/2017 08:20 PM, Andrew Makhorin wrote:
>
>> In the first two cases evaluation of pt precedes evaluation of xt while
>> in the last three cases xt is evaluated before pt. At the moment I
>> cannot say why this happens...
>
> I'm sure that this happens, because in the first two cases arguments
> passed to a function (I mean C code, not MathProg) are evaluated in one
> order while in the last three cases in some different order. For
> example, to add two linear forms the following statement is used in
> mpl3.c (see line 4754):
>
> value = linear_comb(mpl,
> +1.0, eval_formula(mpl, code->arg.arg.x,
> +1.0, eval_formula(mpl, code->arg.arg.y);
>
> where the order in which eval_formula is called depends on the platform.
>
>
FORMULA *op1;
FORMULA *op2;
...
case O_ADD:
/* addition */
op1 = eval_formula(mpl, code->arg.arg.x);
op2 = eval_formula(mpl, code->arg.arg.y);
value = linear_comb(mpl,
+1.0, op1,
+1.0, op2);
break;
gives same result on both arm64 and x86-64.
I suggest you change all binary operands.
Best regards
Heinrich Schuchardt
- [Bug-glpk] Different generated model on ARMv7 and x86-64, Heinrich Schuchardt, 2017/08/06
- Re: [Bug-glpk] Different generated model on ARMv7 and x86-64, Andrew Makhorin, 2017/08/06
- Re: [Bug-glpk] Different generated model on ARMv7 and x86-64, Heinrich Schuchardt, 2017/08/06
- Re: [Bug-glpk] Different generated model on ARMv7 and x86-64, Andrew Makhorin, 2017/08/06
- Re: [Bug-glpk] Different generated model on ARMv7 and x86-64, Heinrich Schuchardt, 2017/08/06
- Re: [Bug-glpk] Different generated model on ARMv7 and x86-64, Andrew Makhorin, 2017/08/06
- Re: [Bug-glpk] Different generated model on ARMv7 and x86-64, Andrew Makhorin, 2017/08/06
- Re: [Bug-glpk] Different generated model on ARMv7 and x86-64,
Heinrich Schuchardt <=
- Re: [Bug-glpk] Different generated model on ARMv7 and x86-64, Andrew Makhorin, 2017/08/06
- Re: [Bug-glpk] Different generated model on ARMv7 and x86-64, Heinrich Schuchardt, 2017/08/06
- Re: [Bug-glpk] Different generated model on ARMv7 and x86-64, Andrew Makhorin, 2017/08/06