def main(app_conf, **defaults): parser = argparse.ArgumentParser() # Use power sweep's run args power_sweep.setup_run_args(parser) parser.set_defaults(**defaults) # Change default agent_list (power_sweep runs the governor also) parser.set_defaults(agent_list='power_balancer') args, extra_cli_args = parser.parse_known_args() launch(app_conf=app_conf, args=args, experiment_cli_args=extra_cli_args)
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ''' Run a power sweep with AMG ''' import argparse from experiment.power_sweep import power_sweep from apps.amg import amg if __name__ == '__main__': parser = argparse.ArgumentParser() power_sweep.setup_run_args(parser) args, extra_cli_args = parser.parse_known_args() app_conf = amg.AmgAppConf(args.node_count) power_sweep.launch(app_conf=app_conf, args=args, experiment_cli_args=extra_cli_args)