Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
7 Views

ifort 17 beta: access to the file system from coarray images

Hi,

I am currently testing some of ifort's coarray capabilities with the Intel Parallel Studio XE 2017 Beta for Linux (initial release, as well as update 2) on a shared memory computer. From my current experiences, access to the file system does only work on image 1 by now. From other coarray images, I am getting an IOSTAT integer value of 2 (positive) when executing an OPEN statement for a file. Can anyone else also confirm that file access from an ifort 17 coarray program is limited to image 1 only by now? And if so, is this behaviour intentionally?

From my current understanding, access to the file system can't be granted on all coarray images, especially with distributed memory machines. Thus, it would make sense to limit file access to only few coarray images to prevent people from writing coarray programs that can't be successfully executed on a different machine. Since we can't directly access the file system from the other coarray images, we do 'read and write' to (remote) PGAS memory instead.

 

Best Regards

Michael

0 Kudos
4 Replies
Highlighted
7 Views

You should be able to open a

You should be able to open a file from any image. Standard input is preconnected only on image 1. Standard output is preconnected on all images, and our implementation merges the output into image 1's stream. All units are independent per image.

As you say, accessing files in a distributed application can be a problem, but there's nothing inherent in our coarray support to block you. Got a test program that shows the problem?

Retired 12/31/2016
0 Kudos
Beginner
7 Views

Hi Steve,

Hi Steve,
thanks for the clarification. Then it could be a bug with the ifort 17 beta. I used some rather complex test programs which do work with ifort 15 (and ifort 16 as far as I remember) as well as with gfortran/OpenCoarrays, for example at: https://github.com/MichaelSiehl/MPMD-with-Fortran-2008-Coarrays .
I also tried to reproduce the error with some small example program, but without success so far, the following does work on every image (you must provide the test.txt file):
PROGRAM Main
IMPLICIT NONE
INTEGER :: FileAccessStatus = 0
  !
IF (THIS_IMAGE() == 2) THEN
  !
  OPEN (UNIT=0, IOSTAT=FileAccessStatus, FILE='test.txt', &
      STATUS='OLD', ACCESS='SEQUENTIAL', FORM='FORMATTED', &
      POSITION='REWIND', ACTION='READ', &
      BLANK='NULL', DELIM='APOSTROPHE')
  !
  WRITE(*,*) 'IOSTAT:', FileAccessStatus
  IF (FileAccessStatus .NE. 0) ERROR STOP
  !
  CLOSE (UNIT=0, IOSTAT=FileAccessStatus, STATUS='KEEP')
  !
END IF
  !
END PROGRAM Main
I will do some further investigation to try to figure out the cause of the problem and will give you further information shortly.
Note: I did use two different Linux setups for the ifort 17 beta initial release and the update2 release, so the problem may not be related to my Linux system.
cheers
Michael

0 Kudos
Highlighted
Beginner
7 Views

I just figured out what the

I just figured out what the problem is: it is NOT THE FILE ACCESS from coarray images but rather the image-to-image data transfer of character coarray variables. I will set up a small test program shortly and open a new topic for this. This current topic on file access should be closed.
best regards
Michael

0 Kudos
Highlighted
Beginner
7 Views

Just a brief update: the bug

Just a brief update: the bug seems to be a very subtle one. In most cases the image-to-image data transfer of character coarray variables (or character components of derived type coarrays) does work. I will try to shorten the problematic code as much as possible to make it easier to survey the cause of the error.

0 Kudos