Call thrust failed - '_MSC_VER' '1800' doesn match '1600'

Hello!

I use VS 2010, CUDA 5.5 & 6.0, and PGI Visual Fortran 14.6 to implement call thrust from Fortran.

I use VS 2010 (VC 2010) and nvcc to compile the csort.cu into a csort.obj file. When I use PVF 13.9 to call thrust, everything is OK. But when I use PVF 14.6, it failed to compile. The error message is:

Linking…
libcpmt.lib(xthrow.obj) : error LNK2038: mismatch detected for ‘_MSC_VER’: value ‘1800’ doesn’t match value ‘1600’ in csort.obj
libcpmt.lib(syserror.obj) : error LNK2038: mismatch detected for ‘_MSC_VER’: value ‘1800’ doesn’t match value ‘1600’ in csort.obj
E:\PGI Visual Fortran 14.6\thrust\thrust\Win32\Debug\thrust.exe : fatal error LNK1319: 2 mismatches detected
E:\PGI Visual Fortran 14.6\thrust\thrust\Win32\Debug/thrust.exf: error STP001: cannot open file
thrust build failed.

The csort.obj is compiled by the VS 2010, so its _MSC_VER is 1600. But the PVF 14.6 may need 1800 (may be VS 2013). How can I deal with this problem?

Nightwish

Hi Nightwish,

The default CUDA target for 14.6 is CUDA 5.5 while it was CUDA 5.0 in 13.9. While we don’t ship CUDA 5.0 with 14.6, if you still have 13.9 installed you can use CUDA 5.0 by setting “-Mcuda=5.0”. Otherwise, you’ll need to either go back to using 13.9 or update your VS.

  • Mat

In 13.9 I manually set to use CUDA 5.5. I think it’s not the problem of CUDA version. Because I do not use CUDA 5.0.

I think I could not update VS to 2013, because even the newest CUDA toolkit, they do not support VS 2013, i.e. that I try to use 2013 cl.exe and nvcc to compile the csort.cu but failed. The nvcc said that it only support VS 2008, 2010 and 2012.

I’ll send you the code to your service email address and can you test for me? Thank you!

When I switch to 14.6, the thrust can not be called. This problem costs me much time. I really want use thrust in Fortran, so please help me, thank you!

Nightwish

Hi Nightwish,

There’s not much we can do in the short term. Though once CUDA 6.5 is available, I would try again. In the meantime, you’ll need to go back to using 13.9 which supported VS2012.

  • Mat

Thank you Mat.

I think it’s a small bug, I suggest to fix it in the next release.

Nightwish

Hi Nightwish,

Sorry but it’s not a bug rather a compatibility issue. MS requires objects be compiled with the same compiler version. CUDA 6.0 uses MSC++ as the host compiler and only supports VS2012. PVF 14.x uses the most current VS2013.

CUDA 6.5 which will be available as a release candidate in the near future, will support VS2013. Once available, please download and recompile your CUDA C code. The object should be then be compatible.

  • Mat