-
Notifications
You must be signed in to change notification settings - Fork 578
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
'#line 1' from flex generated apr_scanner.cpp SEACAS file causing unnecessary rebuilds when using Ninja + CUDA-8 #2359
Comments
I created the issue sandialabs/seacas#97 to see if we can avoid I guess if nothing else, we could just replace |
This really needs to be fixed in SEACAS proper but this is a quick workaround that will get us going with Nina + CUDA for ATDM builds of Trilinos.
I created PR #2360 to get this addressed in the short-term. |
This remove the line starting wtih '#line 1' which causes nvcc to create a wrong dependency on apr_scanner.o based on the non-existant file /scratch/gdsjaar/seacas/packages/seacas/libraries/aprepro_lib/aprepro.ll. See trilinos/Trilinos#2359. This is the same patch as the Trilinos patch in PR trilinos/Trilinos#2360. By making this patch here as well, the next time SEACAS is snapshotted into Trilinos, it will not overwrite the patch in trilinos/Trilinos#2360 being committed to Trilinos. But the right solution will be to avoid lines starting with '#line 1' in the future when generating these files.
…workaround Remove '#line 1' as workaround for Ninja + CUDA rebuilds (#2359)
@gsjaardema just merged in the PR #2360 and updated the generation code in SEACAS to avoid putting in any Therefore, this issue should now be resolved. I am just going to do a quick check to make sure, post the result here with full reproducability instructions, and then close if the rebuilds are avoided. |
On 'ride' for the Trilinos version:
I did the configure and build of Panzer for the
Then I did a rebuild with:
That did not rebuild anything. But to make sure that rebuilds would work I did:
This looks good. Closing as complete. Thanks @gsjaardema! |
* develop: (261 commits) Replace PHX_EVALUATOR_CLASS Macros (trilinos#2322) Change time-limit on 'ride' from 4 to 12 hours (TRIL-171) Disable Panzer examles for CUDA builds on 'ride' (trilinos#2318, TRIL-171) Move ATDMDevEnvUtils.cmake to utils/ subdir (TRIL-171) Change from ATDM_CONFIG_USE_MAKEIFLES to ATDM_CONFIG_USE_NINJA (TRIL-171) Add ATDM_CONFIG_KNOWN_HOSTNAME var for CTEST_SITE (TRIL-171) Misc improvements to checkin-test-atdm.sh (TRIL-171) Print the return code from 'ctest -S' command (TRIL-171) Tpetra: Sort and merge specializations for Tpetra::CrsGraph (trilinos#2354) Remove '#line 1' as workaround for Ninja + CUDA rebuilds (trilinos#2359) Added function to return the full vector of data in the indexer rather than elem by elem (trilinos#2355) Panzer: Fixing rotation matrix calculation in integration values Tpetra: Adding an additive Schwarz test checkin-test driver scripts for local testing ATDM builds of Trilinos Add list of all supported builds on ride (TRIL-171) Add list of all supported builds shiller (TRIL-171) Fix location of nvcc_wrapper and other fixups (TRIL-171) Improve the 'date' output and start and end (TRIL-171) Change name ATDM_HOSTNAME to ATDM_SYSTEM_NAME (TRIL-171) Print KOKKOS_ARCH to STDOUT (trilinos#1400) ... Conflicts: packages/shylu/shylu_node/tacho/src/TachoExp_NumericTools.hpp packages/shylu/shylu_node/tacho/unit-test/Tacho_TestCrsMatrixBase.hpp
Closing as complete. |
CC: @trilinos/seacas, @fryeguy52
Description
The following line in the SEACAS file:
is causing the ninja CUDA build for Trilinos with SEACAS to rebuild the same files every time, even when everything should be up-to-date.
The cause for this is very strange. There is a defect with the
nvcc
program (at least CUDA 8.0.61) when runningnvcc -M -Wno-deprecated-gpu-targets
on a file that has#line 1 <some-file>
in the file results innvcc
incorrectly spitting out a dependency on<some-file>
. This results innvcc
when run undernvcc_wrapper
run under ninja to produce a dependency on the file<some-file>
. Apparently this does not happen for any number other than1
. For example, lines with#line 2 <some-file>
do not causenvcc
to print out a bad dependency.Kitware reported this NVIDIA as bug number 2080680 just today. (However, their issue tracker is not public).
The workaround for this is to make the single one-line change:
Also, changing
#line 1 <file-name>
to#line 2 <file-name>
also fixes the problem.Steps to Reproduce
This can be produced, for example, with one of the ATDM Trilinos CUDA configurations described at:
For example, just log onto
hansen
orshiller
orwhite
orride
, clone Trilinos somewhere, and then configure and build with:You can see what is triggering the rebuild using:
See, that file
/scratch/gdsjaar/seacas/packages/seacas/libraries/aprepro_lib/aprepro.ll
is not on this system obviously.Then to fix, just apply the patch shown above, rebuild once and then rebuild again, and you will get:
(Yes, that is ninja evaluating all of the targets to figure out if it needs to build any of the Panzer tests in under 3 sec! That is why we want to be able to use ninja.)
The text was updated successfully, but these errors were encountered: