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

lums/sc 28282/wait returns #4073

Open
wants to merge 17 commits into
base: dev
Choose a base branch
from
Open

lums/sc 28282/wait returns #4073

wants to merge 17 commits into from

Conversation

lums658
Copy link
Contributor

@lums658 lums658 commented Apr 29, 2023

Applied a number of fixes to code in the experimental task graph code so that it would compile cleanly under msvc, notably the issue with wait_returns that was generating a massive number of error messages. Following that, cleaned up some remaining warnings and error messages.

Note however, that several of the build errors that were exhibited when compiling the experimental task graph branch may require a fair amount of time to fix. Since none of the remaining issues are on the critical path for migrating the current task graph prototype to the production version, the problem unit tests have been commented out so that the experimental branch will build cleanly under CI.

Nevertheless, some of the issues will eventually need to be addressed.

The particular issues are:

  • The PoolAllocator class currently takes a non-template parameter (the desired size of the data block). While this works elsewhere, the expected member types don't behave properly in msvc. The PoolAllocator will need to have another level of indirection so that the user sees an allocator taking a particular type, and then underneath the allocator returns data blocks of the appropriate size. All of the unit tests that use the DataBlock (and therefore PoolAllocator) have been disabled for msvc.
  • unit_taskgraph (et al) are failing due to some CTAD failures when instantiating Edge. Something related may need to be done in the production version, so it may be worth making this work in the prototype version.
  • unit_nodes_sieve has some of its own difficulties with CTAD. But the set of tests we had been using to benchmark the prototype as it was being developed will need to be rewritten for the production version at any rate, so this might not be worth trying to fix.

Of these, the only must-fix is the PoolAllocator. However, this has not yet been used in any parts of the prototype task graph and may not be used for some time in the production version.

There is a new story (sc-28388) for these issues.


TYPE: BUG
DESC: Fixed isses in experimental task graph files that were causing MVC

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #28282: Fix MSVC compilation errors in experimental tree..

Copy link
Contributor

@davisp davisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have enough context to give a very informed review of this PR so I'm only leaving the comments that stuck out to me while reading it. The only major issue I see is the change to C++20. I was under the impression that there's a lot more work to do before we can make the jump.

As for the rest of my comments, they're all just surface level issues I noticed. I don't have a strong opinion on them given that this is all code in the experimental directory that AFAIK isn't included in releases.

CMakeLists.txt Outdated
@@ -93,7 +93,7 @@ if(APPLE)
endif()

# Set C++17 as default required standard for all C++ targets.
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ Standard")
set(CMAKE_CXX_STANDARD 20 CACHE STRING "C++ Standard")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we're planning on migrating to C++20 sooner rather than later, but is this the PR for checking that change in? I'm wondering if this should just be a bootstrap/cmake option to make it build time configurable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be left at C++17 for now and this should not be in the PR. Although cmake had this, VS actually used C++17 for all of the changes I made.

@@ -31,6 +31,7 @@
*
*/

#ifndef _MSC_VER
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How bad is this MSVC issue? Using this big of a hammer on tests seems a bit concerning to me. I'm worried we'll code ourselves into a corner and end up with a feature that can't be used on MSVC which AFAIK is one of our supported compilers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the ones I commented out are those kinds of errors that spew pages of error messages. I fought with one of them for half a day ("sieve"). I think the "sieve" tests/examples in general are integration rather than unit tests (which might be a reason to keep them). But they are a) crufty because they were b) proofs of concepts for c) integration and d) performance. I can try a bit longer (just a bit) to make these work, but I find the msvc error messages not to be very helpful -- and the errors don't show up in g++ or clang.

There is another story to fix these.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More than fair. Not bothering to fix things that might not exist in the future is good enough for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the pool allocator and data block problems in a different branch (redid their implementation) and then went back and patched this branch with some small fixes for those. The Edge issues in unit_task_graph and the whatever they are issues in nodes_sieve I am not so sure about.

explicit FunctionNode(
Function&& f,
explicit FunctionNode(Function&& f
#if 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we commenting this out rather than just deleting the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a placeholder to come back to. This might not be good/company practice. Should have put a @todo on it. This also should perhaps be #ifndef _MSCVER rather than #if 0. I will take another quick look at this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to s/0/_MSCVER/ for this. Just knowing that its a todo is enough reason for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other aspect of the @todo is to just use concepts instead of enable_if....

Copy link
Contributor

@robertbindar robertbindar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR Andrew, apart from the git leftovers which need to be removed, please try to minimize the amount of commented code, #if 0s, etc we get in so that the code at any time is as friendly as possible for new devs or just people snooping around trying to fix a bug/compiler error quickly.

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

Successfully merging this pull request may close these issues.

None yet

4 participants