con un clic
rocprofsys-build
Build, test, and install rocprofiler-systems after configuration
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Build, test, and install rocprofiler-systems after configuration
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Given a TheRock nightly build (URL or run-id), return the rocm-systems pin_sha used in that build
Check whether a given rocm-systems commit is included in a specific TheRock nightly build
Find the first TheRock nightly build that includes a given rocm-systems commit
Reviews Pull Requests or local diffs with an 8-agent fan-out covering static analysis, dead code, code smells + quality (naming, complexity, single-responsibility, magic numbers), language rules (C++/Python/CMake), architecture, simplification, performance (hot-path classification, allocations, locks, I/O), and undefined behaviour (signed overflow, lifetime, strict aliasing, data races, sanitizer coverage; C/C++/unsafe-Rust only). Use when the user asks to "review this PR", "review the diff", "audit this branch", "/pr-review", or when staging changes before push.
Walk through a PR review interactively, one finding at a time. Generate review via pr-review, then for each issue present analysis + proposed inline comment, let user accept/edit/skip, accumulate into a PENDING GitHub review, submit at end.
Use when user wants to list, analyze, review, or summarize GitHub PR comments on a pull request number or URL
| name | rocprofsys-build |
| description | Build, test, and install rocprofiler-systems after configuration |
Builds the rocprofiler-systems project after configuration, optionally runs tests and installs.
Use this skill when:
Before using this skill:
rocprofsys-configure first)Check if configured:
# Look for CMakeCache.txt in build directory
if [ -f build/debug/CMakeCache.txt ]; then
echo "Configured with debug preset"
elif [ -f build/release/CMakeCache.txt ]; then
echo "Configured with release preset"
else
echo "Not configured - run rocprofsys-configure first"
fi
Find project directory
rocprofsys-configureprojects/rocprofiler-systems/Find build directory
build/debug, build/release, etc.Validate build is configured
CMakeCache.txtbuild.ninja or Makefile)rocprofsys-configure firstReport to user:
Ask user what they want to build:
Use AskUserQuestion:
header: "Build Scope"
question: "What do you want to build?"
options:
- label: "Full build (Recommended)"
description: "Build all targets"
- label: "Specific target"
description: "Build a specific library or executable"
- label: "Build and test"
description: "Build everything and run tests"
- label: "Build and install"
description: "Build, test, and install to prefix"
Building rocprofsys can be memory-intensive. Determine parallel job count:
Strategy:
# Check system memory (GB)
TOTAL_MEM=$(free -g | awk '/^Mem:/{print $2}')
# Check CPU cores
TOTAL_CORES=$(nproc)
# Heuristic: ~4GB per parallel job for rocprofsys
SAFE_JOBS=$((TOTAL_MEM / 4))
MAX_JOBS=$((SAFE_JOBS > TOTAL_CORES ? TOTAL_CORES : SAFE_JOBS))
# Suggest to user
echo "Recommended: -j${MAX_JOBS}"
Use AskUserQuestion:
header: "Parallel Jobs"
question: "How many parallel build jobs?"
options:
- label: "Auto (Recommended: -j8)"
description: "Based on system memory and cores"
- label: "Conservative (-j4)"
description: "Safer for systems with limited memory"
- label: "Maximum (-j$(nproc))"
description: "Use all CPU cores (may run out of memory)"
- label: "Custom"
description: "Specify job count manually"
Build command:
cmake --build <build-dir> -j <jobs> [--target <target>]
Examples:
# Full build with 8 jobs
cmake --build build/debug -j8
# Build specific target
cmake --build build/debug -j8 --target rocprof-sys-run
# Verbose output (for debugging build issues)
cmake --build build/debug -j8 --verbose
# Clean and rebuild
cmake --build build/debug -j8 --clean-first
Show build progress:
[123/456] Building CXX object...-j for parallel buildMonitor for issues:
If build fails, diagnose and help user:
Common build errors:
| Error Type | Symptoms | Solution |
|---|---|---|
| Out of memory | c++: fatal error: Killed | Reduce parallel jobs: -j2 or -j4 |
| Missing headers | fatal error: xyz.h: No such file | Missing dependency, reconfigure with BUILD_<DEP>=ON |
| Linker errors | undefined reference to | Dependency issue, rebuild dependencies |
| Template errors | Long C++ template errors | Usually code issue, read error carefully |
| External dependency failure | Error in external/dyninst/ | Clean build, try again, or use system package |
Steps to diagnose:
If build fails repeatedly:
If user selected "Build and test" or explicitly wants to run tests:
# Run all tests
cd <build-dir>
ctest --output-on-failure
# Run tests in parallel
ctest -j8 --output-on-failure
# Run specific test
ctest -R <test-name> --output-on-failure
# Verbose test output
ctest -V
Monitor test results:
Report to user:
If user selected "Build and install":
# Install to prefix (may need sudo)
cmake --install <build-dir>
# Install to custom prefix
cmake --install <build-dir> --prefix /custom/path
# Install specific component
cmake --install <build-dir> --component <component>
Check install prefix:
/opt/rocprofiler-systems (usually needs sudo)-DCMAKE_INSTALL_PREFIX=...Verify installation:
# Check installed binaries
ls <install-prefix>/bin/rocprof-sys-*
# Check installed libraries
ls <install-prefix>/lib/librocprof-sys*
# Check setup script
cat <install-prefix>/share/rocprofiler-systems/setup-env.sh
Setup environment:
# Option 1: Source setup script
source /opt/rocprofiler-systems/share/rocprofiler-systems/setup-env.sh
# Option 2: Manual
export PATH=/opt/rocprofiler-systems/bin:$PATH
export LD_LIBRARY_PATH=/opt/rocprofiler-systems/lib:$LD_LIBRARY_PATH
On success:
On failure:
cd /path/to/projects/rocprofiler-systems
cmake --build build/debug -j8
cd /path/to/projects/rocprofiler-systems
cmake --build build/debug -j8
cd build/debug
ctest --output-on-failure
cd /path/to/projects/rocprofiler-systems
cmake --build build/release -j8
sudo cmake --install build/release
cd /path/to/projects/rocprofiler-systems
cmake --build build/debug -j8
# Only rebuilds changed files
cd /path/to/projects/rocprofiler-systems
cmake --build build/debug -j8 --clean-first
cd /path/to/projects/rocprofiler-systems
cmake --build build/debug -j8 --target rocprof-sys-run
This skill produces:
Build artifacts:
projects/rocprofiler-systems/
└── build/
└── debug/ # Or release, etc.
├── source/
│ ├── bin/
│ │ └── rocprof-sys-run/
│ │ └── rocprof-sys-run # Executable
│ └── lib/
│ └── rocprof-sys/
│ └── librocprof-sys.so # Library
└── ...
Test results:
build/debug/Testing/Installation (if installed):
/opt/rocprofiler-systems/
├── bin/
│ ├── rocprof-sys-run
│ ├── rocprof-sys-instrument
│ └── ...
├── lib/
│ ├── librocprof-sys.so
│ └── ...
├── include/
│ └── rocprofiler-systems/
└── share/
└── rocprofiler-systems/
└── setup-env.sh
| Mistake | Fix |
|---|---|
| Building without configuring | Run rocprofsys-configure first |
| Too many parallel jobs | Reduce to -j4 or -j2 if out of memory |
| Building in wrong directory | Must be in project root, build dir is specified with -B or --build |
| Not running tests | Always run tests after build, especially for changes |
| Installing without sudo | Use sudo cmake --install if prefix is /opt |
| Not checking test results | Review failed tests before proceeding |
| Ignoring build warnings | Some warnings indicate real issues |
Cause: Not in configured build directory or wrong command
Solution:
# Use cmake --build, not make directly
cmake --build build/debug
Cause: Out of memory
Solution:
# Reduce parallel jobs
cmake --build build/debug -j2
# Or add swap space
Cause: Build directory not configured
Solution:
# Run configure first
cmake --preset debug
# Then build
cmake --build build/debug
Steps:
ctest -R <test-name> -Vcat build/debug/Testing/Temporary/LastTest.log./build/debug/tests/<test-binary>Solution:
# Use sudo for system paths
sudo cmake --install build/release
# Or configure with user prefix
cmake -B build/release -DCMAKE_INSTALL_PREFIX=$HOME/rocprofsys
cmake --install build/release # No sudo needed
| After Build | Use |
|---|---|
| Build successful | Test the installation, run examples |
| Build failed | Review errors, reconfigure if needed |
| Tests failed | Debug failed tests, fix code |
| Ready to commit | git-commit to commit changes |
| Ready for PR | git-prepare-pull-request |
Common targets:
all (default) - Build everythingrocprof-sys-run - Main profiler executablerocprof-sys-instrument - Binary instrumentation toolrocprof-sys-avail - Available metrics tooltests - Build all tests (without running)To see all targets:
cmake --build build/debug --target help