-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
NVHPC takes >10 minutes to compile params.cpp
#922
Comments
I have not observed this, but I suspect I know what it is. |
I can verify it's present in Parthenon proper when using the Kokkos That said, it's definitely a compiler issue at its core. Going to try splitting up the file next as @Yurlungur suggested, but maybe we should also think about simplifying it so we don't have two processes both trying to chew on these templates? |
If you can figure out a way to simplify that templated code, by all means. I think there's some necessary complexity here, though. We're basically compiling the same function a bunch of times for different types for input/output data for file IO. So there's just a lot of code for the compiler to get through. It might be possible to move some of the code out of the lowest level functions in the header file into implementation files maybe? But I don't see any obvious wins there. |
Just tried to compile with NVHPC/NVC++ 23.9 and... it segfaults. The crash is in cpp2 as you might expect, when processing |
Looks like nvc++ is now officially a supported compiler for Kokkos 4 (https://kokkos.github.io/kokkos-core-wiki/requirements.html#kokkos-4-x) though I'm not sure if this is for host or device code. |
This issue has gotten worse (>30min compiles with NVHPC 22.11 and above, which may as well be a compile error). It doesn't disappear even if I place
around the entire file to prevent device compilation (though it seems to help a bit?) so it's at least partially host-side as long as nvcc is the wrapper doing the processing (FWIW placing It's also starting to be a problem in GCC-based compiles with recent versions (on the now quaint order of 8-10 minute compiles), and it seems to be the long pole in all Parthenon compiles even with LLVM-based compilers. So, I'm bumping this: if anyone has simple modifications to |
When compiling Parthenon with NVHPC (every version, machine, host & target architecture I tested), the compiler takes a very long time on one specific file,
params.cpp
. In my testing it adds about ~10 minutes to the compile on both desktop & HPC machines, all of which is spent solely compling this one file on one core, mostly in thecpp2
subprogram.The compiler is also pretty slow with some other later-stage Parthenon files (e.g.
metadata.cpp
), butparams.cpp
is by far the worst. This appears to be due to a change within the last ~8mo and likely on the more recent side of that, since previous versions I've used with KHARMA do not show this behavior with any NVHPC version. Now that I've tested enough to know it's present in all versions of NVHPC, I'll be bisecting locally and hopefully isolate the relevant commit.Just wanted to check whether others have seen similar behavior, and if so whether it's worth surfacing to Nvidia.
The text was updated successfully, but these errors were encountered: