Exemple #1
0
    def test_addPathscaleOptimizationGroup01(self):
        compilerGroup = overrides.OverrideGroup()

        groups = []
        groups.append(compilerGroup)

        profiler.addPathscaleOptimizationGroup(groups, compilerGroup)
        self.assertEquals(len(groups), 1, "profiler.addPathscaleOptimizationGroup should not have added any more groups")
Exemple #2
0
    def test_addPathscaleOptimizationGroup01(self):
        compilerGroup = overrides.OverrideGroup()

        groups = []
        groups.append(compilerGroup)

        profiler.addPathscaleOptimizationGroup(groups, compilerGroup)
        self.assertEquals(
            len(groups), 1,
            "profiler.addPathscaleOptimizationGroup should not have added any more groups"
        )
Exemple #3
0
    def test_addPathscaleOptimizationGroup02(self):
        compilerGroup = overrides.OverrideGroup()
        compilerGroup.compiler = "PATHSCALE"
        compilerGroup.optimization = "*"
        compilerGroup.parallel = "*"
        compilerGroup["ccompiler"] = "pathcc"
        compilerGroup["cxxcompiler"] = "pathCC"
        compilerGroup["cpreprocessor"] = "cpp"
        compilerGroup["fcompiler"] = "pathf95"
        compilerGroup["f77compiler"] = "pathf95"

        groups = []
        groups.append(compilerGroup)

        profiler.addPathscaleOptimizationGroup(groups, compilerGroup)
        self.assertEquals(len(groups), 3, "profiler.addPathscaleOptimizationGroup should have added 2 more groups")
        self.assertEquals(groups[0].compiler, "PATHSCALE", "profiler.addPathscaleOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0].optimization, "*", "profiler.addPathscaleOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0].parallel, "*", "profiler.addPathscaleOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["ccompiler"], "pathcc", "profiler.addPathscaleOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["cxxcompiler"], "pathCC", "profiler.addPathscaleOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["cpreprocessor"], "cpp", "profiler.addPathscaleOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["fcompiler"], "pathf95", "profiler.addPathscaleOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["f77compiler"], "pathf95", "profiler.addPathscaleOptimizationGroup should not have altered this value")

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

        pathReleaseFlags = "-O2 -Wall"
        self.assertEquals(groups[2].compiler, "PATHSCALE", "profiler.addPathscaleOptimizationGroup returned wrong value")
        self.assertEquals(groups[2].optimization, "release", "profiler.addPathscaleOptimizationGroup returned wrong value")
        self.assertEquals(groups[2].parallel, "*", "profiler.addPathscaleOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["cflags"], pathReleaseFlags, "profiler.addPathscaleOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["cxxflags"], pathReleaseFlags, "profiler.addPathscaleOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["cppflags"], "-Wall", "profiler.addPathscaleOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["fflags"], pathReleaseFlags, "profiler.addPathscaleOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["f77flags"], pathReleaseFlags, "profiler.addPathscaleOptimizationGroup returned wrong value")
Exemple #4
0
    def test_addPathscaleOptimizationGroup02(self):
        compilerGroup = overrides.OverrideGroup()
        compilerGroup.compiler = "PATHSCALE"
        compilerGroup.optimization = "*"
        compilerGroup.parallel = "*"
        compilerGroup["ccompiler"] = "pathcc"
        compilerGroup["cxxcompiler"] = "pathCC"
        compilerGroup["cpreprocessor"] = "cpp"
        compilerGroup["fcompiler"] = "pathf95"
        compilerGroup["f77compiler"] = "pathf95"

        groups = []
        groups.append(compilerGroup)

        profiler.addPathscaleOptimizationGroup(groups, compilerGroup)
        self.assertEquals(
            len(groups), 3,
            "profiler.addPathscaleOptimizationGroup should have added 2 more groups"
        )
        self.assertEquals(
            groups[0].compiler, "PATHSCALE",
            "profiler.addPathscaleOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0].optimization, "*",
            "profiler.addPathscaleOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0].parallel, "*",
            "profiler.addPathscaleOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["ccompiler"], "pathcc",
            "profiler.addPathscaleOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["cxxcompiler"], "pathCC",
            "profiler.addPathscaleOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["cpreprocessor"], "cpp",
            "profiler.addPathscaleOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["fcompiler"], "pathf95",
            "profiler.addPathscaleOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["f77compiler"], "pathf95",
            "profiler.addPathscaleOptimizationGroup should not have altered this value"
        )

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

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