- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am experiencing some curious behavior when trying to allocate a 4 dimensional array. it happens on a snow leopard core 2 duo MBP with a 64 byte kernel, with the latest ifort (11.1 088) with an evaluation license.
(on a leopard with 32bit kernel and an older version of ifort, I did not manage to reproduce the problem)
I manage to reproduce the problem with the following simplistic program:
if I compile it with the -g flag only, everything is fine and I get my answer
However, if I use any optimization level whatsoever, the execution failed when trying to access any t(:,:,:,2) (I get an abort trap message).
the value of the dimensions pi, pj, pk does not seem to matter, as long as they are >= 2
If the array t is only 3 dimensional (or pl=1), everything is fine, for both -g and -On flags
any idea ?
thanks,
Arthur
I am experiencing some curious behavior when trying to allocate a 4 dimensional array. it happens on a snow leopard core 2 duo MBP with a 64 byte kernel, with the latest ifort (11.1 088) with an evaluation license.
(on a leopard with 32bit kernel and an older version of ifort, I did not manage to reproduce the problem)
I manage to reproduce the problem with the following simplistic program:
[bash]PROGRAM boulishgu IMPLICIT NONE REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: t INTEGER :: ierr INTEGER :: i, j, k, l INTEGER, PARAMETER :: pi = 2, pj = 2, pk = 2, pl = 2 ALLOCATE (t (pi, pj, pk, pl), STAT=ierr) PRINT*,'t allocated', ierr DO l = 1, pl DO k = 1, pk DO j = 1, pj DO i= 1, pi PRINT*, i, j, k, l t(i, j, k, l) = 2.*i PRINT*, t(i, j, k, l) END DO END DO END DO END DO PRINT*,'sum t',SUM(t) DEALLOCATE(t) END PROGRAM boulishgu[/bash]
if I compile it with the -g flag only, everything is fine and I get my answer
However, if I use any optimization level whatsoever, the execution failed when trying to access any t(:,:,:,2) (I get an abort trap message).
the value of the dimensions pi, pj, pk does not seem to matter, as long as they are >= 2
If the array t is only 3 dimensional (or pl=1), everything is fine, for both -g and -On flags
any idea ?
thanks,
Arthur
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it is the Xcode 3.2.2 problem. Runs fine for 11.1.088 under Xcode 3.2.1. Aborts for 11.1.088 under Xcode 3.2.2
ron
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much, that was the problem indeed.
Sorry I missed the fact that I was using Xcode 3.2.2
Sorry I missed the fact that I was using Xcode 3.2.2

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