PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Call thrust failed - '_MSC_VER' '1800' doesn match '1600'
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
yuanrui124



Joined: 06 Mar 2014
Posts: 45

PostPosted: Thu Jun 26, 2014 11:07 am    Post subject: Call thrust failed - '_MSC_VER' '1800' doesn match '1600' Reply with quote

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
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Jun 26, 2014 2:06 pm    Post subject: Reply with quote

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
Back to top
View user's profile
yuanrui124



Joined: 06 Mar 2014
Posts: 45

PostPosted: Sun Jun 29, 2014 3:18 am    Post subject: Reply with quote

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
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Jul 01, 2014 12:43 pm    Post subject: Reply with quote

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
Back to top
View user's profile
yuanrui124



Joined: 06 Mar 2014
Posts: 45

PostPosted: Tue Jul 01, 2014 7:31 pm    Post subject: Reply with quote

Thank you Mat.

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

Nightwish
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling 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