[Compbench-devel] CompBenchmarks++/compbenchmarks-core Makefile.am, NONE, 1.1 cloptions.cpp, NONE,
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-05-27 16:06:27
|
Update of /cvsroot/compbench/CompBenchmarks++/compbenchmarks-core In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv18527 Added Files: Makefile.am cloptions.cpp cloptions.h compbenchmarks-core.pod main.cpp main.h Log Message: compbenchmarks-core/ directory added : sources moved. --- NEW FILE: cloptions.cpp --- /* ---------------------------------------------------------------------------- $Id: cloptions.cpp,v 1.1 2007/05/27 16:06:19 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <compbenchmarks-core/cloptions.h> #include <Benchmark/Package.h> #include <Benchmark/Benchmark.h> #include <Compiler/Compiler.h> #include <Compiler/Compiler-Option-Description.h> #include <System/System.h> #include <UI/UI.h> #include <config.h> #include <iostream> #include <string> #include <unistd.h> #include <getopt.h> #include <stdio.h> using namespace CBM; typedef enum { DomainUndef, DomainHelp, DomainQuery, DomainVersion, DomainManage, DomainLowLevel, DomainBench } OptDomain; typedef struct { unsigned int all:1; unsigned int installed:1; unsigned int package:1; unsigned int benchmark:1; unsigned int host:1; unsigned int compiler:1; unsigned int external_programs:1; unsigned int option_analyze:1; } OptFilter; typedef enum { ActionUndef, ActionInstall, ActionUninstall, ActionLLDownload, ActionLLExtract, ActionLLPatch, ActionLLPreconfigure, ActionLLRelease, ActionLLTestsuite, ActionLLFetch } OptAction; extern int optind, opterr, optopt; int parseExitValue = -1; void cbmOptionsHelp(void) { std::cout << "Usage: compbenchmarks-core <DOMAIN> [OPTIONS]" << std::endl << "Simple options (no domain):" << std::endl << " --help | -h : this help" << std::endl << " --version | -v : display software version" << std::endl << std::endl << "Query options (with -q or --query domain) :" << std::endl << " --all | -a : display all items" << std::endl << " --installed | -i : display only installed items" << std::endl << " --package | -p : display package(s)" << std::endl << " --benchmark | -b : display benchmark(s)" << std::endl << " --compiler | -c : display informations about compiler" << std::endl << " --host | -H : display informations about host" << std::endl << " --programs | -x : display informations about" << std::endl << " external programs used" << std::endl << std::endl << "Management options (with -m or --manage domain) :" << std::endl << " --install | -I : install package" << std::endl << " --uninstall | -U : uninstall package" << std::endl << std::endl << "Low-level management options (with -M or --low-level domain) :" << std::endl << " --package-download | -D : download package" << std::endl << " --package-fetch | -F : fetch package from a local file" << std::endl << " --package-extract | -E : extract package" << std::endl << " --package-patch | -P : patch package" << std::endl << " --package-preconfigure | -C : pre-configure package" << std::endl << " --package-test | -T : run package's testsuite" << std::endl << " --package-release | -R : clean compiled object" << std::endl << std::endl << "Benchmarking options (with -b or --bench domain) : " << std::endl << " [-b|--bench] <BID> <C> [O] : use compiler C with optional arguments" << std::endl << " O to build benchmark BID" << std::endl << " --disable-testsuite | -S : disable package's test suite" << std::endl << std::endl << "Other options that may affect behaviour :" << std::endl << " --force : force operation" << std::endl << std::endl; } void cbmSingleDomain(OptDomain *domain, OptDomain value, std::string opt) { std::string str; if (*domain!=DomainUndef) { str="Unexpected option : "; str+=opt; CBM::cbmUI->Fatal(str); } else { *domain=value; } } void cbmUnknownBenchmark(char *bench) { int i; int n = cbmSystem->packageNumber(); int j; int m; CBM::Package *P; std::cerr << "Unknow benchmark '" << bench << "'. Valid entries are :" << std::endl; for(i=0; i<n; i++) { P=cbmSystem->Package(i); m=P->benchmarkNumber(); for(j=0;j<m;j++) { std::cerr << " * " << P->Benchmark(j)->Name() << std::endl; } } } void cbmUnknownPackage(char *pack) { std::cerr << "Unknow package '" << pack << "'. Valid entries are :" << std::endl; int i; int n = cbmSystem->packageNumber(); CBM::Package *P; for(i=0; i<n; i++) { P=cbmSystem->Package(i); std::cerr << " * " << P->Name() << std::endl; } } CBM::Benchmark *cbmOptionsExpectBenchmark(char *optarg) { CBM::Benchmark *B = 0; std::string bench; if (!optarg) { std::cerr << "benchmark missing in argument line" << std::endl; parseExitValue=1; return(0); } bench=optarg; B=cbmSystem->Benchmark(bench); if (!B) { cbmUnknownBenchmark((char*) bench.c_str()); parseExitValue=1; return(0); } return(B); } std::string cbmCompilerAnalyze(std::string _analyzeResult) { int i = 0; std::string o = "!"; std::string r; int times = 0; int ok = 0; while (o!="") { o=cbmSystem->Split(_analyzeResult, "\n", i++); if (o=="") { if ((!times) && (_analyzeResult!="")) o=_analyzeResult; else break; } times++; if (o=="1") ok++; else { r+=" * "; r+=o; r+="\n"; } } if (ok==times) return(" * Ok"); else return(r); } CBM::Package *cbmOptionsExpectPackage(char *optarg) { CBM::Package *P = 0; std::string pack; if (!optarg) { std::cerr << "package missing in argument line" << std::endl; parseExitValue=1; return(0); } pack=optarg; P=cbmSystem->Package(pack); if (!P) { cbmUnknownPackage((char*) pack.c_str()); parseExitValue=1; return(0); } return(P); } void cbmShowOptionDescriptions(CBM::Compiler *C) { CBM::CompilerOptionDescriptions *DES = C->OptionDescriptions(); int i; int n = DES->DescriptionNumber(); CBM::CompilerOptionDescription *D; for(i=0; i<n; i++) { D=DES->Description(i); std::cout << "Option ID : " << D->Id() << std::endl << " Description : " << D->ShortDescription() << std::endl << std::endl << " " << D->EditorDescription() << std::endl << std::endl; } } int cbmOptionsParse(int argc, char *argv[]) { int c; int context; CBM::Package::Status status; CBM::Package *P = 0; CBM::Benchmark *B = 0; CBM::CompilerSelector SC(cbmSystem); CBM::Compiler *C = 0; CBM::CompilerOptions *O; std::string bench; std::string compiler; std::string options; std::string tarball; std::string options_analyzed; std::string tmp; OptDomain domain = DomainUndef; /* help/query/{install/uninstall : manage ?}/bench/version/low-level */ OptAction action = ActionUndef; /* (install/uninstall/fetch, etc.) */ OptFilter filter = { 0 }; /* <empty>/all/installed */ std::string object_t; /* package/benchmark/host/compiler */ int not_done = 1; static const struct option long_options[] = { {"help", no_argument, 0, 'h' }, {"query", no_argument, 0, 'q' }, {"version", no_argument, 0, 'v'}, {"manage", no_argument, 0, 'm'}, {"low-level", no_argument, 0, 'M'}, {"bench", required_argument, 0, 'B'}, {"install", required_argument, 0, 'I' }, {"uninstall", required_argument, 0, 'U' }, {"all", 0, 0, 'a' }, {"installed", no_argument, 0, 'i'}, {"package", optional_argument, 0, 'p' }, {"options-analyze", required_argument, 0, 'A'}, {"benchmark", optional_argument, 0, 'b' }, {"host", 0, 0, 'H' }, {"programs", no_argument, 0, 'P' }, {"compiler", required_argument, 0, 'c' }, {"bench", 1, 0, 'B'}, {"package-download", 1, 0, 'D' }, {"package-extract", 1, 0, 'E' }, {"package-patch", 1, 0, 'P' }, {"package-preconfigure", 1, 0, 'C' }, {"package-test", 1, 0, 'T' }, {"package-fetch", 1, 0, 'F' }, {"package-release", 1, 0, 'R' }, {"disable-testsuite", 0, 0, 'S' }, {"force", 0, 0, 'f' }, { 0, 0, 0, 0} }; while (not_done) { int option_index = 0; if (parseExitValue!=-1) break; c = getopt_long (argc, argv, "hvxiI:F:U:qHc:p::B:b::A:aMmD:E:P:C:T:R:S:f", // uLHPCFIB", /* :011000112", */ long_options, &option_index); if (c==-1) { break; } switch (c) { case 'v': cbmSingleDomain(&domain, DomainVersion, "v"); break; case 'q': cbmSingleDomain(&domain, DomainQuery, "q"); break; case 'h': cbmSingleDomain(&domain, DomainHelp, "h"); break; case 'm': cbmSingleDomain(&domain, DomainManage, "m"); break; case 'M': cbmSingleDomain(&domain, DomainLowLevel, "M"); break; case 'a': filter.all=1; break; case 'i': filter.installed=1; break; case 'p': filter.package=1; if (optarg) P=cbmOptionsExpectPackage(optarg); break; case 'b': filter.benchmark=1; if (optarg) B=cbmOptionsExpectBenchmark(optarg); break; case 'A': filter.option_analyze=1; if (optarg) options_analyzed=optarg; break; case 'D': action=ActionLLDownload; if (optarg) P=cbmOptionsExpectPackage(optarg); break; case 'E': action=ActionLLExtract; if (optarg) B=cbmOptionsExpectBenchmark(optarg); break; case 'P': action=ActionLLPatch; if (optarg) B=cbmOptionsExpectBenchmark(optarg); break; case 'C': action=ActionLLPreconfigure; if (optarg) B=cbmOptionsExpectBenchmark(optarg); break; case 'T': action=ActionLLTestsuite; if (optarg) B=cbmOptionsExpectBenchmark(optarg); break; case 'F': action=ActionLLFetch; P=cbmOptionsExpectPackage(optarg); if (!P) break; optind++; if (optind<=argc) { tarball=argv[optind-1]; } else { std::cerr << "tarball missing in argument line" << std::endl; parseExitValue=1; break; } break; case 'R': action=ActionLLRelease; if (optarg) B=cbmOptionsExpectBenchmark(optarg); break; case 'I': action=ActionInstall; P=cbmOptionsExpectPackage(optarg); break; case 'U': action=ActionUninstall; P=cbmOptionsExpectPackage(optarg); break; case 'S': UO_enableTestSuite=0; break; case 'f': UO_force=1; break; case 'H': filter.host=1; parseExitValue=0; break; case 'x': filter.external_programs=1; parseExitValue=0; break; case 'c': filter.compiler=1; if (optarg) C=SC.select((char*) optarg); break; /* case 'f': !!! P=cbmOptionsExpectPackage(optarg); if (!P) break; if (optind<=argc) { P->Fetch(argv[optind-1], UO_force); } else { std::cerr << "tarball missing in argument line" << std::endl; parseExitValue=1; break; } break; */ case 1011: P=cbmOptionsExpectPackage(optarg); if (P) parseExitValue=!P->Patch(UO_force); break; case 'g': P=cbmOptionsExpectPackage(optarg); if (P) parseExitValue=!P->PreConfigure(UO_force); break; case 't': P=cbmOptionsExpectPackage(optarg); if (P) { if (!UO_enableTestSuite) { CBM::cbmUI->Fatal("Incompatible options : --test and --disable-testsuite"); } } if (P) parseExitValue=!P->Test(UO_force); break; case 'r': P=cbmOptionsExpectPackage(optarg); if (P) parseExitValue=!P->Release(); break; case 'B': domain=DomainBench; B=cbmOptionsExpectBenchmark(optarg); if (!B) break; optind++; if (optind<=argc) { compiler=argv[optind-1]; } else { std::cerr << "compiler missing in argument line" << std::endl; parseExitValue=1; break; } optind++; if (optind<=argc) { options=argv[optind-1]; } else { options=""; } not_done=0; break; case '?': break; } } switch(domain) { case DomainVersion: if ((!filter.all) && (!filter.installed) && (!filter.benchmark) && (!filter.external_programs) && (!filter.host) && (!filter.package) && (!filter.external_programs) && (!filter.compiler) && (action==ActionUndef)) { std::cout << VERSION << std::endl; parseExitValue=0; } else { std::cerr << "Invalid filter or action with -v" << std::endl; parseExitValue=255; } break; case DomainUndef: std::cerr << "Domain not defined." << std::endl; parseExitValue=255; break; case DomainHelp: cbmOptionsHelp(); parseExitValue=0; break; case DomainQuery: if ((!filter.benchmark) && (!filter.package) && (!filter.host) && (!filter.external_programs) && (!filter.compiler)) { std::cerr << "-q expects either -b, -p, -c, -h, or -x option." << std::endl; parseExitValue=255; break; } if (!filter.installed) { if ((!filter.all) && (filter.host)) { std::cout << "Architecture : " << cbmSystem->arch() << std::endl << "Host ID : " << cbmSystem->hostid() << std::endl << "Hostname : " << cbmSystem->hostname() << std::endl << "OS : " << cbmSystem->os() << std::endl << "OS Version : " << cbmSystem->os_version() << std::endl << "Processor name : " << cbmSystem->processor_name() << std::endl << "Processor speed (MHz) : " << cbmSystem->processor_mhz() << std::endl << "Processor cache (Kb) : " << cbmSystem->processor_cache() << std::endl << "Processor number : " << cbmSystem->processor_number() << std::endl; parseExitValue=0; break; } if (filter.compiler) { if (!C) { std::cerr << "Invalid compiler given" << std::endl; parseExitValue=255; break; } std::cout << "Compiler name : " << C->Name() << std::endl << "Version : " << C->Version() << std::endl << "Language : " << C->Language() << std::endl << "Binary : " << C->Binary() << std::endl; if ((!filter.option_analyze) && (filter.all)) { cbmShowOptionDescriptions(C); } if (filter.option_analyze) { std::cout << std::endl << "Descriptions from " << C->compiler() << ", branch " << C->relativeDescriptionDirectory() << std::endl << "Option(s) analyzed : " << options_analyzed << std::endl; if (filter.all) { std::cout << std::endl << "Option short descriptions :" << std::endl; std::cout << C->shortHelpOptions(options_analyzed) << std::endl; } else std::cout << std::endl; std::cout << "Analyze : " << std::endl; tmp=cbmCompilerAnalyze(C->analyzeOptions(options_analyzed)); std::cout << tmp << std::endl; } parseExitValue=0; break; } if (filter.external_programs) { std::cout << "BZIP2:" << CBM_PROG_BZIP2 << std::endl << "CUT:" << CBM_PROG_CUT << std::endl << "DD:" << CBM_PROG_DD << std::endl << "DIALOG:" << CBM_PROG_DIALOG << std::endl << "GREP:" << CBM_PROG_GREP << std::endl << "GZIP:" << CBM_PROG_GZIP << std::endl << "HEAD:" << CBM_PROG_HEAD << std::endl << "MAKE:" << CBM_PROG_MAKE << std::endl << "MKDIR:" << CBM_PROG_MKDIR << std::endl << "PATCH:" << CBM_PROG_PATCH << std::endl << "RM:" << CBM_PROG_RM << std::endl << "TAIL:" << CBM_PROG_TAIL << std::endl << "TAR:" << CBM_PROG_TAR << std::endl << "UNZIP:" << CBM_PROG_UNZIP << std::endl << "WGET:" << CBM_PROG_WGET << std::endl << "ZCAT:" << CBM_PROG_ZCAT << std::endl << "CAT:" << CBM_PROG_CAT << std::endl << "PERL:" << CBM_PROG_PERL << std::endl; parseExitValue=0; break; } } if ((filter.all) || (filter.installed)) { if (filter.host) { std::cerr << "-H option incompatible in that query." << std::endl; parseExitValue=255; break; } if ((filter.package) && (P)) { std::cerr << "-p must have no argument when -a or -i is used." << std::endl; parseExitValue=255; break; } if ((filter.benchmark) && (B)) { std::cerr << "-b must have no argument when -a or -i is used." << std::endl; parseExitValue=255; break; } } if ((filter.package) && (filter.benchmark)) { if ((!filter.all) && (!filter.installed) && (P)) { int i; int n = P->benchmarkNumber(); for(i=0; i<n; i++) { B=P->Benchmark(i); std::cout << B->Name() << std::endl; } parseExitValue=0; } break; } if (filter.package) { if ((filter.all) && (!filter.installed)) { int i; int n = cbmSystem->packageNumber(); for(i=0; i<n; i++) { P=cbmSystem->Package(i); std::cout << P->Name() << " " << P->Version() << std::endl; } parseExitValue=0; } if ((!filter.all) && (filter.installed)) { int i; int n = cbmSystem->packageNumber(); for(i=0; i<n; i++) { P=cbmSystem->Package(i); if (P->getStatus()>=CBM::Package::Preconfigured) { std::cout << P->Name() << " " << P->Version() << std::endl; } } parseExitValue=0; } if ((!filter.all) && (!filter.installed)) { if (P) { std::cout << "Package (PID) : " << P->Name() << std::endl; std::cout << "Version : " << P->Version() << std::endl; std::cout << "Size : " << P->Size() << std::endl; std::cout << "Total size : " << P->totalSize() << std::endl; std::cout << "Benchmarks : " << P->benchmarkNumber() << std::endl; std::cout << "Language : " << P->language() << std::endl; std::cout << "License : " << P->license() << std::endl; std::cout << "Author : " << P->author() << std::endl; std::cout << "Homepage : " << P->homePage() << std::endl; std::cout << "Download URL : " << P->downloadURL() << std::endl; std::cout << "Testsuite : " << (P->hasTest() ? "Yes" : "No") << std::endl; std::cout << "Status : " << P->getStatusStr() << std::endl; std::cout << "Comments : " << std::endl; std::cout << P->Comments() << std::endl; parseExitValue=0; } else { std::cerr << "No package found. Try compbenchmarks-core -q -p<package>\n"; parseExitValue=255; } } } else if (filter.benchmark) { if ((filter.all) && (!filter.installed)) { int i; int n = cbmSystem->packageNumber(); int j; int m; for(i=0; i<n; i++) { P=cbmSystem->Package(i); m=P->benchmarkNumber(); for(j=0; j<m; j++) { B=P->Benchmark(j); std::cout << B->Name() << std::endl; } } parseExitValue=0; } if ((!filter.all) && (filter.installed)) { int i; int n = cbmSystem->packageNumber(); int j; int m; for(i=0; i<n; i++) { P=cbmSystem->Package(i); if (P->getStatus()>=CBM::Package::Preconfigured) { m=P->benchmarkNumber(); for(j=0; j<m; j++) { B=P->Benchmark(j); std::cout << B->Name() << std::endl; } } } parseExitValue=0; } if ((!filter.all) && (!filter.installed) && (B)) { std::cout << "Benchmark (PID) : " << B->Name() << std::endl; std::cout << "Package (PID) : " << B->Package()->Name() << std::endl; std::cout << "Comments : " << std::endl; std::cout << B->Comments() << std::endl; parseExitValue=0; } } break; case DomainManage: switch(action) { case ActionInstall: if (P) parseExitValue=!P->Install(UO_force); break; case ActionUninstall: if (P) { parseExitValue=!P->Uninstall(); if (parseExitValue) { std::cerr << "Can't uninstall package." << std::endl; } } break; default: case ActionUndef: std::cerr << "action not specified." << std::endl; std::cerr << "Valid options are -I and -U." << std::endl; parseExitValue=255; break; } break; case DomainLowLevel: if (filter.host) { std::cerr << "-H and -M options not compatibles." << std::endl; parseExitValue=1; break; } switch(action) { case ActionLLDownload: if (P->downloadURL()!="") { parseExitValue=!P->Download(); } else { std::cerr << "Package is not known to be hosted anymore on the Internet. Use --fetch <tarball> option" << std::endl; parseExitValue=1; } break; case ActionInstall: case ActionUninstall: std::cerr << "Incompatible option for action. You probably meant -m." << std::endl; break; case ActionLLFetch: P->Fetch((char*) tarball.c_str(), UO_force); break; case ActionLLExtract: parseExitValue=!P->Extract(); break; case ActionLLPatch: parseExitValue=!P->Patch(); break; case ActionLLPreconfigure: parseExitValue=!P->PreConfigure(); break; case ActionLLRelease: parseExitValue=!P->Release(); break; case ActionLLTestsuite: parseExitValue=!P->Test(); break; default: std::cerr << "Invalid or missing option for -M" << std::endl; parseExitValue=255; break; } break; case DomainBench: if (!B) { std::cerr << "benchmark (BID) expected" << std::endl; break; } C=SC.select((char*) compiler.c_str()); if (!C) { std::cerr << "Compiler " << compiler.c_str() << " not found." << std::endl; parseExitValue=1; break; } O=new CBM::CompilerOptions(options); P=B->Package(); if (P->getStatus()<CBM::Package::Preconfigured) { std::cerr << "Package not properly installed" << std::endl; parseExitValue=1; break; } context=P->ContextMatches(C, O); status=P->getStatus(); if ((status>=CBM::Package::Configured) && (!context)) { P->Release(); } if (!context) { P->Configure(C, O); P->Make(UO_force); P->Test(UO_force); } B->Bench(); parseExitValue=0; break; } cbmSystem->done(); exit(parseExitValue); } --- NEW FILE: main.cpp --- /* ---------------------------------------------------------------------------- $Id: main.cpp,v 1.1 2007/05/27 16:06:20 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <config.h> #include <libcompbenchmarks.h> #include <compbenchmarks-core/cloptions.h> int main(int argc, char *argv[]) { CBM_SYSTEM sys; int r; sys.init(); r=cbmOptionsParse(argc, argv); sys.done(); return(r); } --- NEW FILE: cloptions.h --- /* ---------------------------------------------------------------------------- $Id: cloptions.h,v 1.1 2007/05/27 16:06:19 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMCLOPTIONS #define H_CBMCLOPTIONS 1 #include <libcompbenchmarks.h> /** Parse command line arguments. High-level function to parse arguments through getopt.h. */ int cbmOptionsParse(int argc, char *argv[]); #endif --- NEW FILE: compbenchmarks-core.pod --- =head1 NAME compbenchmarks-core 0.5.0 - Compilers' benchmarking environment =head1 SYNOPSIS compbenchmarks-core --help Show help. =head1 QUERYING compbenchmarks-core --version Show software version. compbenchmarks-core --install <b-id> Install benchmark <b-id> from the Internet. See --list-benchmarks to get a list of available benchmark's IDs (b-id). compbenchmarks-core --fetch <b-id> <tarball> Install benchmark <b-id> from a local archive. See --list-benchmarks to get a list of available benchmark's IDs (b-id). compbenchmarks-core --uninstall <b-id> Uninstall specified benchmark or package. compbenchmarks-core --list-benchmarks List all recognized benchmarks/packages. compbenchmarks-core --host-infos Show host's informations compbenchmarks-core --program-infos Show informations about all used external programs. compbenchmarks-core --compiler-infos <c-bin> Show informations about specified binary (compiler). <c-bin> may be either a relative compiler (like gcc-3.3) or a full path to the compiler binary (/opt/lt/bin/g++). compbenchmarks-core --benchmark-infos <b-id> Show informations about specified benchmark. compbenchmarks-core --bench <b-id> <c-bin> [c-options] Make benchmark with specified compiler and options (if given), and returns performance (higher is better). Here are some more fine-grained operations : compbenchmarks-core --download <b-id> Download benchmark, and verify checksum. compbenchmarks-core --extract <b-id> Extract given benchmark (from a downloaded archive). compbenchmarks-core --patch <b-id> Patch benchmark (not always needed). compbenchmarks-core --preconfigure <b-id> Preconfigure a benchmark (not always needed). compbenchmarks-core --test <b-id> Test if a benchmark runs as expected (require package's internal test suite). compbenchmarks-core --release <b-id> Clean built object for a benchmark. compbenchmarks-core --force --test <b-id> Force the test suite execution (even if it has already been executed). force may be applied to other options. compbenchmarks-core --disable-testsuite --bench <b-id> <c-bin> [c-options] Disable benchmark's embedded test suite. =head1 DESCRIPTION This tool provides a command line interface to compile and evaluate C/C++ benchmarks according to customizable parameters. Normally user'd prefer compbenchmarks-ui-* binaries. =head1 DIRECTORIES =over =item ~/.compbenchmarks root directory for all related files and directories =item ~/.compbenchmarks/Downloads holds downloaded benchmarks =item ~/.compbenchmarks/$HOSTNAME your host's dedicated space =item ~/.compbenchmarks/$HOSTNAME/Extracts extract and compilation directory for benchmark's archives =item ~/.compbenchmarks/$HOSTNAME/Status holds benchmarks' status =item ~/.compbenchmarks/$HOSTNAME/Configuration configuration file. See below. =back =head1 AUTHOR Frederic Trouche --- NEW FILE: main.h --- /* ---------------------------------------------------------------------------- $Id: main.h,v 1.1 2007/05/27 16:06:22 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMMAIN #define H_CBMMAIN /*! \mainpage CompBenchmarks Reference Manual * * \section intro_sec A foreword * * This document presents concepts, source layout and organisation of CompBenchmarks. * As a reminder, this software has been released under the GPL license and aims to * provide a convenient environment to benchmark software using different compilers * and options on a variety of architectures. * * \subsection foreword_programs Programs * * CompBenchmarks is a package built around the libcompbenchmarks shared library, * which brings core functionnalities. It also comes with * compbenchmarks-core, other programs and user interfaces that interracts with * libcompbenchmarks. * * \subsection foreword_moreinfo More informations * * New releases and complementory information can be found at * http://compbench.sourceforge.net . * * \section abstraction General organisation * * CompBenchmarks core relies on a few definitions : * - \link CBM::System operating system\endlink which provides abstraction interface for all supported operating systems, * - \link CBM::Package package\endlink; that's API to declare and handle packages. * - \link CBM::Benchmark benchmark\endlink; which uses packages to describe what are related benchmarks, * - \link CBM::Compiler compilers\endlink and \link CBM::CompilerOptions compilation options\endlink and \link CBM::CompilerOptionDescriptions descriptions\endlink, * - \link CBM::Plan benchmark plan\endlink. It stores and handles current benchmarking context, * - \link CBM::UI user interface\endlink. Higher-level core abstractions for UI. * * Another major element is \ref howto_kb "knowledge-base", which can for instance enlight * incompatibilities between options, and which is used in * \link CBM::Plan benchmark plans\endlink. * * \section behaviour Hacking ? * * Here are few entry points, mainly for contributors : * - \ref howto_kb "XML knowledge base", * - \ref new_compiler_support "Supporting a new compiler", * - \ref improve_compiler_support "Improving or fixing logic for a supported compiler", * - \ref howto_new_package_support "Adding a new package", * - \ref howto_new_benchmark_support "Adding a new benchmark". * */ #endif --- NEW FILE: Makefile.am --- # ----------------------------------------------------------------------------- # $Id: Makefile.am,v 1.1 2007/05/27 16:06:19 xfred Exp $ # # This is free software. # For details, see the GNU Public License in the COPYING file, or # Look http://www.fsf.org # ----------------------------------------------------------------------------- bin_PROGRAMS = compbenchmarks-core compbenchmarks_core_SOURCES = cloptions.cpp main.cpp libcompbenchmarksincludedir = $(includedir)/compbenchmarks compbenchmarks_core_LDADD = ../libcompbenchmarks/libcompbenchmarks.la compbenchmarks_core_DEPENDENCIES = ../libcompbenchmarks/libcompbenchmarks.la noinst_HEADERS = $(compbenchmarks_core_SOURCES:.cpp=.h) EXTRA_DIST = compbenchmarks-core.pod compbenchmarks-core.1 INCLUDES = -I $(top_srcdir)/libcompbenchmarks -I $(top_srcdir) man_MANS = compbenchmarks-core.1 compbenchmarks-core.1: compbenchmarks-core.pod pod2man $< > $@ |