From: hyperion on
Hi!

I've got a very intriguing problem with my Fortran programs once I
enlarge the array sizes so that in total the program's need of RAM
exceeds 2 GB.

There the compiler just sends me errors with something like "relocation
truncation errors".

Well, so I tried the option -i-dynamic for the ifort compiler, and the
compilation works, but the program doesn't give the correct results,
which might be due to some automatic truncation during the calculation
process. Anyway, it should definitly work without linking the libs
dynamicallly, right?

I've got 4 GB RAM, so in fact it should be no problem to aquire
slightly more than 2GB, but it seems to be one indeed.

This problem really freaks me out, can anybody help me with this task?

Thanks in advance,

Hyperion

From: Jim on

"hyperion" <ronny.thomale(a)t-online.de> wrote in message
news:1167849010.864012.15860(a)a3g2000cwd.googlegroups.com...
> Hi!
>
> I've got a very intriguing problem with my Fortran programs once I
> enlarge the array sizes so that in total the program's need of RAM
> exceeds 2 GB.
>
> There the compiler just sends me errors with something like "relocation
> truncation errors".
>
> Well, so I tried the option -i-dynamic for the ifort compiler, and the
> compilation works, but the program doesn't give the correct results,
> which might be due to some automatic truncation during the calculation
> process. Anyway, it should definitly work without linking the libs
> dynamicallly, right?
>
> I've got 4 GB RAM, so in fact it should be no problem to aquire
> slightly more than 2GB, but it seems to be one indeed.
>
> This problem really freaks me out, can anybody help me with this task?
>
> Thanks in advance,
>
> Hyperion
>
Windows (and many others) normally restricts the amount of virtual memory
that any program can use to 2GB. With a special switch, Windows can use up
to 3GB. Regardless of how much RAM your system has, you cannot use more
than the first or second limits.

Programs which need more memory than that should consider a 64bit operating
system on a 64bit computer. Alternatively, some programs employ very large
scratch files so as to keep in memory only that part of the data which is
currently active (i.e. they do their own memory management).

Jim


From: Steve Lionel on
hyperion wrote:

> I've got a very intriguing problem with my Fortran programs once I
> enlarge the array sizes so that in total the program's need of RAM
> exceeds 2 GB.
>
> I've got 4 GB RAM, so in fact it should be no problem to aquire
> slightly more than 2GB, but it seems to be one indeed.

Are you running a 32-bit Linux? If so, 2GB is the maximum no matter
how much RAM you have. You would need an "x86_64" system (Intel 64 or
AMD64-capable CPU plus x86_64 version of Linux) to get more virtual
memory. You would also need to build with -mcmodel medium. See the
ifort release notes for more details.


Steve Lionel
Developer 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/
My Fortran blog
http://www.intel.com/software/drfortran

From: Greg Lindahl on
"hyperion" <ronny.thomale(a)t-online.de> wrote in message
news:1167849010.864012.15860(a)a3g2000cwd.googlegroups.com...
> Hi!
>
> I've got a very intriguing problem with my Fortran programs once I
> enlarge the array sizes so that in total the program's need of RAM
> exceeds 2 GB.
>
> There the compiler just sends me errors with something like "relocation
> truncation errors".

Check out the -mcmodel=medium flag.

-- g
From: Johan on
On 3 Jan 2007 11:18:05 -0800
"Steve Lionel" <steve.lionel(a)intel.com> wrote:

> Are you running a 32-bit Linux? If so, 2GB is the maximum no matter
> how much RAM you have. You would need an "x86_64" system (Intel 64 or
> AMD64-capable CPU plus x86_64 version of Linux) to get more virtual
> memory. You would also need to build with -mcmodel medium. See the
> ifort release notes for more details.

Can you tell wat I am doing wrong?

cat tst.f
program tst

implicit none
integer, parameter :: i = 900
integer :: j
real :: a(i,i,i)

call random_number(a)

do j = 1, 10
write(*,*) a(i,i,i)
end do

end program

uname -a
Linux reken 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006
x86_64 x86_64 x86_64 GNU/Linux

ifort -V
Intel(R) Fortran Compiler for Intel(R) EM64T-based applications,
Version 9.1 Build 20060925 Package ID: l_fc_c_9.1.039 Copyright (C)
1985-2006 Intel Corporation. All rights reserved. FOR NON-COMMERCIAL
USE ONLY

Without -mcmodel medium:
ifort tst.f
/opt/intel/fce/9.1.039/lib/libifcore.a(for_init.o): In function
`for__signal_handler': for_init.c:(.text+0xb): relocation truncated to
fit: R_X86_64_PC32 against symbol `for__l_excpt_info' defined in COMMON
section in /opt/intel/fce/9.1.039/lib/libifcore.a(for_init.o)
(..skiped more messages..)

But with -mcmodel medium

ifort -mcmodel medium tst.f
/opt/intel/fce/9.1.039/lib/libifcore.a(for_init.o): In function
`for__signal_handler': for_init.c:(.text+0xb): relocation truncated to
fit: R_X86_64_PC32 against symbol `for__l_excpt_info' defined in COMMON
section in /opt/intel/fce/9.1.039/lib/libifcore.a(for_init.o)
(..skiped more messages..)

Johan