LOGICALs and GPUs

This is an odd question, but one I seem to encounter with accelerators. Namely, I sometimes get an error like (I don’t have an exact wording on hand) “Accelerator restriction: invalid data type: do_aerosol” when I am compiling an accelerated region. In each case, this invalid data is a LOGICAL being used inside the loop I’m accelerating a la:

do i=1,m
 ...
 if(do_aerosol) then
  xx = a(i,k1)*b(i,k1)
 endif
 tranu(i,k1) = tranu(i,k1)+xx
 ...
enddo

or something like that. (This is not real code, just a basic type of what I see.) The line given by the compiler is centered on that if-statement.

I’ve found that if this is triggered, I can jury-rig around it by instead of using a LOGICAL, I define an integer, i_do_aerosol, that is 1 if do_aerosol is .TRUE. and 0 if .FALSE. inside the F77 code.

Is there a known restriction against using/sending LOGICALs with/to GPUs? Or, should I elaborate with real code?

Hi Matt,

I sent a note to Michael Wolfe about the status of Logicals. He’s traveling so it may a day of two before I hear back.

  • Mat

I am currently using 10.8 and am having the same issue. All logicals inside accelerated regions gave the same error. Is there a fix on this now aside from changing all the variables into integers?

Hi WmBruce,

I must apologize since I drop the ball on this one and forgot to follow-up with Michael.

It does appear to be a bug since logical should be supported. I have submitted TPR#17184 to track this issue and hopefully we can get if fixed shortly.

  • Mat

Hello,
the problem is not fixed in version 10.9. Do you have any idea when a fixed version will be available?
Sandra

Hi Sandra,

I sent a note to engineering but haven’ heard back yet.

I’m currently at SC10 but will check again when I get back next week.

  • Mat

Any news?

Sandra,

TPR 17184 is fixed in the current 11.0 release. Logicals are
now supported. Thanks for you report.



regards,
dave