ifort 14 - sourced allocation for coarrays?

ifort 14 - sourced allocation for coarrays?

1 integer, allocatable :: a(:,:)[:], b(:,:)[:], c(:,:)[:] 2 3 allocate (a(10,10)[*], source=0) 4 5 a = 0 6 if (this_image() .eq. 1) a=1 7 8 sync all 9 10 allocate (b(0:11,3)[*], source=0) 11 !allocate (c(0:11,3)[*], source=b) 12 allocate (c[*], source=b) 13 14 b(1:10,1:3) = a(1:10,1:3) [1] 15 c(1:10,1:3) = a(1:10,4:6) [1] 16 17 sync all 18 19 if ( this_image() .gt. 1) b(0,:) = c(10,:) [this_image()-1] 20 21 end $ export FOR_COARRAY_NUM_IMAGES=2 $ ./a.out forrtl: severe (174): SIGSEGV, segmentation fault occurred In coarray image 2 Image PC Routine Line Source a.out 000000000046B199 Unknown Unknown Unknown a.out 0000000000469B10 Unknown Unknown Unknown a.out 00000000004392E2 Unknown Unknown Unknown a.out 000000000041F813 Unknown Unknown Unknown a.out 000000000040730B Unknown Unknown Unknown libpthread.so.0 00002AAAAB1B7500 Unknown Unknown Unknown libicaf.so 00002AAAAACD026D Unknown Unknown Unknown a.out 0000000000406866 Unknown Unknown Unknown a.out 00000000004038C6 Unknown Unknown Unknown libc.so.6 00002AAAAB3E4CDD Unknown Unknown Unknown a.out 00000000004037B9 Unknown Unknown Unknown application called MPI_Abort(comm=0x84000000, 3) - process 1 rank 1 in job 1 newblue4_56034 caused collective abort of all ranks exit status of rank 1: return code 3 $ However, if I comment out line 12 and uncomment line 11, like this: 11 allocate (c(0:11,3)[*], source=b) 12 !allocate (c[*], source=b) then the program runs to competion. Am I doing something wrong? My envoronment: $ ifort --version ifort (IFORT) 14.0.0 20130728 Copyright (C) 1985-2013 Intel Corporation. All rights reserved. $ echo $LD_LIBRARY_PATH /cm/shared/apps/intel-cluster-studio/impi/4.1.0.024/intel64/lib:/cm/shared/languages/Intel-Compiler-XE-14/composer_xe_2013_sp1.0.080/compiler/lib/intel64:/cm/shared/languages/Intel-Compiler-XE-14/composer_xe_2013_sp1.0.080/mpirt/lib/intel64:/cm/shared/languages/Intel-Compiler-XE-14/composer_xe_2013_sp1.0.080/ipp/../compiler/lib/intel64:/cm/shared/languages/Intel-Compiler-XE-14/composer_xe_2013_sp1.0.080/ipp/lib/intel64:/cm/shared/languages/Intel-Compiler-XE-14/composer_xe_2013_sp1.0.080/compiler/lib/intel64:/cm/shared/languages/Intel-Compiler-XE-14/composer_xe_2013_sp1.0.080/mkl/lib/intel64:/cm/shared/languages/Intel-Compiler-XE-14/composer_xe_2013_sp1.0.080/tbb/lib/intel64/gcc4.4:/cm/shared/apps/torque/4.2.4.1/lib:/cm/shared/apps/moab/7.2.2/lib:/cm/shared/tools/subversion-1.8.4/lib:/cm/shared/languages/Intel-Compiler-XE-14/compiler/lib:/cm/shared/languages/Intel-Compiler-XE-14/compiler/lib/intel64:/cm/shared/languages/Intel-Compiler-XE-14/lib:/cm/shared/languages/Intel-Compiler-XE-14/lib/intel64:/cm/shared/apps/intel-cluster-studio/impi/4.1.0.024/intel64/lib:/cm/shared/apps/intel-cluster-studio/composer_xe_2013.1.117/compiler/lib:/cm/shared/apps/intel-cluster-studio/composer_xe_2013.1.117/compiler/lib/intel64:/cm/shared/apps/intel-cluster-studio/composer_xe_2013.1.117/lib:/cm/shared/apps/intel-cluster-studio/composer_xe_2013.1.117/lib/intel64 $ Many thanks Anton

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Answering my own question - I've forgotten
that if coarray syntax is used [], for a non-zero
rank coarray, then subscript syntax (), *must*
be used too, so

allocate (c[*], source=b)

is not a standard comliant code.
I think the compiler should've issued
an error at this point.

Anton

That's not true for ALLOCATE. I also note that Corrigendum 2 to F2008 splits constraint C633 so it now reads as follows:

C633 (R626) If an allocate-object is an array, either allocate-shape-spec-list shall appear in its allocation or source-expr shall appear in the ALLOCATE statement and have the same rank as the allocate-object.

C633a (R626) If allocate-object is scalar, allocate-shape-list shall not appear.

The syntax you have for the allocation of c is correct. I can reproduce the run-time error and will investigate. Issue ID is DPD200250387

Steve - Intel Developer Support

This has been fixed for the 15.0 release later this year.

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today