- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have an economics user that has an array containing 9 indices. This is supported in the 2008 standard (expands from 7 to 15). However, it does not want to compile under ifort 13. I would like to know when this feature might be supported and generally, if there is a published timeline of 2008 features with a rough guess when they are expected to appear. Many seem to already exist (like a CAF). Thank you.
Ray
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We already support 31 array dimensions, and have since the 12.1 compiler. Please show an example of what doesn't compile (actual, compilable source, please) and show the error message you get. Please also show the output of ifort -V
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the quick reply Steve,
I thought something was wrong because this just seemed too easy to implement. I have used a variety of file extensions and compiler args (like -std08). This works if I drop t down to 7 indices and loops. Here is a test code:
rsheppar@Quarry: /N/dc/projects/ray/test_array_indices> cat test_array.f08
program test
implicit none
integer :: i,j,k,l,m,n,p,r,t,u
integer, dimension(20, 20, 20, 20, 20, 20, 20, 20, 20) :: X
u = 1
Do i = 1, 20
do j = 1, 20
do k = 1, 20
do l = 1, 20
do m = 1, 20
do n = 1, 20
do p = 1, 20
do r = 1, 20
do t = 1, 20
X(i, j, k, l, m, n, p, r, t) = u
u = u + 1
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
print* "max value is ", X(20, 20, 20, 20, 20, 20, 20, 20, 20)
end program test
Here is the compiler info:
which ifort
/N/soft/common/intel/13.0/composer_xe_2013.0.079/bin/intel64/ifort
rsheppar@Quarry: /N/dc/projects/ray/test_array_indices> ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.0.0.079 Build 20120731
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
Here is are a few attempts:
rsheppar@Quarry: /N/dc/projects/ray/test_array_indices> ifort -o test_array test_array.f08
ipo: warning #11010: file format not recognized for test_array.f08
ld:test_array.f08: file format not recognized; treating as linker script
ld:test_array.f08:1: syntax error
rsheppar@Quarry: /N/dc/projects/ray/test_array_indices> ifort -o test_array test_array.f03
ipo: warning #11010: file format not recognized for test_array.f03
ld:test_array.f03: file format not recognized; treating as linker script
ld:test_array.f03:1: syntax error
rsheppar@Quarry: /N/dc/projects/ray/test_array_indices> ifort -std08 -o test_array test_array.f08
ipo: warning #11010: file format not recognized for test_array.f08
ld:test_array.f08: file format not recognized; treating as linker script
ld:test_array.f08:1: syntax error
Do you see what I might be missing? Thanks.
Ray
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes - you are misusing the file type. Use .f90 to indicate free-form source. That's all it means. Intel Fortran does not recognize .f03 and .f08 as Fortran source file types.
You are also missing a comma after the "print" keyword and you will need to use the switch -mcmodel medium to compile this. To run it you'll need a LOT of memory. You may want to consider making the array allocatable instead of static. I hope this is not representative of a real program you are running.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I apologize. I almost wrote back about the comma typo. I have a bunch of similar versions of this toy program and I cleaned up the wrong lines before I cat'ed it. Unfortunately, this fellow is an economics prof and this is representative of his real problem. He eats quite a bit more memory than this because he uses multiples of arrays and then does simple operations with each cell representing a specific object (which is common to all the arrays). That is a battle yet to fight. For this try, I reduced the sizes to 10, and renamed the file. I am now getting something completely different. I vaguely remember the mcmodel? switch. Could that help this? Thanks again.
Ray
rsheppar@Quarry: /N/dc/projects/ray/test_array_indices> ifort -std08 -o test_array test_array.f90
/N/soft/common/intel/13.0/composer_xe_2013.0.079/compiler/lib/intel64/libifcore.a(for_init.o)(.text+0xca): In function `for__signal_handler':
: relocation truncated to fit: R_X86_64_PC32 for__protect_handler_ops
/N/soft/common/intel/13.0/composer_xe_2013.0.079/compiler/lib/intel64/libifcore.a(for_init.o)(.text+0x11b): In function `for__signal_handler':
: relocation truncated to fit: R_X86_64_PC32 for__protect_handler_ops
/N/soft/common/intel/13.0/composer_xe_2013.0.079/compiler/lib/intel64/libifcore.a(for_init.o)(.text+0x133): In function `for__signal_handler':
: relocation truncated to fit: R_X86_64_PC32 for__l_excpt_info
/N/soft/common/intel/13.0/composer_xe_2013.0.079/compiler/lib/intel64/libifcore.a(for_init.o)(.text+0x14d): In function `for__signal_handler':
: relocation truncated to fit: R_X86_64_PC32 for__l_fpe_mask
/N/soft/common/intel/13.0/composer_xe_2013.0.079/compiler/lib/intel64/libifcore.a(for_init.o)(.text+0x380): In function `for__signal_handler':
: relocation truncated to fit: R_X86_64_PC32 for__l_excpt_info
/N/soft/common/intel/13.0/composer_xe_2013.0.079/compiler/lib/intel64/libifcore.a(for_init.o)(.text+0x3a6): In function `for__signal_handler':
: relocation truncated to fit: R_X86_64_PC32 for__l_excpt_info
/N/soft/common/intel/13.0/composer_xe_2013.0.079/compiler/lib/intel64/libifcore.a(for_init.o)(.text+0x3d4): In function `for__signal_handler':
: relocation truncated to fit: R_X86_64_PC32 for__l_undcnt
/N/soft/common/intel/13.0/composer_xe_2013.0.079/compiler/lib/intel64/libifcore.a(for_init.o)(.text+0x3db): In function `for__signal_handler':
: relocation truncated to fit: R_X86_64_PC32 for__l_excpt_info
/N/soft/common/intel/13.0/composer_xe_2013.0.079/compiler/lib/intel64/libifcore.a(for_init.o)(.text+0x3fc): In function `for__signal_handler':
: relocation truncated to fit: R_X86_64_PC32 for__l_excpt_info
/N/soft/common/intel/13.0/composer_xe_2013.0.079/compiler/lib/intel64/libifcore.a(for_init.o)(.text+0x456): In function `for__signal_handler':
: relocation truncated to fit: R_X86_64_PC32 for__l_excpt_info
/N/soft/common/intel/13.0/composer_xe_2013.0.079/compiler/lib/intel64/libifcore.a(for_init.o)(.text+0x477): In function `for__signal_handler':
: additional relocation overflows omitted from the output
rsheppar@Quarry: /N/dc/projects/ray/test_array_indices> cat test_array.f90
program test
implicit none
integer :: i,j,k,l,m,n,p,r,t,u
real :: X(10, 10, 10, 10, 10, 10, 10, 10, 10)
u = 1
Do i = 1, 10
do j = 1, 10
do k = 1, 10
do l = 1, 10
do m = 1, 10
do n = 1, 10
do p = 1, 10
do r = 1, 10
do t = 1, 10
X(i, j, k, l, m, n, p, r, t) = u
u = u + 1
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
print*, "max value is ", X(10, 10, 10, 10, 10, 10, 10, 10, 10)
end program test
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's why you need to add -mcmodel=medium. This allows the static storage data space to exceed 2GB. But I strongly recommend use of allocatable arrays for these large arrays rather than ordinary local variables.
Here's something I wrote earlier:
For 32-bit systems, the same limits generally apply as for Windows.
For 64-bit systems, it depends on which of the "-mcmodel" options you specify when you build:
-mcmodel=small - static code and data limited to 2GB. This is the default
-mcmodel=medium - static code is limited to 2GB but static data is unlimited
-mcmodel=large - no limits on size of static code or data
There are performance and code size penalties for the medium and large options.
Dynamically-allocated data on 64-bit systems has no inherent limit. As best as I can tell, there is also no fixed limit on stack size, though on Linux this is established with a default when the process is created and can be raised by a shell command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you did mention mcmodel. It slipped past me but registered enough to ask about it.. That fixed it. Thank you for your help. At the moment, I am going to just toss him into a deep memory node but you are absolutely correct. I need to rewrite his code for him. Memory is just the tip of the iceberg. At the moment, I am just trying to patch him up until after SC'12. Thanks again!
Ray
rsheppar@Quarry: /N/dc/projects/ray/test_array_indices> ifort -mcmodel=medium -o test_array test_array.f90
rsheppar@Quarry: /N/dc/projects/ray/test_array_indices> ./test_array
max value is 1.0000000E+09
![](/skins/images/BC9A7A3465121B56B278007F4EE8899F/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page