예제 #1
0
    def test_addPortlandGroupOptimizationGroup01(self):
        compilerGroup = overrides.OverrideGroup()

        groups = []
        groups.append(compilerGroup)

        profiler.addPortlandGroupOptimizationGroup(groups, compilerGroup)
        self.assertEquals(len(groups), 1, "profiler.addPortlandGroupOptimizationGroup should not have added any more groups")
예제 #2
0
    def test_addPortlandGroupOptimizationGroup01(self):
        compilerGroup = overrides.OverrideGroup()

        groups = []
        groups.append(compilerGroup)

        profiler.addPortlandGroupOptimizationGroup(groups, compilerGroup)
        self.assertEquals(
            len(groups), 1,
            "profiler.addPortlandGroupOptimizationGroup should not have added any more groups"
        )
예제 #3
0
    def test_addPortlandGroupOptimizationGroup02(self):
        compilerGroup = overrides.OverrideGroup()
        compilerGroup.compiler = "PORTLANDGROUP"
        compilerGroup.optimization = "*"
        compilerGroup.parallel = "*"
        compilerGroup["ccompiler"] = "pgcc"
        compilerGroup["cxxcompiler"] = "pgCC"
        compilerGroup["cpreprocessor"] = "cpp"
        compilerGroup["fcompiler"] = "pgf95"
        compilerGroup["f77compiler"] = "pgf77"

        groups = []
        groups.append(compilerGroup)

        profiler.addPortlandGroupOptimizationGroup(groups, compilerGroup)
        self.assertEquals(len(groups), 3, "profiler.addPortlandGroupOptimizationGroup should have added 2 more groups")
        self.assertEquals(groups[0].compiler, "PORTLANDGROUP", "profiler.addPortlandGroupOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0].optimization, "*", "profiler.addPortlandGroupOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0].parallel, "*", "profiler.addPortlandGroupOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["ccompiler"], "pgcc", "profiler.addPortlandGroupOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["cxxcompiler"], "pgCC", "profiler.addPortlandGroupOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["cpreprocessor"], "cpp", "profiler.addPortlandGroupOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["fcompiler"], "pgf95", "profiler.addPortlandGroupOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["f77compiler"], "pgf77", "profiler.addPortlandGroupOptimizationGroup should not have altered this value")

        portlandDebugFlags = "-g -O0"
        self.assertEquals(groups[1].compiler, "PORTLANDGROUP", "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[1].optimization, "debug", "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[1].parallel, "*", "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[1]["cflags"], portlandDebugFlags, "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[1]["cxxflags"], portlandDebugFlags, "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[1]["cppflags"], "-Wall", "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[1]["fflags"], portlandDebugFlags, "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[1]["f77flags"], portlandDebugFlags, "profiler.addPortlandGroupOptimizationGroup returned wrong value")

        portlandReleaseFlags = "-O2"
        self.assertEquals(groups[2].compiler, "PORTLANDGROUP", "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[2].optimization, "release", "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[2].parallel, "*", "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["cflags"], portlandReleaseFlags, "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["cxxflags"], portlandReleaseFlags, "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["cppflags"], "-Wall", "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["fflags"], portlandReleaseFlags, "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["f77flags"], portlandReleaseFlags, "profiler.addPortlandGroupOptimizationGroup returned wrong value")
예제 #4
0
    def test_addPortlandGroupOptimizationGroup02(self):
        compilerGroup = overrides.OverrideGroup()
        compilerGroup.compiler = "PORTLANDGROUP"
        compilerGroup.optimization = "*"
        compilerGroup.parallel = "*"
        compilerGroup["ccompiler"] = "pgcc"
        compilerGroup["cxxcompiler"] = "pgCC"
        compilerGroup["cpreprocessor"] = "cpp"
        compilerGroup["fcompiler"] = "pgf95"
        compilerGroup["f77compiler"] = "pgf77"

        groups = []
        groups.append(compilerGroup)

        profiler.addPortlandGroupOptimizationGroup(groups, compilerGroup)
        self.assertEquals(
            len(groups), 3,
            "profiler.addPortlandGroupOptimizationGroup should have added 2 more groups"
        )
        self.assertEquals(
            groups[0].compiler, "PORTLANDGROUP",
            "profiler.addPortlandGroupOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0].optimization, "*",
            "profiler.addPortlandGroupOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0].parallel, "*",
            "profiler.addPortlandGroupOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["ccompiler"], "pgcc",
            "profiler.addPortlandGroupOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["cxxcompiler"], "pgCC",
            "profiler.addPortlandGroupOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["cpreprocessor"], "cpp",
            "profiler.addPortlandGroupOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["fcompiler"], "pgf95",
            "profiler.addPortlandGroupOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["f77compiler"], "pgf77",
            "profiler.addPortlandGroupOptimizationGroup should not have altered this value"
        )

        portlandDebugFlags = "-g -O0"
        self.assertEquals(
            groups[1].compiler, "PORTLANDGROUP",
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1].optimization, "debug",
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1].parallel, "*",
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1]["cflags"], portlandDebugFlags,
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1]["cxxflags"], portlandDebugFlags,
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1]["cppflags"], "-Wall",
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1]["fflags"], portlandDebugFlags,
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1]["f77flags"], portlandDebugFlags,
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")

        portlandReleaseFlags = "-O2"
        self.assertEquals(
            groups[2].compiler, "PORTLANDGROUP",
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2].optimization, "release",
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2].parallel, "*",
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2]["cflags"], portlandReleaseFlags,
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2]["cxxflags"], portlandReleaseFlags,
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2]["cppflags"], "-Wall",
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2]["fflags"], portlandReleaseFlags,
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2]["f77flags"], portlandReleaseFlags,
            "profiler.addPortlandGroupOptimizationGroup returned wrong value")