https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96797
Bug ID: 96797
Summary: OpenACC fortran acc_get_cuda_stream
Product: gcc
Version: 10.1.0
Status: UNCONFIRMED
Keywords: openacc
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: samunaga at amd dot com
Target Milestone: ---
Created attachment 49130
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49130&action=edit
source_code.txt contains source code for all the 3 files
When compiling OpenACC fortran code fft.f90 which calls a function defined in
cufft.cu file, we are getting the below error
Error:
Function 'acc_get_cuda_stream' at (1) has no IMPLICIT type
Steps to reproduce the error:
nvcc -c --compiler-bindir /usr/bin/ cufft.cu (using GCC7.5.0 for NVCC)
gfortran -fopenacc -o fftf fft.f90 cufft.o -lm -lcufft
-L/usr/local/cuda-10.2/targets/x86_64-linux/lib/ -lcudart
CUDA version: 10.2
GCC version: 10.1
When compiling the equivalent C code(fftc.c), the executable got build without
any errors.
Steps for compilation:
nvcc -c --compiler-bindir /usr/bin/ cufft.cu (using GCC7.5.0 for NVCC)
gcc -fopenacc -o fftc fftc.c cufft.o -lcufft -lcudart
-L/usr/local/cuda-10.2/targets/x86_64-linux/lib
Please find attached source code for cufft.cu,fft.f90,fftc.c
We observed that, acc_get_cuda_stream is declared in openacc.h file(C
implementaion uses this)
But acc_get_cuda_stream is not declared in openacc.f90 file(fortran
implementation uses openacc.mod)