run.py revision 1693
11693Sstever@eecs.umich.edu# Copyright (c) 2005 The Regents of The University of Michigan 21693Sstever@eecs.umich.edu# All rights reserved. 31693Sstever@eecs.umich.edu# 41693Sstever@eecs.umich.edu# Redistribution and use in source and binary forms, with or without 51693Sstever@eecs.umich.edu# modification, are permitted provided that the following conditions are 61693Sstever@eecs.umich.edu# met: redistributions of source code must retain the above copyright 71693Sstever@eecs.umich.edu# notice, this list of conditions and the following disclaimer; 81693Sstever@eecs.umich.edu# redistributions in binary form must reproduce the above copyright 91693Sstever@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the 101693Sstever@eecs.umich.edu# documentation and/or other materials provided with the distribution; 111693Sstever@eecs.umich.edu# neither the name of the copyright holders nor the names of its 121693Sstever@eecs.umich.edu# contributors may be used to endorse or promote products derived from 131693Sstever@eecs.umich.edu# this software without specific prior written permission. 141693Sstever@eecs.umich.edu# 151693Sstever@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 161693Sstever@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 171693Sstever@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 181693Sstever@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 191693Sstever@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 201693Sstever@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 211693Sstever@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 221693Sstever@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 231693Sstever@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 241693Sstever@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 251693Sstever@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 261693Sstever@eecs.umich.edu# 271693Sstever@eecs.umich.edu# Authors: Ron Dreslinski 281693Sstever@eecs.umich.edu 291693Sstever@eecs.umich.edufrom m5 import * 301516SN/Aimport Splash2 311516SN/A 321516SN/Aif 'SYSTEM' not in env: 331516SN/A panic("The SYSTEM environment variable must be set!\ne.g -ESYSTEM=Detailed\n") 341516SN/A 351516SN/Aif env['SYSTEM'] == 'Simple': 361516SN/A from SimpleConfig import * 371569SN/A BaseCPU.workload = parent.workload 381516SN/A SimpleStandAlone.cpu = [ CPU() for i in xrange(int(env['NP'])) ] 391516SN/A root = SimpleStandAlone 401516SN/Aelif env['SYSTEM'] == 'Detailed': 411516SN/A from DetailedConfig import * 421569SN/A BaseCPU.workload = parent.workload 431516SN/A DetailedStandAlone.cpu = [ DetailedCPU() for i in xrange(int(env['NP'])) ] 441516SN/A root = DetailedStandAlone 451516SN/Aelse: 461516SN/A panic("The SYSTEM environment variable was set to something improper.\n Use Simple or Detailed\n") 471516SN/A 481516SN/Aif 'BENCHMARK' not in env: 491516SN/A panic("The BENCHMARK environment variable must be set!\ne.g. -EBENCHMARK=Cholesky\n") 501516SN/A 511516SN/Aif env['BENCHMARK'] == 'Cholesky': 521516SN/A root.workload = Splash2.Cholesky() 531516SN/Aelif env['BENCHMARK'] == 'FFT': 541516SN/A root.workload = Splash2.FFT() 551516SN/Aelif env['BENCHMARK'] == 'LUContig': 561516SN/A root.workload = Splash2.LU_contig() 571516SN/Aelif env['BENCHMARK'] == 'LUNoncontig': 581516SN/A root.workload = Splash2.LU_noncontig() 591516SN/Aelif env['BENCHMARK'] == 'Radix': 601516SN/A root.workload = Splash2.Radix() 611516SN/Aelif env['BENCHMARK'] == 'Barnes': 621516SN/A root.workload = Splash2.Barnes() 631516SN/Aelif env['BENCHMARK'] == 'FMM': 641516SN/A root.workload = Splash2.FMM() 651516SN/Aelif env['BENCHMARK'] == 'OceanContig': 661516SN/A root.workload = Splash2.Ocean_contig() 671516SN/Aelif env['BENCHMARK'] == 'OceanNoncontig': 681516SN/A root.workload = Splash2.Ocean_noncontig() 691516SN/Aelif env['BENCHMARK'] == 'Raytrace': 701516SN/A root.workload = Splash2.Raytrace() 711516SN/Aelif env['BENCHMARK'] == 'WaterNSquared': 721516SN/A root.workload = Splash2.Water_nsquared() 731516SN/Aelif env['BENCHMARK'] == 'WaterSpatial': 741516SN/A root.workload = Splash2.Water_spatial() 751516SN/Aelse: 761516SN/A panic("The BENCHMARK environment variable was set to something" \ 771516SN/A +" improper.\nUse Cholesky, FFT, LUContig, LUNoncontig, Radix" \ 781516SN/A +", Barnes, FMM, OceanContig,\nOceanNoncontig, Raytrace," \ 791516SN/A +" WaterNSquared, or WaterSpatial\n") 80