Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
26867 Discussions

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

Hugues__Maxime
Beginner
134 Views

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
Steven_L_Intel1
Employee
134 Views

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.

Hugues__Maxime
Beginner
134 Views

Hello Steve,

 

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

 

Thank you

Steven_L_Intel1
Employee
134 Views

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

Hugues__Maxime
Beginner
134 Views

Hello,

 

Any update on this issue ?

 

Thank you very much

Kevin_D_Intel
Employee
134 Views

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.

jimdempseyatthecove
Black Belt
134 Views

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

Kevin_D_Intel
Employee
134 Views

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.

Reply