- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am testing a miniapp that tests multi-gpu Fortran that is used in our production code.
The code is located at: multigpu-test-code
The specific version being tested here is: psi_multigpu_test_code_stdpar_ompdata.f90
I am testing on the Stampede3 system at TACC on the MAX 1550 GPU.
When I try to compile the code with:
mpif90 -f90=ifx -fiopenmp -fopenmp-target-do-concurrent -fopenmp-targets=spir64 -fopenmp-do-concurrent-maptype-modifier=present psi_multigpu_test_code_stdpar_ompdata.f90 -o psi_multigpu_test_code_stdpar_ompdata
I get the error:
psi_multigpu_test_code_stdpar_ompdata.f90(669): error #9036: A list item that appears in a use_device_ptr or use_device_addr clause must not be a component of a derived type. [R]
!$omp target data use_device_ptr(v%r,v%t,v%p)
-----------------------------------^
Is this error due to the OpenMP Target specification, or is it a temporary limitation of the compiler?
The code works correctly on NVIDIA GPUs with the nvfortran compiler, implying the latter (although nvfortran is known to support the unsupported sometimes...)
In either case, is there a current workaround to allow passing derived type arrays into GPU-aware MPI/library calls?
Thanks!
- Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The restriction is removed in OpenMP 6.0, for 5.2 you may workaround the restriction with something like this:
program test_use_device_addr
implicit none
type d
real :: a
end type d
type(d) :: a
real,pointer ::a_ptr
call assign_ptr(a%a,a_ptr)
!$omp target data use_device_addr(a_ptr)
!$omp end target data
call wrapper(a%a)
contains
subroutine wrapper(a)
real :: a
!$omp target data use_device_addr(a)
!$omp end target data
end subroutine wrapper
subroutine assign_ptr(source,ptr)
real,target :: source
real,pointer :: ptr
ptr=>source
end subroutine assign_ptr
end program test_use_device_ptr
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The restriction is removed in OpenMP 6.0, for 5.2 you may workaround the restriction with something like this:
program test_use_device_addr
implicit none
type d
real :: a
end type d
type(d) :: a
real,pointer ::a_ptr
call assign_ptr(a%a,a_ptr)
!$omp target data use_device_addr(a_ptr)
!$omp end target data
call wrapper(a%a)
contains
subroutine wrapper(a)
real :: a
!$omp target data use_device_addr(a)
!$omp end target data
end subroutine wrapper
subroutine assign_ptr(source,ptr)
real,target :: source
real,pointer :: ptr
ptr=>source
end subroutine assign_ptr
end program test_use_device_ptr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks!
Will OpenMP 6.0 (at least this component of it) be implemented in the next version of IFX?
Any ETA on the release?
- Ron
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page