sum reduction


I’d like to use the sum reductions for a complex valued array “sum_dev” as shown below:

!$acc region
  sumVal_dev = sum(sum_dev)
!$acc end region

When I compile, I get several compiler errors. The code works fine for real-valued array. Is it possible to use the acc region for sum of a complex array?

Thanks, Jan

Hi Jan,

Sorry, but right now automatic reductions for complex values is not supported. We’re actually in the process of revamping how we represent and compute complex values within Fortran across all target architectures. Once this work is completed, it will become much easier to support things like complex reductions within accelerator compute regions.

  • Mat

Thanks Mat, that is good news. It would be great to have full support for complex valued variables, since it’s one of the strongest points of fortran.

Cheers, Jan