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
Use new kokkos functionality #1884
Conversation
cmake/ProjectCompilerPostConfig.cmake now invokes the kokkos build system to get additional compiler information that is useful for advanced architectures. This enables the useful information that Kokkos calculates can be more widely available.
Could you please redo the pull request to be merged against Trilinos:develop? Thanks! |
I believe, instead of closing and redoing the PR, it can be edited to be against develop. Just hit the edit button near the title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hope I'm not intruding, but I wanted to make sure to point out some possible build issues and make suggestions about improving the documentation. Thanks!
|
||
#------------ GENERATE HEADER AND SOURCE FILES ------------------------------- | ||
execute_process( | ||
COMMAND ${KOKKOS_SETTINGS} make -f ${KOKKOS_SRC_PATH}/core/src/Makefile build-makefile-cmake-kokkos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this break the Windows build, or is CMake smart enough to figure out what make
means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kokkos doesn't build with MS Visual C++ yet as far as I know, but it may build on Windows in Visual Studio with the Intel compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work with Cygwin or the Ubuntu add-on but it would require testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kruger The projects in question use Visual Studio, not Cygwin or the Ubuntu add-on.
As far as I can tell, this would be the first bit of CMake code in Trilinos that invokes make
directly via execute_process
. Does TriBITS require that make
be in $PATH
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, would this break the ninja
back-end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bartlettroscoe Can you comment on make requirements?
@mhoemmen The execute_process is done at configure time and is just like invoking a script to calculate build parameters. It's not using make for the build itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let @bartlettroscoe give you further direction. I'm just pointing out potential issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, I did not see this PR or the comments from earlier in the month.
This usage of make
has nothing to do with the generator used by for the build of Trilinos objects. It should work with both the Ninja and Makefile generators (and any other CMake backends). But yet, it will require that make
be in the path. But to be more flexible, perhaps we should use FIND_PROGRAM()
to to find make
and then let the user point to a different make
.
Example: Configuring with Kokkos and advanced back-ends | ||
-------------------------------------------------------- | ||
|
||
Kokkos serves as a basis for many advanced trilinos packages, especially those |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't say what Kokkos is or why users might want it. I'm also not a fan of words like "advanced" that don't have a clear meaning. It's like saying "fastest" or "only the latest." Kokkos will work fine on older hardware too.
How about this: "Kokkos (https://github.com/kokkos/kokkos) is a C++ implementation of a cross-platform shared-memory parallel programming model. Many Trilinos packages, and other stand-alone applications, use it to implement parallel algorithms. Kokkos has two different build systems: Trilinos' CMake-based build system, and its own separate build system."
Regarding "...and this build system has more options than that supported by Trilinos by default..." -- isn't the point of this pull request to fix that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took your verbiage. Thanks!
My goal was to explain why a user would have something like -DTPL_ENABLE_CUDA=True -DKOKKOS_ENABLE_CUDA_LDG_INTRINSIC=True
. Why TPL for one and not the other?
I think with your fixes it is sufficient.
+----------------------------+----------------------------------------------+ | ||
| Debug builds | KOKKOS_DEBUG | | ||
+----------------------------+----------------------------------------------+ | ||
| Devices Options | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar fix: "Device options" (note capitalization change, for consistency with the other column headers).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
+----------------------------+----------------------------------------------+ | ||
| CUDA Options | | ||
+----------------------------+----------------------------------------------+ | ||
| Enable CUDA LDG | KOKKOS_ENABLE_CUDA_LDG_INTRINSIC | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the point of this list to document the available options, or just to list them? I ask because you explain the UVM acronym below, but not the LDG acronym above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am copying documentation from elsewhere in Kokkos so I was giving as much info as I have.
I'll add (global memory load)
Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
Can you briefly summarize the status of #1400 (which this PR supports)? What testing has been done for this new system? What do I need to do to test this myself? What is the status of the merges of the branches? Has Kokkos accepted the PR for your branches? That needs to be done before we can merge this Trilinos PR branch. |
Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
I don't think that this should go in at all. I believe this comes in as part of the Kokkos-promotion. |
…4cd816 From repository at git@github.com:kokkos/kokkos.git At commit: commit 564ec79e3409f9bdd6d1e9a6cadad047764cd816 Merge: 7a06fc8 9614f72 Author: Dan Ibanez <ibaned@users.noreply.github.com> Date: Tue Nov 6 14:27:47 2018 -0700 Merge pull request trilinos#1884 from kokkos/master-backmerge Update master-history
cmake/ProjectCompilerPostConfig.cmake now invokes the kokkos
build system to get additional compiler information that is useful for
advanced architectures. This enables the useful information that Kokkos
calculates can be more widely available.