### Ubuntu 14.04 x86_64 installation procedure Source: https://github.com/benchmark-subsetting/cere/blob/master/INSTALL.md Complete example for Ubuntu 14.04: downloads LLVM 7.0.0, installs dependencies via apt, creates a symlink for libomp, installs pulp, then builds and tests CERE. Follow these steps in order. ```bash $ wget http://llvm.org/releases/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz tar -xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz export PATH=$PWD/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/:$PATH export LIBRARY_PATH=$PWD/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-14.04/lib/:$LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH $ sudo apt-get install autoconf automake build-essential libtool ruby-ronn \ python python-matplotlib python-jinja2 python-pygraphviz python-pydot python-sklearn python-numpy \ python-networkx python-pip google-perftools libgoogle-perftools-dev numactl dc libiomp-dev $ sudo ln -s /usr/lib/libiomp5.so /usr/lib/libomp.so $ sudo pip install pulp $ cd cere/ $ ./autogen.sh $ ./configure --without-flang $ make && make install $ make check ``` -------------------------------- ### cere configure example with build, clean, and run commands Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-configure.1.md Example invocation of cere configure for the sample application, specifying the build, clean, and run commands. ```text cere configure --build-cmd="make CC=ccc LD=ccc" --clean-cmd="make clean" --run-cmd="./app" ``` -------------------------------- ### Example Makefile for a simple application Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-configure.1.md Example Makefile for a simple application named app, used to illustrate how to configure CERE with build, clean, and run commands. ```make all: app app: app.o $(LD) -o $@ $< app.o: app.c $(CC) -c $< clean: rm app *.o *.ll ``` -------------------------------- ### Build and install CERE with autogen, configure, make Source: https://github.com/benchmark-subsetting/cere/blob/master/INSTALL.md Run these commands inside the CERE directory to build and install. The --without-flang flag disables Fortran support; use --with-flang to enable it. ```bash $ ./autogen.sh $ ./configure --without-flang $ make $ make install ``` -------------------------------- ### Read cere-configure manual with man Source: https://github.com/benchmark-subsetting/cere/blob/master/README.md Use this command to view the manual page for cere-configure after installation. The man pages are located in the doc/ directory relative to the CERE installation path. ```bash man -M doc/ cere configure ``` -------------------------------- ### Run CERE test suite Source: https://github.com/benchmark-subsetting/cere/blob/master/INSTALL.md After installation, run this command to execute the test suite and verify CERE works correctly on your system. ```bash $ make check ``` -------------------------------- ### cere configure Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-configure.1.md Documentation for the cere configure command, including its options, usage example, output files, and environment variables. ```APIDOC ## cere configure ### Description Configures CERE to build and run an application. This command tells CERE which commands must be used to build and run the application. ### Method CLI ### Command cere configure ### Parameters #### Options - `-h` (flag) - Optional - Prints a synopsis and a list of the most commonly used options. - `--run-cmd=RUN_CMD` (string) - Required - Sets the command used to run the application. - `--build-cmd=BUILD_CMD` (string) - Required - Sets the command used to build the application. - `--clean-cmd=CLEAN_CMD` (string) - Required - Sets the command used to clean the application. - `--multiple-trace` (flag) - Optional - Enables tracing multiple regions in a single run. By default, multiple tracing is disabled and cere-trace(1) will only trace the requested region. If activated, cere-trace(1) traces all possible regions in a single run (regions must be non-nested). This can considerably decrease the tracing cost. ### Request Example ``` cere configure --build-cmd="make CC=ccc LD=ccc" --clean-cmd="make clean" --run-cmd="./app" ``` ### Output Files - `cere.json` - the configuration file. This file is read by most of CERE passes. You can manually edit this file. ### Environment Variables - `CERE_MODE` - Determines the compilation mode (default, capture, replay, ...). The build command will be run in an environment where this variable is defined. - `CERE_WORKING_PATH` - Changes the current directory behavior. If not defined, defaults to the current directory. - `CERE_BUILD_PATH` - Path from which build and clean commands are launched. If not defined, defaults to `CERE_WORKING_PATH`. - `CERE_RUN_PATH` - Path from which run commands are launched. If not defined, defaults to `CERE_WORKING_PATH`. ``` -------------------------------- ### Configure CERE with custom LLVM and gcc paths Source: https://github.com/benchmark-subsetting/cere/blob/master/INSTALL.md Use these configure options to specify the LLVM install directory and gcc path. The --with-llvm flag sets the LLVM location, and CC sets the gcc compiler. ```bash $ ./configure --with-llvm= \ --without-flang \ CC= ``` -------------------------------- ### Example output of cere check-matching Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md This is the expected tail of the output from the check-matching command, showing matching results for the region. ```text ... INFO 06/11/2015 16:24:31 Check-matching : Results for region: __cere__fft3d_swarztrauber__27 INFO 06/11/2015 16:24:31 Check-matching : MATCHING: In vitro = 6430148516.65 & invivo = 6158949523.0 (error = 4.21761632639%, coverage = 66.1%) INFO 06/11/2015 16:24:31 Check-matching : Invocation 17632: In vitro cycles = 279057.6 & in vivo cycles = 269038.0 (error = 3.59051321304%, part = 15955.7846108) INFO 06/11/2015 16:24:31 Check-matching : Invocation 2438: In vitro cycles = 114033.6 & in vivo cycles = 107614.0 (error = 5.62956882884%, part = 17341.9549768) ``` -------------------------------- ### Measure Application Runtime with cere profile --app Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Runs the application runtime measurement using CERE's profiling. It inserts probes at the start and end of main and uses RDTSC to count CPU cycles. The runtime is saved to .cere/profile/app_cycles.csv. ```bash $ cere profile --app ``` -------------------------------- ### Configure CERE for FT Build and Run Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Configures CERE with the build, clean, and run commands for the FT benchmark. The --build-cmd and --clean-cmd use make with CLASS=A, and --run-cmd executes the compiled binary. This creates the cere.json configuration file. ```bash $ cere configure --build-cmd="make CLASS=A" --clean-cmd="make clean" --run-cmd="../bin/ft.A" ``` -------------------------------- ### cere configure command synopsis Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-configure.1.md Shows the command-line syntax for cere configure, including the required --run-cmd, --build-cmd, and --clean-cmd options and the optional --multiple-trace flag. ```text cere configure [-h] --run-cmd=RUN_CMD --build-cmd=BUILD_CMD --clean-cmd=CLEAN_CMD [--multiple-trace] ``` -------------------------------- ### cere instrument command synopsis Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-instrument.1.md Shows the command-line syntax for cere instrument. Use --region or --regions-file to select regions, --plugin-instr to specify the instrumentation library, and --invocation to select a specific invocation. --norun builds without running, and --force overrides invalid region checks. ```text cere instrument [-h] --region REGION | --regions-file REGIONS_FILE [--plugin-instr PLUGIN_INSTR] [--invocation INVOCATION] [--norun] [--force] ``` -------------------------------- ### cere --help command output Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Shows the cere command-line help, listing all subcommands and their purposes. Use this to see available CERE operations. ```text user@ix:~/cere/$ cere --help INFO 06/10/2015 10:31:59 CERE : Start usage: cere [-h] {configure,profile,capture,replay,check-matching,select-max-cov,select-ilp, instrument,trace,check,regions,report,io-checker,selectinv} ... CERE command line positional arguments: {configure,profile,capture,replay,check-matching,select-max-cov,select-ilp, instrument,trace,check,regions,report,io-checker,selectinv} Call CERE modules configure Configure CERE to build and run an application profile Profiles an application capture captures a region replay replay a region check-matching Test the matching for a list of region select-max-cov Select regions to maximise the matching coverage select-ilp Select matching regions instrument Instrument a region in the application trace produce or read a region trace check Compare for a given region, the assembly between original region and replay region regions List extractible regions report Generates the html report for an application io-checker Check if a region does IOs selectinv select representatives invocations from region trace optional arguments: -h, --help show this help message and exit ``` -------------------------------- ### Select representative invocations with cere selectinv Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Run 'cere selectinv --region=__cere__fft3d_swarztrauber__27' to cluster invocations and select representatives. Generates .invocations and .png files under .cere/traces/ and .cere/plots/. ```bash $ cere selectinv --region=__cere__fft3d_swarztrauber__27 ``` -------------------------------- ### Full Profiling with cere profile Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Combines application runtime measurement and region profiling into a single command. This is a convenience command that performs both profiling steps. ```bash $ cere profile ``` -------------------------------- ### FT Makefile Configuration with cerec Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Defines the compiler and linker commands in the make.def file to use the cerec wrapper for the FT benchmark. This is required for CERE to instrument the application during compilation. ```makefile F77 = cerec FLINK = cerec CC = cerec CLINK = cerec ``` -------------------------------- ### Replay output for region __cere__fft3d_swarztrauber__27 Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Sample output from 'cere replay' showing predicted cycles per invocation and overall predicted cycles for the region. ```text INFO 06/11/2015 15:36:59 Replay : Predicted cycles for region: __cere__fft3d_swarztrauber__27 INFO 06/11/2015 15:36:59 Replay : Invocation 17632: In vitro cycles = 279057.6 (part = 15955.7846108) INFO 06/11/2015 15:36:59 Replay : Invocation 2438: In vitro cycles = 114033.6 (part = 17341.9549768) INFO 06/11/2015 15:36:59 Replay : Overall predicted cycles = 6430148516.65 ``` -------------------------------- ### Trace invocations for a region with cere trace Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Run 'cere trace --region=__cere__fft3d_swarztrauber__27' to generate trace files for the region. Produces .bin and .csv files under .cere/traces/. ```bash $ cere trace --region=__cere__fft3d_swarztrauber__27 ``` -------------------------------- ### List extractible regions with cere regions Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Run 'cere regions' to list extractible regions, their source locations, and coverage info. Outputs regions.csv; without profile data, per-region execution time is omitted. ```bash $ cere regions ``` -------------------------------- ### Replay a region with cere replay Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Run 'cere replay --region=__cere__fft3d_swarztrauber__27' to replay the selected invocations and simulate the region's total runtime. Generates a replay file under .cere/replays/. ```bash $ cere replay --region=__cere__fft3d_swarztrauber__27 ``` -------------------------------- ### cere select-ilp command synopsis Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-select-ilp.1.md Shows the command-line usage of cere select-ilp with its options: --max-error, --min-coverage, and --force. The command requires cere-profile to be executed beforehand. ```bash cere select-ilp [-h] [--max-error MAX_ERROR] [--min-coverage MIN_COVERAGE] [--force] ``` -------------------------------- ### View trace CSV for region __cere__fft3d_swarztrauber__27 Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Command to display the trace CSV file for the region, showing call count and CPU cycles. ```bash $ cat .cere/traces/__cere__fft3d_swarztrauber__27.csv ``` -------------------------------- ### cere select-max-cov command synopsis Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-select-max-cov.1.md Shows the command-line usage of cere select-max-cov with its options. Run cere-profile before this command; cere-report can then visualize the selection summary. ```bash cere select-max-cov [-h] [--max-error MAX_ERROR] [--min-coverage MIN_COVERAGE] [--force] ``` -------------------------------- ### Capture memory and cache state with cere capture Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Run 'cere capture --region=__cere__fft3d_swarztrauber__27' to capture memory and cache state for the selected invocations. Generates files in .cere/dumps/__cere__fft3d_swarztrauber__27/INVOCATIONS/. ```bash $ cere capture --region=__cere__fft3d_swarztrauber__27 ``` -------------------------------- ### cere replay command synopsis Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-replay.1.md Command-line synopsis for cere replay. Use this to see the available options and their order when invoking the tool. ```text cere replay [-h] --region REGION [--invocation INVOCATION] [--static] [--invitro-callcount CERE_REPLAY_REPETITIONS] [--plugin-instr PLUGIN_INSTR] [--norun] [--noinstrumentation] [--force] ``` -------------------------------- ### Run CERE region selectors Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md These commands run the two available region selectors: select-max-cov for maximum coverage and select-ilp for a trade-off between coverage and replay cost. ```bash $ cere select-max-cov ``` ```bash $ cere select-ilp ``` -------------------------------- ### cere trace command synopsis Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-trace.1.md Shows the command-line usage of cere trace with its options: --region, --regions-file, --norun, --read, and --force. ```text cere trace [-h] --region REGION | --regions-file REGIONS_FILE [--norun] [--read READ] [--force] ``` -------------------------------- ### cere selectinv command synopsis Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-selectinv.1.md Command-line synopsis for cere selectinv. Use --region to specify the region and optionally --force to re-select representative invocations if a previous selection exists. ```bash cere selectinv [-h] --region REGION [--force] ``` -------------------------------- ### Run cere check-matching on a region Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Use this command to automatically check if a region's replay matches the original execution. The output shows matching status, error, and coverage percentages. ```bash cere check-matching --region=__cere__fft3d_swarztrauber__27 ``` -------------------------------- ### cere check-matching command synopsis Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-check-matching.1.md Shows the command-line syntax for cere check-matching. The command requires either --region or --regions-file, and optionally accepts --max_error and --force. The default MAX_ERROR is 15%. ```bash cere check-matching [-h] --region REGION | --regions-file REGIONS_FILE [--max_error MAX_ERROR] [--force] ``` -------------------------------- ### Profile Regions with cere profile --regions Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Profiles the application's regions to measure their contribution to execution time and captures the region call graph. It outlines extractible regions and uses Google gperftools and pprof. Generates graph_.dot, graph_.pdf, app.prof, and graph_.pkl in .cere/profile/. ```bash $ cere profile --regions ``` -------------------------------- ### cere regions command synopsis Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-regions.1.md Lists extractible regions. With --static, regions are outlined and listed without executing the binary, so coverage information is unavailable and a region may not be extractible if not executed. ```bash cere regions [-h] [--static] ``` -------------------------------- ### cere report command synopsis Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-report.1.md Command-line synopsis for the cere report utility. Use after cere-select-ilp(1) or cere-select-max-cov(1) to generate an HTML summary of regions matching error. ```bash cere report [-h] [--path PATH] ``` -------------------------------- ### Trace CSV content for region __cere__fft3d_swarztrauber__27 Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-tutorial.1.md Content of the trace CSV file showing the region name, call count, and CPU cycles. ```text Codelet Name,Call Count,CPU_CLK_UNHALTED_CORE __cere__fft3d_swarztrauber__27,32768,6158949523 ``` -------------------------------- ### Redefine CERE probes with custom library functions Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-plugin-instr.1.md Shows the four CERE probe functions redefined to call corresponding functions from a custom instrumentation library. Use this as a template when implementing the --plugin-instr library. ```C void my_init_function(char*); void my_close_function(); void my_start_function(char*); void my_stop_function(char*); ``` ```C void cere_markerInit(char* filename) { my_init_function(filename); } void cere_markerClose() { my_close_function(); } void cere_markerStartRegion(char* regName, bool vivo, int requested_invoc, int curr_invoc) { my_start_function(regName); } void cere_markerStopRegion(char* regName, bool vivo, int requested_invoc, int curr_invoc) { my_stop_function(regName); } ``` -------------------------------- ### cere instrument Source: https://github.com/benchmark-subsetting/cere/blob/master/doc/cere-instrument.1.md Instruments a region inside the application with probes defined via the --plugin-instr flag. The command supports selecting regions, invocations, and options to control execution. ```APIDOC ## cere instrument ### Description Instruments a region inside the original application with probes around the region. The probes are defined via the --plugin-instr flag to perform measures on the region. For instance, cere instrument is used by cere-trace(1). ### Method CLI ### Endpoint cere instrument ### Parameters #### Options - **-h** (flag) - Optional - Prints a synopsis and a list of the most commonly used options. - **--region REGION** (string) - Required (unless --regions-file is used) - Selects the region to instrument. The list of valid regions can be displayed with the cere-regions(1) command. - **--regions-file REGIONS_FILE** (string) - Required (unless --region is used) - Input file where you can list regions you want to trace. - **--plugin-instr PLUGIN_INSTR** (string) - Optional - Library to instrument the region. For more information on how to use another library please refer to cere-plugin-instr(1). - **--invocation INVOCATION** (string) - Optional - Selects the invocation to instrument. By default, all invocations are instrumented. - **--norun** (flag) - Optional - Builds the instrumented binary but does not run it automatically. - **--force** (flag) - Optional - If the region is marked as invalid, the instrumentation stops. The --force flag forces the instrumentation. ### Request Example ``` cere instrument --region REGION [--plugin-instr PLUGIN_INSTR] [--invocation INVOCATION] [--norun] [--force] ``` ### Response #### Success Response No specific response is documented. The command performs instrumentation and optionally runs the instrumented binary. #### Response Example No response example is provided in the source. ``` -------------------------------- ### Cite CERE with BibTeX Source: https://github.com/benchmark-subsetting/cere/blob/master/README.md Use this BibTeX entry to cite the CERE paper in academic research. The entry includes the paper's title, authors, journal, and DOI. ```bibtex @article{CERE, title = {{CERE: LLVM Based Codelet Extractor and REplayer for Piecewise Benchmarking and Optimization}}, author = {de Oliveira Castro, Pablo and Akel, Chadi and Petit, Eric and Popov, Mihail and Jalby, William}, journal = {ACM Transactions on Architecture and Code Optimization (TACO)}, volume = {12}, number = {1}, pages = {6}, year = {2015}, publisher = {ACM}, doi = {10.1145/2724717} } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.