Qdo should kill its subordinate qsub more aggressively
[gem5.git] / configs / splash2 / run.py
1 # Copyright (c) 2005 The Regents of The University of Michigan
2 # All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
6 # met: redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer;
8 # redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution;
11 # neither the name of the copyright holders nor the names of its
12 # contributors may be used to endorse or promote products derived from
13 # this software without specific prior written permission.
14 #
15 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #
27 # Authors: Ron Dreslinski
28
29 from m5 import *
30 import Splash2
31
32 if 'SYSTEM' not in env:
33 panic("The SYSTEM environment variable must be set!\ne.g -ESYSTEM=Detailed\n")
34
35 if env['SYSTEM'] == 'Simple':
36 from SimpleConfig import *
37 BaseCPU.workload = Parent.workload
38 SimpleStandAlone.cpu = [ CPU() for i in xrange(int(env['NP'])) ]
39 root = SimpleStandAlone()
40 elif env['SYSTEM'] == 'Detailed':
41 from DetailedConfig import *
42 BaseCPU.workload = Parent.workload
43 DetailedStandAlone.cpu = [ DetailedCPU() for i in xrange(int(env['NP'])) ]
44 root = DetailedStandAlone()
45 else:
46 panic("The SYSTEM environment variable was set to something improper.\n Use Simple or Detailed\n")
47
48 if 'BENCHMARK' not in env:
49 panic("The BENCHMARK environment variable must be set!\ne.g. -EBENCHMARK=Cholesky\n")
50
51 if env['BENCHMARK'] == 'Cholesky':
52 root.workload = Splash2.Cholesky()
53 elif env['BENCHMARK'] == 'FFT':
54 root.workload = Splash2.FFT()
55 elif env['BENCHMARK'] == 'LUContig':
56 root.workload = Splash2.LU_contig()
57 elif env['BENCHMARK'] == 'LUNoncontig':
58 root.workload = Splash2.LU_noncontig()
59 elif env['BENCHMARK'] == 'Radix':
60 root.workload = Splash2.Radix()
61 elif env['BENCHMARK'] == 'Barnes':
62 root.workload = Splash2.Barnes()
63 elif env['BENCHMARK'] == 'FMM':
64 root.workload = Splash2.FMM()
65 elif env['BENCHMARK'] == 'OceanContig':
66 root.workload = Splash2.Ocean_contig()
67 elif env['BENCHMARK'] == 'OceanNoncontig':
68 root.workload = Splash2.Ocean_noncontig()
69 elif env['BENCHMARK'] == 'Raytrace':
70 root.workload = Splash2.Raytrace()
71 elif env['BENCHMARK'] == 'WaterNSquared':
72 root.workload = Splash2.Water_nsquared()
73 elif env['BENCHMARK'] == 'WaterSpatial':
74 root.workload = Splash2.Water_spatial()
75 else:
76 panic("The BENCHMARK environment variable was set to something" \
77 +" improper.\nUse Cholesky, FFT, LUContig, LUNoncontig, Radix" \
78 +", Barnes, FMM, OceanContig,\nOceanNoncontig, Raytrace," \
79 +" WaterNSquared, or WaterSpatial\n")