Hi,
I'm having some problems getting allocatable arrays in my code to align correctly. The error message seems similar to that mentioned: https://software.intel.com/en-us/forums/topic/506377
My test code is as follows
program test_align implicit none integer :: cmax integer, dimension(:, :), allocatable :: map cmax = 10 allocate(map(-cmax:cmax,1:3)) call mytest_sub(map,cmax) deallocate(map) end program test_align subroutine mytest_sub(map,cmax) implicit none integer, intent(in) :: cmax integer, intent(in) :: map(-cmax:cmax,1:3) integer, dimension(-cmax:cmax,1:3):: mapinternal integer, dimension(-cmax:cmax) :: i !DIR$ ATTRIBUTES ALIGN: 64 :: i !DIR$ ATTRIBUTES ALIGN: 64 :: map !DIR$ ATTRIBUTES ALIGN: 64 :: mapinternal !DIR$ ASSUME_ALIGNED i:64 end subroutine mytest_sub
When I compile this I get the following error:
ifort -O2 test_align.f90 -vec-report=6 test_align.f90(23): error #6406: Conflicting attributes or multiple declaration of name. [MAP] !DIR$ ATTRIBUTES ALIGN: 64 :: map ------------------------------^ compilation aborted for test_align.f90 (code 1)
Any ideas as to what the problem is here or indeed if there's any work around in the pipeline. Whilst I can clearly just take a copy of the map and make that local to the subroutine and align that array I'd like to avoid having to create lots of temporary arrays.
Many thanks.
Fiona