Home > Archive > Fortran > May 2005 > remove warnings
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]
|
|
| Fortran coder 2005-05-25, 8:57 am |
| i try to remove warnings from a program running on tru64:
f90: Warning: routines.f, line 38: Because of COMMON, the alignment of
object is inconsistent with its type [PASHBETA_LAMBDA0]
real*8 BrGamma_lambda0(10),Pashbeta_lambda0(10)
how can i handle this one ?
any help greatly appreciated
| |
| David Flower 2005-05-25, 8:57 am |
| What is happening is that your system is optimised when REAL*8
variables are at an address with a multiple of 8 (possibly 4).
For example, you might have
INTEGER*2 I2
REAL*8 R8
COMMON / SENSE / I2
COMMON / SENSE / R8
The solution is either:
Reverse the order of the two COMMON statements:
COMMON / SENSE / R8
COMMON / SENSE / I2
or:
Insert a dummy variable:
INTEGER*2 JUNK(3)
COMMON / SENSE / I2
COMMON / SENSE / JUNK
COMMON / SENSE / R8
Hope this helps
| |
| Steve Lionel 2005-05-25, 3:58 pm |
| On Wed, 25 May 2005 12:07:50 +0200, Fortran coder <fortran@none.com> wrote:
>i try to remove warnings from a program running on tru64:
>
>f90: Warning: routines.f, line 38: Because of COMMON, the alignment of
>object is inconsistent with its type [PASHBETA_LAMBDA0]
> real*8 BrGamma_lambda0(10),Pashbeta_lambda0(10)
>
>how can i handle this one ?
If you don't want to change the code, compile it with -warn noalign, but the
warning is there to let you know that performance will suffer due to
misaligned data.
See the section of the Compaq Fortran User's Guide on optimization, data
alignment for more detail.
Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH
User communities for Intel Software Development Products
http://softwareforums.intel.com/
Intel Fortran Support
http://developer.intel.com/software/products/support/
| |
| Damien MATTEI 2005-05-25, 3:58 pm |
| David Flower wrote:
> What is happening is that your system is optimised when REAL*8
> variables are at an address with a multiple of 8 (possibly 4).
>
> For example, you might have
>
> INTEGER*2 I2
> REAL*8 R8
> COMMON / SENSE / I2
> COMMON / SENSE / R8
>
> The solution is either:
>
> Reverse the order of the two COMMON statements:
> COMMON / SENSE / R8
> COMMON / SENSE / I2
>
> or:
>
> Insert a dummy variable:
> INTEGER*2 JUNK(3)
> COMMON / SENSE / I2
> COMMON / SENSE / JUNK
> COMMON / SENSE / R8
>
> Hope this helps
>
thank you,
it corrects the problem, just by pushing the integer declaration at the
end of COMMON statement.
Damien
--
email: Damien (dot) Mattei (AT) obs*azur (dot) fr
and replace * with -
| |
| Damien MATTEI 2005-05-25, 3:58 pm |
| David Flower wrote:
> What is happening is that your system is optimised when REAL*8
> variables are at an address with a multiple of 8 (possibly 4).
>
> For example, you might have
>
> INTEGER*2 I2
> REAL*8 R8
> COMMON / SENSE / I2
> COMMON / SENSE / R8
>
> The solution is either:
>
> Reverse the order of the two COMMON statements:
> COMMON / SENSE / R8
> COMMON / SENSE / I2
>
> or:
>
> Insert a dummy variable:
> INTEGER*2 JUNK(3)
> COMMON / SENSE / I2
> COMMON / SENSE / JUNK
> COMMON / SENSE / R8
>
> Hope this helps
>
thank you,
it corrects the problem, just by pushing the integer declaration at the
end of COMMON statement.
Damien
--
email: Damien (dot) Mattei (AT) obs*azur (dot) fr
and replace * with -
|
|
|
|
|