Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28457 Discussions

Fortran90 with coarray does not work with Intel 12.1

jianni
Beginner
222 Views

We are having problems trying to get a small Fortran 90/coarray program shown below to run under Intel 12.1 with intelmpi-4.0.3 on a 64-bit SGI-ICE system (Intel Xenons) running under PBS.

The compilation line for the small test program is also shown below. The small program runs fine on a Cray XT6 with PGI Fortran compilers.

There are two if statements down near the bottom of the program, the first one works, but the second one

causes a segmentation fault with Intel 12.1. We do have unlimit in the script and $HOME/.csrhc.

Do you know what could be going wrong? Does ifort12.1 not support coarray pointers?

Compilation line:

========================

mpif90 -O0 -no-opt-prefetch -coarray=distributed -fpe0 -g -check all -traceback -o test test.o

Program:

==========

program test

type p2a

integer, pointer :: a

end type p2a

integer , allocatable :: a[:]

type (p2a), allocatable :: p[:]

integer , target :: ta

integer :: ipr,npr,b,c

ipr=this_image()

npr=num_images()

allocate(a

  • )
  • allocate(p

  • )
  • p%a => ta

    a =ipr

    ta =ipr

    b =-1

    c =-1

    sync all

    if (ipr.lt.npr) b=a[ipr+1]

    if (ipr.lt.npr) c=p[ipr+1]%a ! works on cray, but seg-faults with Intel 12.1

    print*,'%test, ',ipr,a,b,c

    stop

    end

    ------------

    Thanks.

    -James

    0 Kudos
    3 Replies
    Steven_L_Intel1
    Employee
    222 Views
    One of the things known not to work as listed in the release notes is:

    Accessing another images value of an ALLOCATABLE or POINTER component of a
    derived-type coarray

    which is what you are doing here. This will be fixed in a future release.
    0 Kudos
    jimdempseyatthecove
    Honored Contributor III
    222 Views
    >>Accessing another images value of an ALLOCATABLE or POINTER component of a
    derived-type coarray

    Potentially this could require a new POINTER type (attribute)

    IOW not only would you have a pointer assigned and manipulated in/by the image containing the data...

    but potentially a cross image pointer that points to data in any arbitrary image...

    As to if this is to be...?

    Jim Dempsey
    0 Kudos
    Steven_L_Intel1
    Employee
    222 Views
    There was a proposal to add "copointers" to the language, which would be able to access data on arbitrary images, but the standards committee declined to include that in the upcoming work on coarray additions. In the case here, the pointer is local to the target image. We need to add some infrastructure to fully support it. Some cases work today, more will work in the next major version but to get all the cases right will take a bit longer.
    0 Kudos
    Reply