title: Runtime error when compiling with PGI instead of Cray in a parallel region with a routine call
body: <p>I have a problem: my code does give me a runtime error, when I compile with PGI instead of Cray. The code fails when it enters the parallel region and gives me a segmentation fault.</p>
  
  <p>I tried several things and found that passing scalars (var4, see code) to the subroutine works proper. But passing arrays (var3, see code) to the routine it fails.</p>
  
  <p>The code works without any problems compiled with Cray, but with PGI it complains.</p>
  
  <p>So, there is my question: Is there a difference how arrays are allocated on the device between PGI and Cray?</p>
  
  <p>The parallel region with the call looks like that:</p>
  
  <pre><code>     !$acc data present(var2,var3,var4)
       !$acc parallel
         !$acc loop gang vector collapse(2) private(var1)
         DO j = 1, jend
           DO i = 1, iend
             IF (var2(i,j) .gt. 100.0) THEN
               CALL routine_seq ( var3(i,j,:),  &amp;
                                  var4(i,j),    &amp;
                                  var1)
             END IF
           END DO
         END DO
         !$acc end parallel
  </code></pre>
  
  <p>In the routine I have the !$acc routine seq included. It looks like that:</p>
  
  <pre><code>   SUBROUTINE routine_seq(var3,var4)
      !$acc routine seq
      REAL (KIND=wp), DIMENSION( : ),             &amp;
           INTENT( IN ) ::                               var3
  
      REAL (KIND=wp), DIMENSION( : ),             &amp;
           INTENT(  IN ) ::                               var4
  
      REAL (KIND=wp),                             &amp;
           INTENT( OUT ) ::                               var1
  </code></pre>
  
  <p>var3 and var4 are allocated this way:</p>
  
  <pre><code>    ALLOCATE ( var3(iend,jend,kend) , STAT=ierr); IF (ierr/=0) istat=ierr
      ALLOCATE ( var4(iend,jend) , STAT=ierr); IF (ierr/=0) istat=ierr
      !$acc enter data create(var3,var4)
  </code></pre>