-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CUDA compile issue with "conformingAdd" and "conformingSubtract" in "Vec.h" #677
Comments
I'm not sure what you mean about using Simbody from Cuda. Simbody is a C++ library that would be called from a C++ main program. Have you tried the same code just with gcc 7.4.0? If you can reproduce it in C++ we can help debug it (or fix the problem). |
yes, I used it before for a C++ code with gcc 7.4.0 and C++11 feature, and everything was fine. Now, I have a .cu file instead of the same .cpp file that I was including simbody before, which i want to compile with nvcc (cuda compiler). That is actually the only difference. But is has the above error with those functions. |
I don't know -- I think that's a question for nvcc support. If you find the answer, please do post it here in case anyone else runs into the same problem. |
Apparently, the recursive template implementations of elementwise add and subtract ( |
We depend on outside contributors to the Simbody open source project for support of hardware, operating systems, or compilers that we don't use ourselves. If you have a PR in mind that would allow operation under nvcc without breaking anything else, please do submit one. |
When using SimBody in a .cu file being compiled with cuda 10.0 and gcc/g++ 7.4.0 the following error pops up regarding "conformingAdd" and "conformingSubtract" in "Vec.h":
simbody/include/simbody/SimTKcommon/internal/Vec.h(54): error: more than one instance of overloaded function "SimTK::Impl::conformingAdd" matches the argument list:
function template "void SimTK::Impl::conformingAdd(const SimTK::Vec<1, E1, S1> &, const SimTK::Vec<1, E2, S2> &, SimTK::Vec<1, SimTK::CNT::Result::Add, 1> &)"
function template "void SimTK::Impl::conformingAdd(const SimTK::Vec<N, E1, S1> &, const SimTK::Vec<N, E2, S2> &, SimTK::Vec<N, SimTK::CNT::Result::Add, 1> &)"
argument types are: (const SimTK::Vec<1, SimTK::Real, 1>, const SimTK::Vec<1, SimTK::Real, 1>, SimTK::Vec<1, SimTK::Real, 1>)
detected during:
instantiation of "void SimTK::Impl::conformingAdd(const SimTK::Vec<N, E1, S1> &, const SimTK::Vec<N, E2, S2> &, SimTK::Vec<N, SimTK::CNT::Result::Add, 1> &) [with N=2, E1=SimTK::Real, S1=1, E2=SimTK::Real, S2=1]"
I tried to use different compilers but did not help.
The text was updated successfully, but these errors were encountered: