- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
While working with the contiguous attribute, I got into this:
integer, allocatable, target :: a(:) integer, pointer, contiguous :: b(:) allocate(a(5)) a = 0 b => a ! No problem here b => a(1:3) ! No problem here b => a(:3) ! Error associate(x => a(:3)) b => x ! No problem here either end associate
Ifort's error says I'm associating a contiguous pointer to a non contiguous target in the third case. I think in all the cases the target is simply contiguous. Therefore, its a bug to throw an error only in the third case. Am I in the correct?
(I am using Intel Compiler 18 update 2 for windows, environment initialized for x64.)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any update on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suggest that you report this at https://supporttickets.intel.com/?lang=en-US Issues reported here may get overlooked by Intel support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just reported as you suggested. Thank you for the attention.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
has this issue already been addressed by the developers? (Sorry, I do not know how to check the status of the ticket.)
I am having a very similar problem in two cases with the false error message
"A pointer with the contiguous attributes is being made to a non-contiguous target"
after compilation with "-check all" with two compiler versions (18.0.2 20180210 and 19.0.0.117 20180804).
In the first case the target is an automatic array on the stack:
complex(real64), target :: hmtpw(2,(maxlcut+1)**2,maxval(neq))
complex(real64), pointer :: hmtpw_p(:,:)
hmtpw_p => hmtpw(:,:lm2)
The parameters "maxlcut" and "neq(:)" are taken from a module. The variable lm2 is calculated at runtime.
In the other case the target is another pointer included from a module with the CONTIGUOUS attribute:
complex(real64), pointer, contiguous :: cpw(:,:,:,:) ! in the module (it is allocated as shared MPI3 memory)
complex(real64), pointer, contiguous :: vec(:) ! in the respective subroutine
vec => cpw(:n1,n2,n3,n4)
I think in both cases the target is contiguous, and Ifort should not complain.
Thank you.
Best regards
Christoph
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Christoph F. wrote:.. has this issue already been addressed by the developers? (Sorry, I do not know how to check the status of the ticket.) ..
I think in both cases the target is contiguous, and Ifort should not complain. ..
@Christoph,
Is it possible for you to try out the recently released Update 3 of Intel Fortran 19.0 compiler version and check for yourself? Per this thread, it appears Intel Fortran team has included fixes on some related matters at least:
For any unresolved issues, your best option will be to submit support requests at Intel Online Support Center (OSC) using your own reproducer cases: https://supporttickets.intel.com/?lang=en-US
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello FortranFan,
thank you very much for your quick reply.
Unfortunately, the latest version we have is 19.0.0.117 20180804. As soon as I can get my hands on Update 3, I will check it.
My question would be: Am I correct in assuming that in both described cases (target in stack memory and target as contiguous pointer array in a module) the target is, in fact, contiguous, and the compiler is wrong in giving this error message? Just to make sure that the code is correct.
With best regards
Christoph
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
! contiguous.f90 program contiguous implicit none integer, allocatable, target :: a(:) integer, pointer, contiguous :: b(:) allocate(a(5)) a = 0 b => a ! No problem here b => a(1:3) ! No problem here b => a(:3) ! Error associate(x => a(:3)) b => x ! No problem here either end associate print *, b end program contiguous Win32 Debug 1>------ Build started: Project: contiguous, Configuration: Debug Win32 ------ 1>Compiling with Intel(R) Visual Fortran Compiler 19.0.1.144 [IA-32]... 1>contiguous.f90 1>Linking... 1>Embedding manifest... 1> 1>Build log written to "file://c:\test\contiguous\contiguous\Debug\BuildLog.htm" 1>contiguous - 0 error(s), 0 warning(s) ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== x64 Debug 1>------ Build started: Project: contiguous, Configuration: Debug x64 ------ 1>Compiling with Intel(R) Visual Fortran Compiler 19.0.1.144 [Intel(R) 64]... 1>contiguous.f90 1>Linking... 1>Embedding manifest... 1> 1>Build log written to "file://c:\test\contiguous\contiguous\x64\Debug\BuildLog.htm" 1>contiguous - 0 error(s), 0 warning(s) ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== x64 Release 1>------ Build started: Project: contiguous, Configuration: Release x64 ------ 1>Compiling with Intel(R) Visual Fortran Compiler 19.0.1.144 [Intel(R) 64]... 1>contiguous.f90 1>Linking... 1>Embedding manifest... 1> 1>Build log written to "file://c:\test\contiguous\contiguous\x64\Release\BuildLog.htm" 1>contiguous - 0 error(s), 0 warning(s) ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== x64 Release and Run 0 0 0 Press any key to continue . . .
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
subroutine sub(m,n) implicit none integer, intent(in) :: m,n real, target :: array(2,m**2,n) real, pointer, contiguous :: point(:,:) nullify(point) point => array (:,:,1) end
ifort -check all -c -o sub.o sub.f
sub.f(7): error #5558: A pointer with the CONTIGUOUS attributes is being made to a non-contiguous target
point => array (:,:,1)
------^
compilation aborted for sub.f (code 1)
ifort --version
ifort (IFORT) 19.0.3.199 20190206
Copyright (C) 1985-2019 Intel Corporation. All rights reserved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Christoph F. wrote:
.. sub.f(7): error #5558: A pointer with the CONTIGUOUS attributes is being made to a non-contiguous target
point => array (:,:,1)
------^
compilation aborted for sub.f (code 1)ifort --version
ifort (IFORT) 19.0.3.199 20190206 ..
@Christoph F.,
At first glance, the code looks conforming; the target is "simply contiguous" if I'm not mistaken. But I suggest you try to get Intel Fortran team to look at this by submitting a support request with this reproducer: https://supporttickets.intel.com/?lang=en-US
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi FortranFan,
thank you, I just submitted a support ticket.
Slightly changing the code (only two array dimensions or using m instead of m**2 as upper boundary) make the error go away. So, it is most certainly a compiler error.
Best
Christoph
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page