For Programmers: Free Programming Magazines  


Home > Archive > Fortran > March 2004 > newbie question about linking ?









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 newbie question about linking ?
Paula

2004-03-27, 12:18 am

Hi, what does it mean the message:

common/convol/ FILEFLUX,flcv,TITC,LAMBD,L0,LF,CONVOL,FL
AM,NORM,
^
Initial padding for common block `convol' is 2 bytes at (^) --
consider reordering members, largest-type-size first

???

Compiler is g77, system is Red Hat9.

Thanks,
Paula
Arjen Markus

2004-03-27, 12:18 am

Paula wrote:
>
> Hi, what does it mean the message:
>
> common/convol/ FILEFLUX,flcv,TITC,LAMBD,L0,LF,CONVOL,FL
AM,NORM,
> ^
> Initial padding for common block `convol' is 2 bytes at (^) --
> consider reordering members, largest-type-size first
>
> ???
>
> Compiler is g77, system is Red Hat9.
>
> Thanks,
> Paula


This has to do with the size (in bytes) of the items:
Many computers can more efficiently access data at proper
"alignment" boundaries in memory. For real variables that is a
multiple of 4, in many cases. For character data, there is
usually a multiple of 1.

So:

character*1 C
real R
common /convol/c,r

or:
common /comvol/r,c

make a difference in accessibility (note the ordering!).

That, in a nutshell, is, AFAIU, the cause of the message

Regards,

Arjen
glen herrmannsfeldt

2004-03-27, 12:18 am

Arjen Markus wrote:
> Paula wrote:
> what does it mean the message:


^[color=darkred]
[color=darkred]
[color=darkred]
> This has to do with the size (in bytes) of the items:
> Many computers can more efficiently access data at proper
> "alignment" boundaries in memory.


Many computers, including some that RedHat runs on, will
refuse to do misaligned access. I believe Sparc and HPPA are two.

> For real variables that is a
> multiple of 4, in many cases. For character data, there is
> usually a multiple of 1.


Put variables in COMMON in decreasing size, so double
precision variables before single precision for example.


-- glen

Sponsored Links







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

Copyright 2008 codecomments.com