[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform
From: |
Heinrich Schuchardt |
Subject: |
Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform |
Date: |
Wed, 24 May 2017 19:12:18 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
Hello Andrew,
the code is still wrong in minisat.h:
typedef int lit;
This assumes that int never has more bits then size_t. This is not
guaranteed. The x32 ABI uses 32bit addresses and supports 64bit integers
(https://lwn.net/Articles/456731/). It depends on the compiler if int
has 32 or 64bit.
Change the definition to either
typedef size_t lit;
or
typedef ssize_t lit;
depending on your need to use signed or unsigned integers.
The following line has a typo:
/* vector of 32-bit intergers (added for 64-bit portability) */
The following typedef is also wrong. The size of arrays should not be of
type int but of type size_t.
And int is not guaranteed to be 32bit. Use int32_t if you explicitly
need 32bits.
typedef struct /* veci_t */ {
int size; // this should be size_t
int cap; // this should be size_t
int* ptr; // this should be int32_t* if you need 32bit
} veci;
Same bug here:
typedef struct /* vecp_t */ {
int size; // this should be size_t
int cap; // this should be size_t
void** ptr;
} vecp;
Please, carefully review the types used in the whole module.
It should make no assumptions about the relative lengths of pointers and
integers.
Best regards
Heinrich Schuchardt
On 05/24/2017 10:25 AM, Andrew Makhorin wrote:
>> Please see a preliminary non-official release of glpk 4.62 at:
>> http://sourceforge.net/projects/noumenon/files/tmp/
>>
>>
>
> I'd very appreciate if someone could test the --minisat option on a
> 64-bit platform. To test it just compile and install glpk as usual and
> then enter subdirectory glpk/examples/pbn and run glpsol as follows:
>
> glpsol --minisat -m pbn.mod -d disney.dat
>
> If glpsol crashes, please report to address@hidden . Thanks.
>
>
> Andrew Makhorin
>
>
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-glpk
>
- Re: [Help-glpk] [Fwd: Enabling MiniSat for 64 bit?], Andrew Makhorin, 2017/05/23
- Re: [Help-glpk] [Fwd: Enabling MiniSat for 64 bit?], Chris Matrakidis, 2017/05/23
- Re: [Help-glpk] [Fwd: Enabling MiniSat for 64 bit?], Andrew Makhorin, 2017/05/24
- Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform,
Heinrich Schuchardt <=
- Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform, Andrew Makhorin, 2017/05/24
- Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform, Chris Matrakidis, 2017/05/24
- Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform, Andrew Makhorin, 2017/05/25
- Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform, Chris Matrakidis, 2017/05/25
- [Help-glpk] cnf-sat solver interface, Andrew Makhorin, 2017/05/25
- Re: [Help-glpk] cnf-sat solver interface, Andrew Makhorin, 2017/05/25
- Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform, Marco Atzeri, 2017/05/24
- Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform, Andrew Makhorin, 2017/05/24
- Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform, J. Friedman, 2017/05/24
- Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform, Andrew Makhorin, 2017/05/25