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

Coarrays ATOMIC_REF: unexpected "forrtl: severe (157): Program Exception - access violation" error with a COINDEXED OBJECT

FortranFan
Honored Contributor II
393 Views

Fyi on an incident submitted at the Intel OSC:

   use, intrinsic :: iso_fortran_env, only : AI => atomic_int_kind

   type :: t
      integer(kind=AI) :: i
   end type

   integer(kind=AI) :: vali
   type(t), save :: foo
  • call atomic_define( atom=foo[1]%i, value=42 ) sync memory call atomic_ref( value=vali, atom=foo[1]%i ) end
  • Build step:

    xxx>ifort /standard-semantics /Qcoarray /warn:all /stand /debug /traceback p.f90
    Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R
    ) 64, Version 18.0.1.156 Build 20171018
    Copyright (C) 1985-2017 Intel Corporation.  All rights reserved.
    
    Microsoft (R) Incremental Linker Version 14.11.25508.2
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    -out:p.exe
    -debug
    -pdb:p.pdb
    -subsystem:console
    -incremental:no
    p.obj
    

    Upon execution,

    xxx>p.exe
    forrtl: severe (157): Program Exception - access violation
    In coarray image 2
    Image              PC                Routine            Line        Source
    
    impimt.dll         000007FEBF891D77  Unknown               Unknown  Unknown
    impimt.dll         000007FEBF892FD0  Unknown               Unknown  Unknown
    impimt.dll         000007FEBF892EA4  Unknown               Unknown  Unknown
    impimt.dll         000007FEBF6F5F9D  Unknown               Unknown  Unknown
    libicaf.dll        000007FEF9C64364  Unknown               Unknown  Unknown
    p.exe              000000013F33122D  MAIN__                     14  p.f90
    p.exe              000000013F3C5752  Unknown               Unknown  Unknown
    p.exe              000000013F3C6059  Unknown               Unknown  Unknown
    kernel32.dll       00000000771259CD  Unknown               Unknown  Unknown
    ntdll.dll          000000007725A561  Unknown               Unknown  Unknown
    
    application called MPI_Abort(comm=0x84000002, 3) - process 1
    

    I believe the above code is standard-conforming and the build output should execute without the run-time exception.

    0 Kudos
    0 Replies
    Reply