[Compbench-devel] CompBenchmarks++/SupportedBenchmarks Benchmark-SCIMARK2.cpp, 1.1, 1.2 Benchmark-S
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-01-03 19:04:50
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23543 Modified Files: Benchmark-SCIMARK2.cpp Benchmark-SCIMARK2.h Log Message: CBMPackage and new related API used. Index: Benchmark-SCIMARK2.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-SCIMARK2.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-SCIMARK2.h 28 Dec 2006 17:41:04 -0000 1.1 --- Benchmark-SCIMARK2.h 3 Jan 2007 19:04:46 -0000 1.2 *************** *** 10,18 **** #include <Benchmark/Benchmark.h> /** \brief Defines the scimark2 package. */ ! class CBMBenchmarkSCIMARK2 : public CBMBenchmark { public: --- 10,19 ---- #include <Benchmark/Benchmark.h> + #include <Benchmark/Package.h> /** \brief Defines the scimark2 package. */ ! class CBMPackageSCIMARK2 : public CBMPackage { public: *************** *** 23,27 **** virtual std::string packageName(void); virtual std::string benchmarkName(void) = 0; - virtual std::string benchmarkComments(void); virtual std::string packageVersion(void); --- 24,27 ---- *************** *** 32,41 **** protected: - - CBMBenchmarkSCIMARK2(class CBMSystem *_system); - virtual std::string language(void); - virtual std::string benchmarkSCIMARK2Comments(void) = 0; - virtual std::string scimark2BenchmarkLabel(void) = 0; virtual char* extractDirectory(void); --- 32,36 ---- *************** *** 49,56 **** virtual int make(void); - virtual std::string bench(void); virtual int release(void); public: virtual std::string license(void); virtual std::string homePage(void); --- 44,53 ---- virtual int make(void); virtual int release(void); public: + CBMPackageSCIMARK2(class CBMSystem *_system); + DLPackageWrapper_declare(); + virtual std::string license(void); virtual std::string homePage(void); *************** *** 58,65 **** virtual int benchmarkSize(void); ! virtual ~CBMBenchmarkSCIMARK2(); }; /** \brief Defines the fourier benchmark within scimark2 package. */ --- 55,76 ---- virtual int benchmarkSize(void); ! virtual ~CBMPackageSCIMARK2(); }; + /** \brief Defines abstract benchmark for CBMPackageSCIMARK2 + */ + class CBMBenchmarkSCIMARK2 : public CBMBenchmark + { + protected: + CBMBenchmarkSCIMARK2(CBMPackage *_package); + virtual std::string benchmarkComments(void); + virtual std::string benchmarkSCIMARK2Comments(void) = 0; + virtual std::string scimark2BenchmarkLabel(void) = 0; + virtual std::string bench(void); + virtual ~CBMBenchmarkSCIMARK2(); + }; + + /** \brief Defines the fourier benchmark within scimark2 package. */ *************** *** 73,77 **** public: ! CBMBenchmarkSCIMARK2_FOURIER(class CBMSystem *_system); virtual ~CBMBenchmarkSCIMARK2_FOURIER(); }; --- 84,88 ---- public: ! CBMBenchmarkSCIMARK2_FOURIER(CBMPackage *_package); virtual ~CBMBenchmarkSCIMARK2_FOURIER(); }; *************** *** 88,92 **** public: ! CBMBenchmarkSCIMARK2_SOR(class CBMSystem *_system); virtual ~CBMBenchmarkSCIMARK2_SOR(); }; --- 99,103 ---- public: ! CBMBenchmarkSCIMARK2_SOR(CBMPackage *_package); virtual ~CBMBenchmarkSCIMARK2_SOR(); }; *************** *** 103,107 **** public: ! CBMBenchmarkSCIMARK2_MC(class CBMSystem *_system); virtual ~CBMBenchmarkSCIMARK2_MC(); }; --- 114,118 ---- public: ! CBMBenchmarkSCIMARK2_MC(CBMPackage *_package); virtual ~CBMBenchmarkSCIMARK2_MC(); }; *************** *** 118,122 **** public: ! CBMBenchmarkSCIMARK2_SMM(class CBMSystem *_system); virtual ~CBMBenchmarkSCIMARK2_SMM(); }; --- 129,133 ---- public: ! CBMBenchmarkSCIMARK2_SMM(CBMPackage *_package); virtual ~CBMBenchmarkSCIMARK2_SMM(); }; *************** *** 133,141 **** public: ! CBMBenchmarkSCIMARK2_LU(class CBMSystem *_system); virtual ~CBMBenchmarkSCIMARK2_LU(); }; ! lib_declare(); #endif --- 144,152 ---- public: ! CBMBenchmarkSCIMARK2_LU(CBMPackage *_package); virtual ~CBMBenchmarkSCIMARK2_LU(); }; ! DLdeclare(); #endif Index: Benchmark-SCIMARK2.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-SCIMARK2.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-SCIMARK2.cpp 28 Dec 2006 17:41:04 -0000 1.1 --- Benchmark-SCIMARK2.cpp 3 Jan 2007 19:04:46 -0000 1.2 *************** *** 6,75 **** #include <SupportedBenchmarks/Benchmark-SCIMARK2.libwrapper.h> ! CBMBenchmarkSCIMARK2::CBMBenchmarkSCIMARK2(CBMSystem *_system) ! : CBMBenchmark(_system) { } ! std::string CBMBenchmarkSCIMARK2::downloadURL(void) { return("http://math.nist.gov/scimark2/scimark2_1c.zip"); } ! std::string CBMBenchmarkSCIMARK2::expectedMD5(void) { return("6cc8d6d5312a07e32316c03580e0206b"); } ! std::string CBMBenchmarkSCIMARK2::packageName(void) { return("scimark2"); } ! std::string CBMBenchmarkSCIMARK2::benchmarkComments(void) ! { ! std::string comment; ! ! comment+=benchmarkSCIMARK2Comments(); ! comment+=" (Comment from http://math.nist.gov/scimark2/about.html)"; ! ! return(comment); ! } ! ! std::string CBMBenchmarkSCIMARK2::packageVersion(void) { return("2.0"); } ! int CBMBenchmarkSCIMARK2::packageSize(void) { return(13792); } ! std::string CBMBenchmarkSCIMARK2::packageComments(void) { return("Official SciMark 2.0 package. Yet, a minor patch held locally is applied by benchmark suite."); } ! std::string CBMBenchmarkSCIMARK2::localPackageName(void) { return("scimark2_1c.zip"); } ! std::string CBMBenchmarkSCIMARK2::language(void) { return("C"); } ! char* CBMBenchmarkSCIMARK2::extractDirectory(void) { return("scimark2"); } ! int CBMBenchmarkSCIMARK2::hasPatch(void) { return(1); } ! int CBMBenchmarkSCIMARK2::patch(int _force) { std::string cmd; --- 6,65 ---- #include <SupportedBenchmarks/Benchmark-SCIMARK2.libwrapper.h> ! CBMPackageSCIMARK2::CBMPackageSCIMARK2(CBMSystem *_system) ! : CBMPackage(_system) { } ! std::string CBMPackageSCIMARK2::downloadURL(void) { return("http://math.nist.gov/scimark2/scimark2_1c.zip"); } ! std::string CBMPackageSCIMARK2::expectedMD5(void) { return("6cc8d6d5312a07e32316c03580e0206b"); } ! std::string CBMPackageSCIMARK2::packageName(void) { return("scimark2"); } ! std::string CBMPackageSCIMARK2::packageVersion(void) { return("2.0"); } ! int CBMPackageSCIMARK2::packageSize(void) { return(13792); } ! std::string CBMPackageSCIMARK2::packageComments(void) { return("Official SciMark 2.0 package. Yet, a minor patch held locally is applied by benchmark suite."); } ! std::string CBMPackageSCIMARK2::localPackageName(void) { return("scimark2_1c.zip"); } ! std::string CBMPackageSCIMARK2::language(void) { return("C"); } ! char* CBMPackageSCIMARK2::extractDirectory(void) { return("scimark2"); } ! int CBMPackageSCIMARK2::hasPatch(void) { return(1); } ! int CBMPackageSCIMARK2::patch(int _force) { std::string cmd; *************** *** 97,101 **** } ! int CBMBenchmarkSCIMARK2::extract(int _force) { std::string localFile = localPackageAbsoluteName(); --- 87,91 ---- } ! int CBMPackageSCIMARK2::extract(int _force) { std::string localFile = localPackageAbsoluteName(); *************** *** 121,130 **** } ! int CBMBenchmarkSCIMARK2::preConfigure(int _force) { return(1); } ! int CBMBenchmarkSCIMARK2::configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { --- 111,120 ---- } ! int CBMPackageSCIMARK2::preConfigure(int _force) { return(1); } ! int CBMPackageSCIMARK2::configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { *************** *** 132,136 **** } ! int CBMBenchmarkSCIMARK2::make(void) { std::string cmd; --- 122,126 ---- } ! int CBMPackageSCIMARK2::make(void) { std::string cmd; *************** *** 170,198 **** } ! std::string CBMBenchmarkSCIMARK2::bench(void) ! { ! std::string cmd; ! std::string result; ! ! cmd="cd "; ! cmd+=localPackageAbsoluteDirectory(); ! cmd+=" && echo $(./scimark2 "; ! cmd+=scimark2BenchmarkLabel(); ! cmd+=" | "; ! cmd+=CBM_PROG_GREP; ! cmd+=" '^CompBenchmarks:"; ! cmd+="' | "; ! cmd+=CBM_PROG_CUT; ! cmd+=" -f2 -d':')"; ! ! if (system->exec(cmd, result)==0) { ! return(result); ! } else { ! return("0"); ! } ! ! } ! ! int CBMBenchmarkSCIMARK2::release(void) { std::string cmd; --- 160,164 ---- } ! int CBMPackageSCIMARK2::release(void) { std::string cmd; *************** *** 208,237 **** } ! std::string CBMBenchmarkSCIMARK2::license(void) { return("Not specified"); } ! std::string CBMBenchmarkSCIMARK2::homePage(void) { return("http://math.nist.gov/scimark/"); } ! std::string CBMBenchmarkSCIMARK2::author(void) { return("Roldan Pozo & Bruce R Miller"); } ! int CBMBenchmarkSCIMARK2::benchmarkSize(void) { return(packageSize()); } CBMBenchmarkSCIMARK2::~CBMBenchmarkSCIMARK2() { } ! CBMBenchmarkSCIMARK2_FOURIER::CBMBenchmarkSCIMARK2_FOURIER(CBMSystem *_system) ! : CBMBenchmarkSCIMARK2(_system) { } --- 174,250 ---- } ! std::string CBMPackageSCIMARK2::license(void) { return("Not specified"); } ! std::string CBMPackageSCIMARK2::homePage(void) { return("http://math.nist.gov/scimark/"); } ! std::string CBMPackageSCIMARK2::author(void) { return("Roldan Pozo & Bruce R Miller"); } ! int CBMPackageSCIMARK2::benchmarkSize(void) { return(packageSize()); } + CBMPackageSCIMARK2::~CBMPackageSCIMARK2() + { + } + + + + + CBMBenchmarkSCIMARK2::CBMBenchmarkSCIMARK2(CBMPackage *_package) + : CBMBenchmark(_package) + { + } + + std::string CBMBenchmarkSCIMARK2::benchmarkComments(void) + { + std::string comment; + + comment+=benchmarkSCIMARK2Comments(); + comment+=" (Comment from http://math.nist.gov/scimark2/about.html)"; + + return(comment); + } + + std::string CBMBenchmarkSCIMARK2::bench(void) + { + std::string cmd; + std::string result; + + cmd="cd "; + cmd+=package->localPackageAbsoluteDirectory(); + cmd+=" && echo $(./scimark2 "; + cmd+=scimark2BenchmarkLabel(); + cmd+=" | "; + cmd+=CBM_PROG_GREP; + cmd+=" '^CompBenchmarks:"; + cmd+="' | "; + cmd+=CBM_PROG_CUT; + cmd+=" -f2 -d':')"; + + if (System()->exec(cmd, result)==0) { + return(result); + } else { + return("0"); + } + + } + CBMBenchmarkSCIMARK2::~CBMBenchmarkSCIMARK2() { } ! ! CBMBenchmarkSCIMARK2_FOURIER::CBMBenchmarkSCIMARK2_FOURIER(CBMPackage *_package) ! : CBMBenchmarkSCIMARK2(_package) { } *************** *** 264,269 **** } ! CBMBenchmarkSCIMARK2_SOR::CBMBenchmarkSCIMARK2_SOR(CBMSystem *_system) ! : CBMBenchmarkSCIMARK2(_system) { } --- 277,282 ---- } ! CBMBenchmarkSCIMARK2_SOR::CBMBenchmarkSCIMARK2_SOR(CBMPackage *_package) ! : CBMBenchmarkSCIMARK2(_package) { } *************** *** 296,301 **** } ! CBMBenchmarkSCIMARK2_MC::CBMBenchmarkSCIMARK2_MC(CBMSystem *_system) ! : CBMBenchmarkSCIMARK2(_system) { } --- 309,314 ---- } ! CBMBenchmarkSCIMARK2_MC::CBMBenchmarkSCIMARK2_MC(CBMPackage *_package) ! : CBMBenchmarkSCIMARK2(_package) { } *************** *** 328,333 **** } ! CBMBenchmarkSCIMARK2_SMM::CBMBenchmarkSCIMARK2_SMM(CBMSystem *_system) ! : CBMBenchmarkSCIMARK2(_system) { } --- 341,346 ---- } ! CBMBenchmarkSCIMARK2_SMM::CBMBenchmarkSCIMARK2_SMM(CBMPackage *_package) ! : CBMBenchmarkSCIMARK2(_package) { } *************** *** 357,362 **** } ! CBMBenchmarkSCIMARK2_LU::CBMBenchmarkSCIMARK2_LU(CBMSystem *_system) ! : CBMBenchmarkSCIMARK2(_system) { } --- 370,375 ---- } ! CBMBenchmarkSCIMARK2_LU::CBMBenchmarkSCIMARK2_LU(CBMPackage *_package) ! : CBMBenchmarkSCIMARK2(_package) { } |