Nvfortran error

Sorry but I’m not clear what you’re asking.

You want to call a CUDA Fortran device attributed subroutine from an OpenMP offload region?

I’ve not tried this myself but don’t think that it’s expected to work. The biggest issue I can think of is that the OpenMP standard requires compilers to generate host fall back code which will cause issues if the subroutines are device only.

Also, you have an “if” clause here. Again since there wouldn’t be a host version of the subroutines, the “if” wont work correctly.

Is there a reason why you don’t want to use the OpenMP “declare target” region to create device versions of the subroutines?

https://www.openmp.org/spec-html/5.0/openmpsu62.html

Hello, I made this error while debugging the code. The kernel function call was not supported. I don’t know what happened. I used nvfortran.

Sorry, but I’m not clear. Which kernel function call is not supported?

The only thing shown here is the warnings about the incorrect number of subscripts use in lines 4281-4286.

It’s line 7495,maybe you didn’t see the last error prompt.

Ah, yes, I did. The small type and orange makes it look like a closing bar.

I/O on the device is very limited. Anything that requires formatting can’t be used.

I’m presuming “wsoc_g_u” is an array? You can print an individual element, but not the whole array.

-Mat

“You mean if this is an array, it should not print out. Can I write it like this?” print *, wsoc_ g_ U (2218), let it output at a fixed unit

You should be able to print out an array element. So presuming “2218” is a valid index, “print *, wsoc_ g_ U (2218)”, should be fine.