PVF and ACML

Hi!
I’ve written a short FORTRAN code that calls functions in the ACML library. When I compile with PVF 11.10, I’ve set the “Use ACML” library flag to yes (Configuration Properties->Fortran->Libraries) and the Runtime Library to “Multi-threaded DLL” (Configuration Properties->Fortran->Code Generation) it compiles and runs. If I change the Runtime Library to “Multi-threaded (-Bstatic)”, the code does not get through the link stage. The error messages include warnings about locally defined symbols and errors about unresolved external symbols.

  1. Is it appropriate to compile the ACML library with static linking?
  2. Are there additional settings that need to be provided for compiling and linking in the static case?

Thanks for your help!

Other information:

  1. Windows 7, compiling for x643

  2. PVF configuration summary:
    Configuration Properties->Fortran->Command Line
    -Bstatic -Mbackslash -Mcuda -Macml -I"c:\program files\pgi\win64\11.10\include" -I"C:\Program Files\PGI\Microsoft Open Tools 10\include" -I"C:\Program Files\PGI\Microsoft Open Tools 10\PlatformSDK\include" -fastsse -Mipa=fast,inline -Minform=warn

Configuration Properties->Linker->Command Line
-Bstatic -Mcuda -Macml -o “C:\Users\kotas\Documents\Visual Studio 2010\Projects\PVF_RandomNumberTest\x64\Debug\PVF_RandomNumberTest.exe” -Wl,/libpath:“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\lib\x64” curand.lib

  1. Partial build output:

Linking…
libacml_mp.lib(acmlgetenv.obj) : warning LNK4217: locally defined symbol free imported in function acmlgetenv_
libacml_mp.lib(acmlcpuid.obj) : warning LNK4217: locally defined symbol free imported in function acmlcpuid_once
libacml_mp.lib(acmlgetenv.obj) : warning LNK4217: locally defined symbol getenv imported in function acmlgetenv_
libacml_mp.lib(acmlgetenv.obj) : warning LNK4217: locally defined symbol strncpy imported in function acmlgetenv_
libacml_mp.lib(acmlputenv.obj) : warning LNK4217: locally defined symbol strncpy imported in function acmlputenv_
libacml_mp.lib(acmlgetenv.obj) : warning LNK4217: locally defined symbol malloc imported in function acmlgetenv_
libacml_mp.lib(acmlputenv.obj) : warning LNK4217: locally defined symbol malloc imported in function acmlputenv_
libacml_mp.lib(acmlcpuid.obj) : warning LNK4049: locally defined symbol malloc imported
libacml_mp.lib(acmlcpuid.obj) : warning LNK4217: locally defined symbol strcpy_s imported in function SetTLBTYPE
libacml_mp.lib(acmlcpuid.obj) : warning LNK4217: locally defined symbol strncmp imported in function GetCacheInfo
libacml_mp.lib(acmlcpuid.obj) : warning LNK4217: locally defined symbol fprintf imported in function PrintTLBTYPE
libacml_mp.lib(acmlcpuid.obj) : warning LNK4217: locally defined symbol iob_func imported in function PrintTLBTYPE
libacml_mp.lib(acmlcpuid.obj) : warning LNK4217: locally defined symbol printf imported in function PrintCpuTlbs
libacml_mp.lib(acmldrngdg0gau.obj) : error LNK2019: unresolved external symbol vrda_log
referenced in function acmldrngdg0gau.pgi.uni.gh

libacml_mp.lib(acmldrngdg0gau.obj) : error LNK2019: unresolved external symbol vrda_sincos_ referenced in function acmldrngdg0gau.pgi.uni.gh_
libacml_mp.lib(acmlputenv.obj) : error LNK2019: unresolved external symbol _imp__putenv referenced in function acmlputenv
libacml_mp.lib(acmlputenv.obj) : error LNK2019: unresolved external symbol _imp_strncat referenced in function acmlputenv
C:\Users\kotas\Documents\Visual Studio 2010\Projects\PVF_RandomNumberTest\x64\Debug\PVF_RandomNumberTest.exe : fatal error LNK1120: 4 unresolved externals
PVF_RandomNumberTest build failed.

Hi Charlotte,

Unfortunately AMD built the static Windows versions of ACML incorrectly so there is little that can be done except link dynamically. We are working with them to get this resolved and hopefully in their next version, we can get static linking working.

Best Regards,
Mat