Repository navigation
Compiler: GenericGaussDeriv.cc lists the instances used by all generator workers - #465
Merged
Merged
Conversation
CR_DerivGauss_GenericInstantiator records the instances of the generic GenericGaussDeriv kernel used by the generated code and writes GenericGaussDeriv.cc when the generator exits. With LIBINT_GENERATOR_JOBS > 1 the code is generated by the workers, which exit without running the destructors, hence the instances were lost: the library of a configuration with LIBINT2_ENABLE_GENERIC_CODE=ON and derivatives beyond LIBINT2_OPT_AM (e.g. the standard release tarball) had no GenericGaussDeriv.cc and failed to link. The workers now report the instances to the parent. CI: one lane enables LIBINT2_ENABLE_GENERIC_CODE with LIBINT2_OPT_AM=1, so that the generic kernels are built and tested, and libint2/compiler/codegen_order checks that generating them in parallel gives the same source; no lane did.
… with a list LIBINT2_MAX_AM int_am.cmake rejected a scalar LIBINT2_OPT_AM with a list LIBINT2_MAX_AM, although the generator handles it (the per-derivative tasks without their own value use the default OPT_AM). Only a list of a different length is invalid. The generic-code CI lane uses LIBINT2_OPT_AM=1 again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The 2.14.0 standard tarball (
MAX_AM=6,OPT_AM=3,ENABLE_GENERIC_CODE=ON), generated withLIBINT2_GENERATOR_JOBS=0now that #464 restored the option, fails to link all its tests:CR_DerivGauss_GenericInstantiatorrecords which instances of the genericGenericGaussDerivkernel the generated code uses, and its destructor writesGenericGaussDeriv.ccwhen the generator exits. Since #455 that code is generated by worker processes, which exit with_exit()and so never run the destructors. The parent recorded no instances, so the tarball had noGenericGaussDeriv.ccat all.No CI lane enables
LIBINT2_ENABLE_GENERIC_CODE, so neither the generic kernels norlibint2/compiler/codegen_order's serial-vs-parallel comparison of them ever ran in CI. Blocks 2.14.0.What
GenericGaussDeriv.cc.CR_DerivGauss_GenericInstantiator::instances()exposes the set.LIBINT2_ENABLE_GENERIC_CODE=ONandLIBINT2_OPT_AM=1. Generic kernels are then built and tested for the d shells, andcheck-libint2compilerchecks that generating them in parallel gives the same source.Testing
Generated the standard tarball's configuration serially (
LIBINT_GENERATOR_JOBS=1) and in parallel (=0):GenericGaussDeriv.cc;GenericGaussDeriv.cchas the same 7 instances (L = 0, 7–12).