make flang map runnable
@@ -16,16 +16,27 @@ MODULE definitions_module
END MODULE definitions_module
SUBROUTINE start
use definitions_module
+ ALLOCATE(chunk%tiles (1))
+ ALLOCATE(chunk%tiles(1)%field%density0 (-1:962,-1:962))
+ ALLOCATE(chunk%tiles(1)%field%density1 (-1:962,-1:962))
+
+ print '(Z)', loc(chunk%tiles(1))
+ print '(Z)', loc(chunk%tiles(1)%field)
+ print '(Z)', loc(chunk%tiles(1)%field%density0)
+ print '(Z)', loc(chunk%tiles(1)%field%density1)
+
+ call flush(6)
!$omp target data map( &
!$omp chunk%tiles(1)%field%density0, &
!$omp chunk%tiles(1)%field%density1)
- DO tile=1,tiles_per_chunk
- CALL initialise_chunk(tile)
+ DO tile=1,2
+ chunk%tiles(1)%field%density0(tile,-1) =0
+ chunk%tiles(1)%field%density1(tile,-1) =0
ENDDO
!$omp end target data
END SUBROUTINE start
program foobar
-
+ call start
end program
