Avoid recompiling executable if already compiled in previous tests#69
Open
RemiLehe wants to merge 6 commits intoAMReX-Codes:mainfrom
Open
Avoid recompiling executable if already compiled in previous tests#69RemiLehe wants to merge 6 commits intoAMReX-Codes:mainfrom
RemiLehe wants to merge 6 commits intoAMReX-Codes:mainfrom
Conversation
This is done by: - Storing compiled executable into a new "Build" folder - When running a new tests, comparing compiling options to those used in previous tests; it they match, the previous executable is retrieved from the Build folder. Note: this assumes that each executable name is unique ; i.e. that two sets of compiling options cannot produce the same executable name. In order to obtain the string that contains compiling options, part of the function `build_c` was extracted as a separate function
Member
|
I'll test this now |
Member
|
our suite fails if we try to use the new option: |
Member
|
Re: hackathon - this feature is probably the most central one for why we forked. We would love to use mainline again if we can figure this out in a hackathon :) |
Member
|
agreed, we need to find a way to do this without breaking other codes (e.g. Castro) |
10 tasks
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.
Preliminary note
This PR re-opens PR #68, and incorporates several modifications:
avoid_recompiling, deactivated by default) in order to enable or disable the feature implemented in this PR.The description below (which comes from PR#68) has been edited accordingly.
Overview
By default, when performing several tests with
regtest.py, the executable is recompiled from scratch for every test. The compilation time can sometimes dominate the time taken by the tests.This PR proposes the avoid re-compiling the executable, if it was already compiled with the exact same options in a previous test. We are currently using this feature in order to same time in the Travis CI tests for WarpX.
In practice, this is done by:
PreviouslyCompiled, where compiled executable are stored in unique sub-directory (unique to a given a set of compilation options).PreviouslyCompiledfolder.In order to obtain the string that contains compiling options, parts of the function
build_cwas extracted as a separate function. In addition, for convenience, the name of the executable is now stored as an attribute in theTestclass. (This allows the name of executable to be easily retrieved in the case where the executable is not recompiled from scratch.)