CUDA 6.5 and PVF 14.6 call thrust library

Hello, Mat!

The CUDA 6.5 has been released and it supports VS 2013.

So I use CUDA 6.5 and PVF 14.6 together to call thrust.

But the compile vailed.

The error message is:

Compiling Project …
thrust_module.cuf
testsort.cuf
Linking…
libpgc.lib(pgfenv.obj) : error LNK2005: _fegetround already defined in libcmt.lib(fegetround.obj)
libpgc.lib(pgfenv.obj) : error LNK2005: _fegetexceptflag already defined in libcmt.lib(fegetexceptflag.obj)
libpgc.lib(pgfenv.obj) : error LNK2005: _fesetexceptflag already defined in libcmt.lib(fesetexceptflag.obj)
libpgc.lib(pgfenv.obj) : error LNK2005: _fetestexcept already defined in libcmt.lib(fetestexcept.obj)
E:\PGI Visual Fortran 14.6\CudaFortranCallThrustSortByKey\CudaFortranCallThrustSortByKey\Win32\Debug\CudaFortranCallThrustSortByKey.exe : fatal error LNK1169: one or more multiply defined symbols found
E:\PGI Visual Fortran 14.6\CudaFortranCallThrustSortByKey\CudaFortranCallThrustSortByKey\Win32\Debug/CudaFortranCallThrustSortByKey.exf: error STP001: cannot open file
CudaFortranCallThrustSortByKey build failed.

How to solve these?

Thank you!

Nightwish

Hi Nightwish,

This is a know issue that may occur in some instances. It is being tracked as TPR#20681. The problem stems from a change in Window Open Tools libcmt.lib library. We have a fix in place but the fix wont be available until a future release. Unfortunately, there isn’t a work around.

Best Regards,
Mat

Thank you, Mat!

I have found some way to solve this problem. Set Linker-Command Line-Additional options: /FORCE:MULTIPLE and then compilation and execution is success.

Nightwish

Hi Nightwish,

In the other report for this issue, we tried force multiple. It linked but got a run time error. Hence, why I didn’t suggest it. Though, I’m glad it worked for you.

  • Mat

Hello, Mat

Does this fix available in PVF 14.7?

Thank you

Nightwish