Thread: [Compbench-devel] CompBenchmarks++/SupportedBenchmarks Benchmark-LINPACKC.cpp, 1.3, 1.4
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-01-11 20:10:01
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv16251 Modified Files: Benchmark-LINPACKC.cpp Log Message: Uses CBMPackageAutotools. New tarball referenced. Index: Benchmark-LINPACKC.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-LINPACKC.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-LINPACKC.cpp 3 Jan 2007 22:06:27 -0000 1.3 --- Benchmark-LINPACKC.cpp 11 Jan 2007 20:09:54 -0000 1.4 *************** *** 5,12 **** #include <SupportedBenchmarks/Benchmark-LINPACKC.libwrapper.h> - // !!! CBMPackageLINPACKC::CBMPackageLINPACKC(CBMSystem *_system) ! : CBMPackage(_system) { } --- 5,11 ---- #include <SupportedBenchmarks/Benchmark-LINPACKC.libwrapper.h> CBMPackageLINPACKC::CBMPackageLINPACKC(CBMSystem *_system) ! : CBMPackageAutotools(_system) { } *************** *** 14,23 **** std::string CBMPackageLINPACKC::downloadURL(void) { ! return("http://www.netlib.org/benchmark/linpackc"); } std::string CBMPackageLINPACKC::expectedMD5(void) { ! return("f6e06f98fdbf7e39f84aa9e6c04de131"); } --- 13,22 ---- std::string CBMPackageLINPACKC::downloadURL(void) { ! return("http://downloads.sourceforge.net/compbench/cbm-bm-linpackc-0.1.1.tar.gz"); } std::string CBMPackageLINPACKC::expectedMD5(void) { ! return("0fe702b78af01716a0ed1b3f5d05ac89"); } *************** *** 29,65 **** std::string CBMPackageLINPACKC::packageVersion(void) { ! return("02-25-1994"); } int CBMPackageLINPACKC::packageSize(void) { ! return(907); ! } ! ! int CBMPackageLINPACKC::ContextMatches(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) ! { ! std::string localFlags; ! std::string previousFlags; ! ! int r = CBMPackage::ContextMatches(_currentCompiler, ! _currentOptions); ! ! if (!r) { ! return(0); ! } ! ! localFlags=linpackPrecisionFlags(); ! localFlags+=" "; ! localFlags+=linpackRollFlags(); ! ! previousFlags=System()->read("linpackc-localflags"); ! ! if ((previousFlags==localFlags) && ! (getStatus()>=Made)) { ! return(1); ! } else { ! return(0); ! } } --- 28,37 ---- std::string CBMPackageLINPACKC::packageVersion(void) { ! return("0.1.0"); } int CBMPackageLINPACKC::packageSize(void) { ! return(75029); } *************** *** 67,76 **** std::string CBMPackageLINPACKC::packageComments(void) { ! return("Official linpackc benchmark translated to C by Bonnie Toy. A minor patch is applied."); } std::string CBMPackageLINPACKC::localPackageName(void) { ! return("linpackc.c"); } --- 39,48 ---- std::string CBMPackageLINPACKC::packageComments(void) { ! return("Official linpackc benchmark translated to C by Bonnie Toy, modified to suit compbenchmarks requierements."); } std::string CBMPackageLINPACKC::localPackageName(void) { ! return("cbm-bm-linpackc"); } *************** *** 82,86 **** char* CBMPackageLINPACKC::extractDirectory(void) { ! std::string dum = "linpackc-"; dum+=packageVersion(); --- 54,58 ---- char* CBMPackageLINPACKC::extractDirectory(void) { ! std::string dum = "cbm-bm-linpackc-"; dum+=packageVersion(); *************** *** 88,147 **** } - int CBMPackageLINPACKC::hasPatch(void) - { - return(1); - } - - int CBMPackageLINPACKC::patch(int _force) - { - std::string cmd; - std::string sstdout; - int r; - std::string patch; - - patch+=system->temporaryDirectory(CBMSystem::Patches); - patch+="/linpackc.patch.gz"; - - cmd+="cd "; - cmd+=localPackageAbsoluteDirectory(); - cmd+=" && if test ! -f "; - cmd+=patch; - cmd+="; then exit 1; fi"; - cmd+=" && "; - cmd+=CBM_PROG_GZIP; - cmd+=" -dc "; - cmd+=patch; - cmd+=" | "; - cmd+=CBM_PROG_PATCH; - cmd+=" -p0 linpackc.c"; - r=system->exec(cmd, sstdout); - return(!r); - } - - int CBMPackageLINPACKC::extract(int _force) - { - std::string localFile = localPackageAbsoluteName(); - std::string cmd; - std::string sstdout; - - cmd+="cd "; - cmd+=system->temporaryDirectory(CBMSystem::Extract); - cmd+=" && "; - cmd+=CBM_PROG_MKDIR; - cmd+=" -p "; - cmd+=extractDirectory(); - cmd+=" && cd "; - cmd+=extractDirectory(); - cmd+=" && "; - cmd+=CBM_PROG_CP; - cmd+=" "; - cmd+=system->temporaryDirectory(CBMSystem::Download); - cmd+="/"; - cmd+=localPackageName(); - cmd+=" ."; - - return(system->exec(cmd, sstdout)==0); - } - int CBMPackageLINPACKC::preConfigure(int _force) { --- 60,63 ---- *************** *** 149,224 **** } - int CBMPackageLINPACKC::configure(CBMCompiler *_currentCompiler, - CBMCompilerOptions *_currentOptions) - { - return(1); - } - - int CBMPackageLINPACKC::make(void) - { - std::string cmd; - std::string sstdout; - std::string localFlags; - int r; - - localFlags=linpackPrecisionFlags(); - localFlags+=" "; - localFlags+=linpackRollFlags(); - - cmd="cd "; - cmd+=localPackageAbsoluteDirectory(); - cmd+=" && "; - cmd+=CBM_PROG_MAKE; - cmd+=" linpackc "; - - if (language()=="C") { - cmd+="CC="; - } else { - if (language()=="C++") { - cmd+="CXX="; - } else { - /* !!! */ - } - } - cmd+=currentCompiler->Binary(); - if (language()=="C") { - cmd+=" CFLAGS="; - } else { - if (language()=="C++") { - cmd+="CXXFLAGS="; - } else { - /* !!! */ - } - } - - cmd+="'"; - cmd+=currentOptions->Options(); - cmd+=" "; - cmd+=" -lm "; - cmd+=localFlags; - cmd+="'"; - - r=system->exec(cmd, sstdout); - - if (!r) { - system->store("linpackc-localflags", - localFlags); - } - - return(!r); - } - - int CBMPackageLINPACKC::release(void) - { - std::string cmd; - std::string sstdout; - - cmd="cd "; - cmd+=localPackageAbsoluteDirectory(); - cmd+=" && rm -f linpackc linpackc.exe 2> /dev/null"; - - return(system->exec(cmd, sstdout)==0); - } - std::string CBMPackageLINPACKC::license(void) { --- 65,68 ---- *************** *** 256,261 **** std::string comment; ! comment="linpackc benchmark with specific compilation options :"; comment+=benchmarkLINPACKCComments(); return(comment); } --- 100,106 ---- std::string comment; ! comment="linpackc benchmark using "; comment+=benchmarkLINPACKCComments(); + comment+="."; return(comment); } *************** *** 269,273 **** cmd="cd "; cmd+=package->localPackageAbsoluteDirectory(); ! cmd+=" && echo $(./linpackc 2>&1 | "; cmd+=CBM_PROG_GREP; cmd+=" 'Kflops' | "; --- 114,121 ---- cmd="cd "; cmd+=package->localPackageAbsoluteDirectory(); ! cmd+=" && echo $("; ! cmd+="./"; ! cmd+=benchmarkName(); ! cmd+=" 2>&1 | "; cmd+=CBM_PROG_GREP; cmd+=" 'Kflops' | "; *************** *** 297,315 **** } - std::string CBMBenchmarkLINPACKC_SP_UNROLL::linpackPrecisionFlags(void) - { - std::string dum = "-DSP"; - return(dum); - } - - std::string CBMBenchmarkLINPACKC_SP_UNROLL::linpackRollFlags(void) - { - std::string dum = "-DUNROLL"; - return(dum); - } - std::string CBMBenchmarkLINPACKC_SP_UNROLL::benchmarkLINPACKCComments(void) { ! std::string dum = "single precision used. Unrolled version selected, which may ease compiler's work and optimisation."; return(dum); } --- 145,151 ---- } std::string CBMBenchmarkLINPACKC_SP_UNROLL::benchmarkLINPACKCComments(void) { ! std::string dum = "single precision and unrolled version (which may ease compiler's optimisation)"; return(dum); } *************** *** 329,347 **** } - std::string CBMBenchmarkLINPACKC_SP_ROLL::linpackPrecisionFlags(void) - { - std::string dum = "-DSP"; - return(dum); - } - - std::string CBMBenchmarkLINPACKC_SP_ROLL::linpackRollFlags(void) - { - std::string dum = "-DROLL"; - return(dum); - } - std::string CBMBenchmarkLINPACKC_SP_ROLL::benchmarkLINPACKCComments(void) { ! std::string dum = "single precision used. Rolled version selected (matrix operations are given in a straightforward way, which may makes compiler's optimisation job more difficult)."; return(dum); } --- 165,171 ---- } std::string CBMBenchmarkLINPACKC_SP_ROLL::benchmarkLINPACKCComments(void) { ! std::string dum = "single precision and rolled version selected (matrix operations are given in a straightforward way, which may makes compiler's optimisation job more difficult)."; return(dum); } *************** *** 361,379 **** } - std::string CBMBenchmarkLINPACKC_DP_UNROLL::linpackPrecisionFlags(void) - { - std::string dum = "-DDP"; - return(dum); - } - - std::string CBMBenchmarkLINPACKC_DP_UNROLL::linpackRollFlags(void) - { - std::string dum = "-DUNROLL"; - return(dum); - } - std::string CBMBenchmarkLINPACKC_DP_UNROLL::benchmarkLINPACKCComments(void) { ! std::string dum = "double precision used. Unrolled version selected, which may ease compiler's work and optimisation."; return(dum); } --- 185,191 ---- } std::string CBMBenchmarkLINPACKC_DP_UNROLL::benchmarkLINPACKCComments(void) { ! std::string dum = "double precision and unrolled version, which may ease compiler's optimisation"; return(dum); } *************** *** 392,411 **** } - - std::string CBMBenchmarkLINPACKC_DP_ROLL::linpackPrecisionFlags(void) - { - std::string dum = "-DDP"; - return(dum); - } - - std::string CBMBenchmarkLINPACKC_DP_ROLL::linpackRollFlags(void) - { - std::string dum = "-DROLL"; - return(dum); - } - std::string CBMBenchmarkLINPACKC_DP_ROLL::benchmarkLINPACKCComments(void) { ! std::string dum = "double precision used. Rolled version selected (matrix operations are given in a straightforward way, which may makes compiler's optimisation job more difficult)."; return(dum); } --- 204,210 ---- } std::string CBMBenchmarkLINPACKC_DP_ROLL::benchmarkLINPACKCComments(void) { ! std::string dum = "double precision and version (matrix operations are given in a straightforward way, which may makes compiler's optimisation job more difficult)."; return(dum); } |