Unified Memory: Now for CUDA Fortran Programmers

Originally published at: https://developer.nvidia.com/blog/unified-memory-cuda-fortran-programmers/

Unified Memory is a CUDA feature that we’ve talked a lot about on Parallel Forall. CUDA 6 introduced Unified Memory, which dramatically simplifies GPU programming by giving programmers a single pointer to data which is accessible from either the GPU or the CPU. But this enhanced memory model has only been available to CUDA C/C++…

Hello, I'm not using the unified memory yet, but I plan to test it soon. Meanwhile I have to solve a problem I'm having: I'm parallelizing a code written in Fortran and I've been using the cublas and cusparse wrappers to call the subroutines I need from Fortran and for that I need to use the flag "-Miface=cref" in PGI compiler due to some conventions on calling subroutines from different languages. The problem is that now I need to introduce my own kernels and the subroutine with attributes(global) that I introduced is not recognized, giving the error “error LNK2019:
unresolved external symbol mykernelname referenced in function MAIN_ “ . I think that it might be related to some missing underscore or some additional flag that I should use or change the given cublas and cusparse wrappers to avoid using the "-Mifac=cref" flag, but I've been looking and testing different scenarios in the last two days and still without success. Any clue?

Greetings !

Thanks for the excellent article !

I am (and as I believe, many of us are) facing simple problem: this is commercial PGI suite.

Could we please combine the GNU Fortran with the CUDA unified memory feature ?

Best, Miro