- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I try to compile the following program with ifort 12.1.3 20120212, I get
test_concurrent.f90(25): error #7617: This host associated object appears in a 'defining' context in a PURE procedure or in an internal procedure contained in a PURE procedure.
do concurrent(i=1:n)
------------------^
test_concurrent.f90(26): error #7617: This host associated object appears in a 'defining' context in a PURE procedure or in an internal procedure contained in a PURE procedure. [PROD]
prod%d(i) = x%d(i)*y%d(i)
-------^
compilation aborted for test.f90 (code 1)
I can't see what I'm doing wrong, thanks for any suggestion!
Loris
[fortran]module test_type implicit none type :: t1 real ,allocatable :: d(:) end type t1 interface operator(*) module procedure t1_times_t1 end interface private t1_times_t1 contains elemental function t1_times_t1(x,y) result(prod) type(t1) ,intent(in) :: x,y type(t1) :: prod integer :: i,n n = size(x%d) allocate(prod%d(n)) do concurrent(i=1:n) prod%d(i) = x%d(i)*y%d(i) end do end function t1_times_t1 end module test_type program test use test_type implicit none integer ,parameter :: ns = 16, np = 12*ns**2 type(t1) :: x,y,z allocate(x%d(np),y%d(np)) x%d = 2. y%d = 0.5 z = x*y print*,sum(z%d)/np end program test [/fortran]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you for sending this to us.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page