Code Monkey home page Code Monkey logo

Comments (13)

gmcgrath-lakehead avatar gmcgrath-lakehead commented on September 4, 2024 3

Regarding the problem solving steps @cookingcookie references above, the most important points to avoid issues are:

  • CMakeLists.txt, Line 57: Replace -arch=sm_35 with -arch=sm_## (The arch param depends on the gpu you are using)

To determine which GPU you're using, refer the NVIDIA website. Find your GPU and refer to this list for the supported real architecture you have. (Mine compiled fine with the default). My architecture from that list is 2.1 but the minimum you can use is 3.0. I managed to get everything working using -arch=sm_30

  • CMakeLists.txt, Line 22,27,30: Removed -O2; (I think you only need to remove this when building in release mode)

This point requires a correction. Remove the -O2 to compile in Debug mode. This doesn't require you to generate the files again with CMake.

I didn't directly solve this problem but I did get the files to compile properly. One necessary thing is that Visual Studio 2013 MUST be used. VS2015 and VS2017 will not work.

I used CMake version 3.12.1 to configure and generate my solution. I previously built the OpenCV libraries. I ensured that my source code directory and binary build directory did not have any space characters in the paths. The only configuration setting I changes was the OpenCV_DIR to the folder containing OpenCVConfig.cmake.

Pieces of code that should be changed, and I've contacted Dr. Björkman, change all instances of cudaThreadSynchronize() to cudaDeviceSynchronize(). This is because cudaThreadSynchronize() is deprecated.

I opened the project in VS2017 while running as an administrator. I right-clicked on ALL_BUILD > Build and was successful.

Hope I was able to help.

from cudasift.

Karol-G avatar Karol-G commented on September 4, 2024 2

I managed to solve this problem, but i forgot how exactly I did it. I had other problems with building it too, so I made a short txt how I solved all my problems back then. I don't know anymore which of these lines solved the problem, but I made some annotations in brackets what I think they did. Sorry if the txt is a bit confusing.
I hope this helps :)

  • CMakeLists.txt, Line 57: Replace -arch=sm_35 with -arch=sm_52 (The arch param depends on the gpu you are using)

  • CMakeLists.txt, Line 22,27,30: Removed -O2; (I think you only need to remove this when buidling in release mode)

  • CMakeLists.txt, Line 72: Copyrigth.txt | Comment out this line

  • cudaSiftH.cu: Comment out Line 226-230
    //safeCall(cudaMemcpyFromSymbol(&totPts, &d_PointCounter[2], sizeof(int)));
    //int totPts = (totPts<siftData.maxPts ? totPts : siftData.maxPts);
    //if (totPts>0)
    // printf(" %.2f ms / DoG, %.4f ms / Sift, #Sift = %d\n", gpuTimeDoG/NUM_SCALES, gpuTimeSift/(totPts-fstPts), totPts-fstPts);
    (Throws some error)

  • Run .sln as admin (I think to avoid ""cmd.exe" exited with code 1" )

  • Build path needs to be in user directory and spaces in the path are not allowed (I think to avoid ""cmd.exe" exited with code 1")

  • For ALL_BUILD, cudasift, INSTALL, PACKAGE and ZERO_CHECK: Configuration Properties -> General -> Configuration Type -> Static library (.lib) ( I think this was just so I could use it better in my code)

  • Run ALL_BUILD and INSTALL and copy new cudasift.exe to execution directory of your application

  • Add cudasift.exe to Library Directories and Linker ( I think this was just so I could use it better in my code)

from cudasift.

wangmiaomiaomiaowu avatar wangmiaomiaomiaowu commented on September 4, 2024

Have you solved this problem? I meet the same situation. If, can you tell the solution.Thanks!

from cudasift.

zhaolei-momo avatar zhaolei-momo commented on September 4, 2024

If you solved this problem, can you tell me the solution? Thank you!

from cudasift.

Karol-G avatar Karol-G commented on September 4, 2024

I have this problem too. Any solutions?

from cudasift.

15757170756 avatar 15757170756 commented on September 4, 2024

your guys can use these code on Linux。It's OK

from cudasift.

GGzhangBOY avatar GGzhangBOY commented on September 4, 2024

Anyone solve this problem?

from cudasift.

Karol-G avatar Karol-G commented on September 4, 2024

@gmcgrath-lakehead

One necessary thing is that Visual Studio 2013 MUST be used. VS2015 and VS2017 will not work.

Hmmm. I managed to compile everything in Visual Studio 2017.

from cudasift.

gmcgrath-lakehead avatar gmcgrath-lakehead commented on September 4, 2024

@cookingcookie

Hmmm. I managed to compile everything in Visual Studio 2017.

I managed to get it to compile properly in VS2017 today. My issue was that I was using the incorrect architecture parameter when trying to compile in VS2017

from cudasift.

mintisan avatar mintisan commented on September 4, 2024

remove duplicated flag -arch=sm_62 works for me

from cudasift.

kunalkhosla93 avatar kunalkhosla93 commented on September 4, 2024

Hi all,
I still am unable to fix this error. Currently using VS2017,Nvidia toolkit 8.0, 930Mx Geforce nvidia card and opencv 3.4.2. As per my research the suitable arch for my card is sm_50/compute_50. I changed the line n0. 57 in cmake lists.txt file and built using VS2017 compiler and then once i open the .sln file as admin i get the same error->"Error MSB6006 "cmd.exe" exited with code 1. cudasift"

from cudasift.

vincenttse0531 avatar vincenttse0531 commented on September 4, 2024

Hi there,
I am still stuck with this error, currently using VS2017, Nvidia toolkit 10.2 and GT 730 with opencv 3.4.2. I found the arch for my card should be sm _30. However modifying the CMakeLists.txt with every sm_xx replaced by sm_30 as below, the issue still persist.

Do anyone have idea how to fix it?

Regarding the problem solving steps @cookingcookie references above, the most important points to avoid issues are:

  • CMakeLists.txt, Line 57: Replace -arch=sm_35 with -arch=sm_## (The arch param depends on the gpu you are using)

To determine which GPU you're using, refer the NVIDIA website. Find your GPU and refer to this list for the supported real architecture you have. (Mine compiled fine with the default). My architecture from that list is 2.1 but the minimum you can use is 3.0. I managed to get everything working using -arch=sm_30

  • CMakeLists.txt, Line 22,27,30: Removed -O2; (I think you only need to remove this when building in release mode)

This point requires a correction. Remove the -O2 to compile in Debug mode. This doesn't require you to generate the files again with CMake.

I didn't directly solve this problem but I did get the files to compile properly. One necessary thing is that Visual Studio 2013 MUST be used. VS2015 and VS2017 will not work.

I used CMake version 3.12.1 to configure and generate my solution. I previously built the OpenCV libraries. I ensured that my source code directory and binary build directory did not have any space characters in the paths. The only configuration setting I changes was the OpenCV_DIR to the folder containing OpenCVConfig.cmake.

Pieces of code that should be changed, and I've contacted Dr. Björkman, change all instances of cudaThreadSynchronize() to cudaDeviceSynchronize(). This is because cudaThreadSynchronize() is deprecated.

I opened the project in VS2017 while running as an administrator. I right-clicked on ALL_BUILD > Build and was successful.

Hope I was able to help.

from cudasift.

iDXM avatar iDXM commented on September 4, 2024

before generating solution file(right click ALL_BUILD and choose generate) in Visual Studio, what you only need to do is choosing Release X64 mode, then everything will be fine

from cudasift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.