PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

compile error
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
JMa



Joined: 30 Nov 2012
Posts: 22

PostPosted: Wed Oct 23, 2013 9:47 am    Post subject: compile error Reply with quote

Hi Mat,
I've just finished installing a Geforce GTX Titan on my Win7 workstation and installed PVF compiler. However, I got errors when I tried to compile the sample from Openacc Manual: Fortran vector addition

I got the following:

Error 1 unresolved external symbol __cudaRegisterFatBinary referenced in function vecaddmod_vecaddgpu_ vecAdd.obj Error 4 unresolved external symbol cudaConfigureCall referenced in function __pgi_uacc_cuda_launchk libaccnc.lib
...

I know I must miss something in the project setting, could you please kindly help me out?

Thanks,

J.M.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6215
Location: The Portland Group Inc.

PostPosted: Wed Oct 23, 2013 1:40 pm    Post subject: Reply with quote

Hi J.M.

Did you remember to add the OpenACC flag (-acc) to your link so the CUDA libraries are used?

- Mat
Back to top
View user's profile
JMa



Joined: 30 Nov 2012
Posts: 22

PostPosted: Wed Oct 23, 2013 2:52 pm    Post subject: Reply with quote

Hi Mat,
I think I did so since the following was done:
Configuration Properties --> Fortran --> Language:
Enable OpenACC Directives: Yes (-acc)

Are you referring to something else?

Thanks,
J.M.[/img]
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6215
Location: The Portland Group Inc.

PostPosted: Wed Oct 23, 2013 3:07 pm    Post subject: Reply with quote

As long as this is set for the project, not just the file, then yes this is correct.


Are there any other errors besides these two? If it can't find the CUDA run time library, then I'd double check that you selected "yes" during installation when asked to install the CUDA Toolkit.

- Mat
Back to top
View user's profile
JMa



Joined: 30 Nov 2012
Posts: 22

PostPosted: Wed Oct 23, 2013 3:10 pm    Post subject: Reply with quote

Mat, yes, I did select "yes" during the installation.
All output info. is below:

------ Build started: Project: 2ndOpenACC, Configuration: Debug x64 ------
Compiling Project ...
Linking...
vecAdd.obj : error LNK2019: unresolved external symbol __cudaRegisterFatBinary referenced in function vecaddmod_vecaddgpu_
vecAdd.obj : error LNK2019: unresolved external symbol __cudaRegisterFunction referenced in function vecaddmod_vecaddgpu_
vecAdd.obj : error LNK2019: unresolved external symbol __cudaUnregisterFatBinary referenced in function vecaddmod_vecaddgpu_
libaccnc.lib(cuda_launchk.obj) : error LNK2019: unresolved external symbol cudaConfigureCall referenced in function __pgi_uacc_cuda_launchk
libaccnc.lib(cuda_launchk.obj) : error LNK2019: unresolved external symbol cudaSetupArgument referenced in function __pgi_uacc_cuda_launchk
libaccnc.lib(cuda_launchk.obj) : error LNK2019: unresolved external symbol cudaLaunch referenced in function __pgi_uacc_cuda_launchk
libaccnc.lib(cuda_init_c.obj) : error LNK2019: unresolved external symbol cudaFree referenced in function __pgi_uacc_cuda_initdev
libaccnc.lib(cuda_init_c.obj) : error LNK2019: unresolved external symbol cudaGetDevice referenced in function __pgi_uacc_cuda_initdev
libcudafor4.lib(pgierror.obj) : error LNK2019: unresolved external symbol cudaGetErrorString referenced in function __pgi_cuda_error_handler
C:\Users\jingsen\Desktop\openACC_VecAdd\x64\Debug\2ndOpenACC.exe : fatal error LNK1120: 9 unresolved externals
2ndOpenACC build failed.
Build log was saved at "file://C:\Users\jingsen\Desktop\openACC_VecAdd\x64\Debug\BuildLog.htm"

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group