For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > July 2005 > Re: SIGILL on running exp() with f90 compiled code









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: SIGILL on running exp() with f90 compiled code
glen herrmannsfeldt

2005-07-24, 8:53 pm

Bryan.Berns@gmail.com wrote:
> This is an old topic, but since you actually took the time to notice
> the discrepancy, maybe you'll have some input:


> Yes, -r8 mathematically implies:
> xtypemap=real:64,double:128,i_nteger:32.


> But allocation wise it implies:
> xtypemap=real:64,double:128,i_nteger:64[
/color]

Yes, Fortran tends to require that the default INTEGER and default REAL
have the same size as far as allocation. You will quickly notice if
you EQUIVALENCE between REAL and INTEGER arrays.
[color=darkred]
> And that is pretty much my dillema. There are alot of variable in
> common that depend on allocations being 8 bytes wide. I thought
> -aligncommon=8 would fix that but I'm thinking that it will only 8-byte
> align if I have an uneven boundary (like 32 + 16 + 32 + 32 would even
> up being allocated as 64 [32 + 16] + 64 [32 + 32].


The alignment, however it is done, should be consistent as long as all
routines are compiled with the same options. x86 processors don't
require alignment but often are faster with aligned data. The
tradition of COMMON was that no alignment padding was allowed. The best
way to help with alignment is to put all variables with more strict
alignment requirements before those with less strict requirements.

> I know there was xtypemap=integer:mixed but I have no idea what that
> does and it's be obseleted in the latest compiler.


I don't know what it would do, either, but it doesn't sound good
in any case.

-- glen

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com