Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1 View

Intel 16: 1D pointer to 3D array is not simply contiguous

Hello,

 

I am facing an issue with Intel 16.0.3.210.

The issue is that when we want to have 1D pointer to a 3D array that is contained into a type, the compiler is reporting that the data target must be simply contiguous or of rank one.

However, when the array is not contain into a type, it does work. The issue is also not present in Intel 15.x or 14.x series.

Any ideas ?

Thank you

 

program test

  implicit none


 type :: t_con
 real, allocatable :: array(:,:,:)
 end type

 integer, parameter :: N=30
 real, allocatable, target :: a(:,:,:)
 real, pointer :: p(:)
 real, pointer :: p1(:)
 type(t_con), target  :: t_a


 allocate(a(N,N,N))
 allocate(t_a%array(N,N,N))

 a=0.0
 t_a%array = 0.0

 p(1:30) => a(:,:,3)

 p(2) = 500.0

 print *, p(2), a(2,1,3)


 p1(1:30) => t_a%array(:,:,3)

 p1(2) = 200.0
 print *, p1(2), t_a%array(2,1,3)

 nullify(p)
 deallocate(a)
 deallocate(t_a%array)



end program test

 

0 Kudos
7 Replies
Highlighted
1 View

It's a bug we introduced - we

It's a bug we introduced - we apologize for the inconvenience. I have escalated this to development as issue DPD200414795 and will let you know here of its progress.

Retired 12/31/2016
0 Kudos
Highlighted
Beginner
1 View

Hello Steve,

Hello Steve,

 

Do you have any update or ETA to fix this bug ?

 

Thank you

0 Kudos
Highlighted
1 View

Sorry, not yet. It has been

Sorry, not yet. It has been assigned to a developer.

Retired 12/31/2016
0 Kudos
Highlighted
Beginner
1 View

Hello,

Hello,

 

Any update on this issue ?

 

Thank you very much

0 Kudos
Highlighted
Employee
1 View

Sorry, there is no update

Sorry, there is no update from Development regarding this defect. The internal issue Steve submitted to Development was updated this week with a urgent status inquiry to the Developer that was received through the Intel Premier support issue filed on this defect (It appears that was submitted by a colleague of yours). I'll share any update we receive from the Developer within this forum thread.

0 Kudos
Highlighted
1 View

p(1:30) => a(:,:,3)

p(1:30) => a(:,:,3)

The LHS expresses a 30 element array (via pointer), the RHS expresses a 30*30 (900) element array slice. Is this valid?

It might be more clear (to the compiler) with

p(1:30) => a(:,J,3)
  or
p(1:30) => a(J,:,3)
 

Where J indicates the additional information as to how you wish to slice the data.

Jim Dempsey

0 Kudos
Highlighted
Employee
1 View

I just learned there is a fix

I just learned there is a fix for the issue that Development is targeting for a future 17.0 update. It is possible it will be in the next 17.0 Update 2 next month. I'll update this forum thread when I know more.

0 Kudos