bug-glpk
[Top][All Lists]
Advanced

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

[Bug-glpk] exact solver broken on 64-bit platforms when using internal m


From: Axel Simon
Subject: [Bug-glpk] exact solver broken on 64-bit platforms when using internal mp library
Date: Thu, 20 Mar 2008 11:30:14 +0100

Hi,

in glpk 4.25, the pool allocator fails in src/glpgmp.c:46 since

sizeof(struct mpq) <= sizeof(struct mpz_seg)

does not hold on a LP-64 platform. The compiler inserts padding in front
of the pointers such that sizeof(struct mpq)=32 and sizeof(struct
mpz_seg)=24. Changing 'unsigend short d[6]' to 'unsigned short d[12]' in
in struct mpz_seg in include/glpgmp.h is a workaround, but the proper
fix is probably to use max(sizeof(struct mpq),sizeof(struct mpz_seg)) as
an argument to all pool-allocation functions.

Cheers,
Axel.







reply via email to

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