From: antonioparodi74 on
Hello,
I have faced yesterday the same problem with intel fortran compiler 9.0
for linux on AMD opteron.
In my case I have found that the following set of compilation flags
solves the problem

ifort -O0 -openmp-stubs -g -i_dynamic -mcmodel=large -traceback

I hope that it helps
ciao
Antonio
hyperion ha scritto:

> 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: Herman D. Knoble on
Antonio:
It could be that the Intel Fortran compiler you are using is the one
that produces only 32-bit code. Try running the Fortran program:
http://ftp.cac.psu.edu/pub/ger/fortran/hdk/dynmax.f90

Also from the Linux prompt issue the commands:
uname -a
free -m
cat /proc/meminfo


Skip Knoble

On 5 Jan 2007 07:06:13 -0800, "antonioparodi74(a)gmail.com" <antonioparodi74(a)gmail.com>
wrote:

-|Hello,
-|I have faced yesterday the same problem with intel fortran compiler 9.0
-|for linux on AMD opteron.
-|In my case I have found that the following set of compilation flags
-|solves the problem
-|
-|ifort -O0 -openmp-stubs -g -i_dynamic -mcmodel=large -traceback
-|
-|I hope that it helps
-|ciao
-|Antonio
-|hyperion ha scritto:
-|
-|> 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: Greg Lindahl on
In article <1168009573.109197.61580(a)38g2000cwa.googlegroups.com>,
antonioparodi74(a)gmail.com <antonioparodi74(a)gmail.com> wrote:

>ifort -O0 -openmp-stubs -g -i_dynamic -mcmodel=large -traceback

It's unlikely that -mcmodel=large does what you think.

-- greg

From: Dr Ivan D. Reid on
On Thu, 4 Jan 2007 05:56:25 +0100, Johan <johan(a)notused.invalid>
wrote in <20070104055625.265e7c8e(a)reken.site>:
> 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?

Do "man ifort" and study the section for -mcmodel. This worked for me
(fixing your programming bug; you should give your parameters meaningful
names):

[server01] /home/ireid/fortran/test > ifort -mcmodel medium -i-dynamic testmem.f
[server01] /home/ireid/fortran/test > time ./a.out
3.9208680E-07
0.5787879
0.8773652
0.8227354
6.5464117E-02
0.5353985
0.1802051
0.4692169
0.3228490
0.5762066

real 0m56.015s
user 0m17.281s
sys 0m3.947s
[server01] /home/ireid/fortran/test > uname -a
Linux server01 2.6.9-42.0.3.EL.cernsmp #1 SMP Fri Oct 6 11:52:32 CEST 2006
x86_64 x86_64 x86_64 GNU/Linux
[server01] /home/ireid/fortran/test > ifort -V
Intel(R) Fortran Compiler for Intel(R) EM64T-based applications, Version 9.1
Build 20061101 Package ID: l_fc_c_9.1.040
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY

> 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)
C ^^^^^^ !Ahem!
> 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..)

--
Ivan Reid, School of Engineering & Design, _____________ CMS Collaboration,
Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN
KotPT -- "for stupidity above and beyond the call of duty".
From: golu on
Hi hyperion ,
I wonder if you are facing the same problem that
I did.
I was able to solve my problem by linking to the correct libdl library
which was /lib64/libdl-2.3.2.so
in my case on a similar opteron cluster. I was able to compile your
code and get some output

[bthakur(a)lowdin tmp_test]$ locate libdl| grep 64
/export/usr/lib64/libdl_p.a
/export/usr/lib64/libdl.a
/lib64/libdl-2.3.2.so
/lib64/libdl.so.2
[bthakur(a)lowdin tmp_test]$ ifort -traceback -check all -g -i-dynamic
-ldl-2.3.2 tst.f90
[bthakur(a)lowdin tmp_test]$ ./a.out
0.5345634
0.5345634
0.5345634
0.5345634
0.5345634
0.5345634
0.5345634
0.5345634
0.5345634
0.5345634
[bthakur(a)lowdin tmp_test]$

Hope it helps you,
Regards,
Bhupender