Example #1
0
    def test_addIntelOptimizationGroup01(self):
        compilerGroup = overrides.OverrideGroup()

        groups = []
        groups.append(compilerGroup)

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

        groups = []
        groups.append(compilerGroup)

        profiler.addIntelOptimizationGroup(groups, compilerGroup)
        self.assertEquals(
            len(groups), 1,
            "profiler.addIntelOptimizationGroup should not have added any more groups"
        )
Example #3
0
    def test_addIntelOptimizationGroup02(self):
        compilerGroup = overrides.OverrideGroup()
        compilerGroup.compiler = "INTEL"
        compilerGroup.optimization = "*"
        compilerGroup.parallel = "*"
        compilerGroup["ccompiler"] = "icc"
        compilerGroup["cxxcompiler"] = "icc"
        compilerGroup["cpreprocessor"] = "cpp"
        compilerGroup["fcompiler"] = "ifort"
        compilerGroup["f77compiler"] = "ifc"

        groups = []
        groups.append(compilerGroup)

        profiler.addIntelOptimizationGroup(groups, compilerGroup)
        self.assertEquals(len(groups), 3, "profiler.addIntelOptimizationGroup should have added 2 more groups")
        self.assertEquals(groups[0].compiler, "INTEL", "profiler.addIntelOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0].optimization, "*", "profiler.addIntelOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0].parallel, "*", "profiler.addIntelOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["ccompiler"], "icc", "profiler.addIntelOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["cxxcompiler"], "icc", "profiler.addIntelOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["cpreprocessor"], "cpp", "profiler.addIntelOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["fcompiler"], "ifort", "profiler.addIntelOptimizationGroup should not have altered this value")
        self.assertEquals(groups[0]["f77compiler"], "ifc", "profiler.addIntelOptimizationGroup should not have altered this value")

        iccDebugFlags = "-debug full -O0 -Wall"
        self.assertEquals(groups[1].compiler, "INTEL", "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[1].optimization, "debug", "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[1].parallel, "*", "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[1]["cflags"], iccDebugFlags, "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[1]["cxxflags"], iccDebugFlags, "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[1]["cppflags"], "-Wall", "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[1]["fflags"], "-O0 -warn all", "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[1]["f77flags"], "-O0 -warn all", "profiler.addIntelOptimizationGroup returned wrong value")

        iccReleaseFlags = "-debug none -O2 -Wall"
        self.assertEquals(groups[2].compiler, "INTEL", "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[2].optimization, "release", "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[2].parallel, "*", "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["cflags"], iccReleaseFlags, "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["cxxflags"], iccReleaseFlags, "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["cppflags"], "-Wall", "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["fflags"], "-O2 -warn all", "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(groups[2]["f77flags"], "-O2 -warn all", "profiler.addIntelOptimizationGroup returned wrong value")
Example #4
0
    def test_addIntelOptimizationGroup02(self):
        compilerGroup = overrides.OverrideGroup()
        compilerGroup.compiler = "INTEL"
        compilerGroup.optimization = "*"
        compilerGroup.parallel = "*"
        compilerGroup["ccompiler"] = "icc"
        compilerGroup["cxxcompiler"] = "icc"
        compilerGroup["cpreprocessor"] = "cpp"
        compilerGroup["fcompiler"] = "ifort"
        compilerGroup["f77compiler"] = "ifc"

        groups = []
        groups.append(compilerGroup)

        profiler.addIntelOptimizationGroup(groups, compilerGroup)
        self.assertEquals(
            len(groups), 3,
            "profiler.addIntelOptimizationGroup should have added 2 more groups"
        )
        self.assertEquals(
            groups[0].compiler, "INTEL",
            "profiler.addIntelOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0].optimization, "*",
            "profiler.addIntelOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0].parallel, "*",
            "profiler.addIntelOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["ccompiler"], "icc",
            "profiler.addIntelOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["cxxcompiler"], "icc",
            "profiler.addIntelOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["cpreprocessor"], "cpp",
            "profiler.addIntelOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["fcompiler"], "ifort",
            "profiler.addIntelOptimizationGroup should not have altered this value"
        )
        self.assertEquals(
            groups[0]["f77compiler"], "ifc",
            "profiler.addIntelOptimizationGroup should not have altered this value"
        )

        iccDebugFlags = "-debug full -O0 -Wall"
        self.assertEquals(
            groups[1].compiler, "INTEL",
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1].optimization, "debug",
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1].parallel, "*",
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1]["cflags"], iccDebugFlags,
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1]["cxxflags"], iccDebugFlags,
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1]["cppflags"], "-Wall",
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1]["fflags"], "-O0 -warn all",
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[1]["f77flags"], "-O0 -warn all",
            "profiler.addIntelOptimizationGroup returned wrong value")

        iccReleaseFlags = "-debug none -O2 -Wall"
        self.assertEquals(
            groups[2].compiler, "INTEL",
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2].optimization, "release",
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2].parallel, "*",
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2]["cflags"], iccReleaseFlags,
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2]["cxxflags"], iccReleaseFlags,
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2]["cppflags"], "-Wall",
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2]["fflags"], "-O2 -warn all",
            "profiler.addIntelOptimizationGroup returned wrong value")
        self.assertEquals(
            groups[2]["f77flags"], "-O2 -warn all",
            "profiler.addIntelOptimizationGroup returned wrong value")