help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Makefiles for 64 bit Windows


From: glpk xypron
Subject: Re: [Help-glpk] Makefiles for 64 bit Windows
Date: Thu, 28 Aug 2008 18:03:42 +0200

Hello Andrew,

when I compiled with 
#define align_boundary sizeof(double)
example/sql/sudoku_odbc.mod 
and some other models glpsol stopped without returning results.

With
#define align_boundary 16
I obtained the expect results.

http://msdn.microsoft.com/en-us/library/aa290049.aspx
teaches "On both of the 64-bit platforms, the top of each stackframe is 16-byte 
aligned."

http://msdn.microsoft.com/en-us/library/ycsb6wwf.aspx
teaches "malloc is required to return memory on a 16-byte boundary."

AMD Athlon offers 128 bit memory operations (e.g. CMPXCHG16B). 
http://en.wikipedia.org/wiki/X86-64

AMD64 technology for simultaneous high-performance 32- and 64-bit computing 
with a 128-bit integrated DDR memory controller
http://www.amd.com/us-en/Corporate/VirtualPressRoom/0,,51_104_543_5730~82319,00.html

Hence 128-bit alignment makes some sense.

Best regards

Xypron

-------- Original-Nachricht --------
> Datum: Thu, 28 Aug 2008 18:03:36 +0400
> Betreff: Re: [Help-glpk] Makefiles for 64 bit Windows

> > I had to patch glplib.h with
> > #define align_boundary 16
> 
> It is unclear to me why 8-byte alignment in 64-bit environment leads
> to addressing error on some platforms. It would be clear if some 16 byte
> long data types were used, like long long int; however, in glpk there
> are used only char, short, int, double, and (void *) basic data types,
> for which 8-byte alignment is sufficient in both 32-bit and 64-bit
> environments.
> 
> In particular, the AMD documentation (Chapter 3 "General Purpose
> Programming") says:
> 
> "Stack Alignment. Control-transfer performance can degrade significantly
> when the stack pointer is not aligned properly. Stack pointers should be
> word aligned in 16-bit segments, doubleword aligned in 32-bit segments,
> and quadword aligned in 64-bit mode."
> 
> i.e. 8-byte (quadword) alignment seems to be sufficient.

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/address@hidden




reply via email to

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