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?