Skip to content
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

shared.hpp does not compile in nvidia CUDA #37

Closed
ghost opened this issue Feb 2, 2021 · 19 comments
Closed

shared.hpp does not compile in nvidia CUDA #37

ghost opened this issue Feb 2, 2021 · 19 comments

Comments

@ghost
Copy link

ghost commented Feb 2, 2021

The nvcc compiler does not compile include\boost\preprocessor\slot\detail version 1.75.0. Compile fails with "C1012 unmatched parenthesis: missing ')'" on line 27
image

@eldiener
Copy link
Collaborator

eldiener commented Feb 3, 2021

I can not read whatever you have above. I need more information before I can look at your problem.

@ghost
Copy link
Author

ghost commented Feb 3, 2021

@eldiener my apologies I have attached a self contained visual studio project that produces the error. You will need to run the following vcpkg install command to acquire the dependencies:

./vcpkg install boost:x64-windows-static

I'm working from vcpkg commit: d97ce7dfc24939519c93978524766967fb5d95aa

Which results in boost version 1.75.0

BoostPreprocessorHeader.zip
.

@eldiener
Copy link
Collaborator

eldiener commented Feb 3, 2021

I need a command line that produces an error. I have no interest in running vcpkg etc.

@eldiener
Copy link
Collaborator

eldiener commented Feb 3, 2021

To reiterate. I need code, I need a command line, and I need to know what compiler you are using and where I can get it if I do not already have it. Simply saying "I have a problem with the preprocessor library. Solve it" is not enough for me to look at your problem.

@ghost
Copy link
Author

ghost commented Feb 3, 2021

The following code snipped does not compile in the NVCC compiler from CUDA 11.0 or CUDA 11.2. The code does compile in the MSVC compiler v142 so it could be an issue with the Nvidia compiler/preprocessor. The compiler fails in the file 'shared.hpp' somewhere on the include tree stemming from the include of "signal.hpp". Specifically the compiler fails with "C1012 unmatched parenthesis: missing ')' on line 27 of 'shared.hpp'.

#include <boost/signals2/signal.hpp>

// TODO: This is an example of a library function
void fnBoostPreprocessorHeader()
{
}

Hopefully that gives you some more information.

@eldiener
Copy link
Collaborator

eldiener commented Feb 3, 2021

I have no idea what fnBoostPreprocessorHeader() is supposed to be. Are you saying that just including the signals2 header file gives the error above ?

If so, what compiler and what command line, and why are you creating an issue here rather then under signals2 ?

If not you actually have to produce code which shows the error, the compiler you are using and the command line parameters for that compiler.

@ghost
Copy link
Author

ghost commented Feb 3, 2021

I'm saying if you compile the code exactly as typed in my comment above with the nvcc compiler in CUDA 11 it will give you the error I'm describing.

So yes the inclusion of signals2 will produce the error with no code beyond what I typed above.

@eldiener
Copy link
Collaborator

eldiener commented Feb 3, 2021

Please report the problem to signals2 https://github.com/boostorg/signals2 . I suggest you give them the exact compiler used and a command line. If you still think it is a preprocessor problem you need to show me actual preprocessor code which is causing the problem for the nvcc compiler, as well as a command line I can use to reproduce the problem.

@ghost
Copy link
Author

ghost commented Feb 3, 2021

Ok I will send it their way thanks! :)

@ghost
Copy link
Author

ghost commented Feb 10, 2021

boostorg/signals2#53

@mobereng
Copy link

I will join this issue, I ran into the same compilation problem:

image

CUDA: 11.2
Boost: 1.75.0

@ghost
Copy link
Author

ghost commented Feb 15, 2021

@mobereng This was resolved in boostorg/signals2#53. The preprocessor dev branch has this fix. This issue has been resolved. There should be regression testing for boost using the NVCC compiler. NVCC is currently committed from the test suite.

@ghost ghost closed this as completed Feb 15, 2021
@mobereng
Copy link

@dahubley Amazing, let me change to development branch

@mobereng
Copy link

@dahubley It worked, thanks for the help !

@eldiener
Copy link
Collaborator

eldiener commented Feb 15, 2021

It would be nice if there were Boost regression tests for the nvcc compiler, but I have never seen any. I think this is because there has never been a Boost Build toolset for nvcc.

@ghost
Copy link
Author

ghost commented Feb 15, 2021

@eldiener if boost is making NVCC specific changes then it seems important to have builds on NVCC completed before release. Otherwise it's pretty hard to know things will work on that compiler. I would do this myself if our company had the resources but I work for a 5 person shop. I'm hoping someone will see value in the idea and move it forward.

@eldiener
Copy link
Collaborator

Go to Boost Build and try to convince them there to have a Boost Build toolset for nvcc. Then someone needs to provide either Boost regression tests for the nvcc compiler, or some CI testing service, appveyor, travis etc., needs to have the ability of testing nvcc.

@ghost
Copy link
Author

ghost commented Feb 16, 2021

@ericniebler thanks I will do that!

@ghost
Copy link
Author

ghost commented Feb 16, 2021

@eldiener @eldiener I have added a feature request to boost build.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants