Support for Ubuntu 22.04 and ROCm 5.3 (#48)

* Testing and CI support for Ubuntu 22.04

* Fixes for ROCm

- Jammy does not have ROCm installers

* Name, timeout, and python updates

- renamed ubuntu-jammy-external.yml to ubuntu-jammy.yml
- increased all 5 minute timeouts to 10 minutes
- include python 3.10 in testing

* Update dyninst to remove interposed definition of _r_debug

* Rebuild Dyninst + test install script

* Revert container change

* git safe directory

* pushd -> cd

* fix MPI include

* Fix testing step

* OMPI_ALLOW_RUN_AS_ROOT

* Test script changes

* Fix mismatched malloc / delete[]

* Jammy workflow tweaks

* CPack tweak for boost deb deps

* pthread_mutex_gotcha config returns when not enabled

* fix echoing config in CI

* USE_CLANG_OMP

- option to disable using LLVM OpenMP when building OpenMP test executables
- Jammy workflow sets USE_CLANG_OMP=OFF

* Dyninst submodule boost download

- updated containers workflow to include jammy
- updated workflow to use ci

* Updates to workflows + replace test-install.sh

- test-install.sh in this branch was replaced with one in main branch

* Expand jammy test-install.sh args

* Fix openmp-cg-sampling-duration test

* update timemory submodule

- use-after-free violation in popen::pclose

* revert some tweaks to sampling-duration test

* Fix env of test-install.sh

* cmake format

* jammy bash

* CPack install for jammy

* formatting workflow action version bump

* Update timemory submodule

- libunwind submodule via timemory sets SOVERSION to 99 to avoid ABI conflicts with v8

* Fix help menu for omnitrace-sample

* Support other boolean forms in test-install.sh

* Update docker files and build-docker.sh

- consolidated cases in build-docker.sh
- support rocm version of 0.0 (no rocm install)
- support rocm v5.3
- updated centos handling

* update opensuse actions/checkout version

* Tweaks to ubuntu-focal testing

- actions/checkout@v3
- use test-install script

* update cpack

- ubuntu 22.04
- rocm 5.3
- rename os matrix field to os-version
- remove CI_ROCM_VERSION (no longer necessary)
- remove default-rocm-version matrix field (no longer necessary)
- CentOS packaging

* fix argparsing and omnitrace-sample tests in install-tests.sh

* focal rocm test install workflow fix

* Fix omnitrace-sample build

* Dockerfile.centos + build-docker.sh updates

* Update actions/upload-artifact version

* Dockerfile.ubuntu: install rocm-device-libs

* Refactor cpack

* fix cpack if quotes

* Dockerfile.ubuntu rocm < 5 installs rocm-dev

* build-release.sh defaults to boost version 1.79.0

[ROCm/rocprofiler-systems commit: ede6007f9b]
This commit is contained in:
Jonathan R. Madsen
2022-10-17 12:54:26 -05:00
committad av GitHub
förälder 0ec0d18ac8
incheckning 713d08de6d
28 ändrade filer med 543 tillägg och 313 borttagningar
@@ -26,6 +26,8 @@ jobs:
version: "18.04"
- distro: "ubuntu"
version: "20.04"
- distro: "ubuntu"
version: "22.04"
- distro: "opensuse"
version: "15.2"
- distro: "opensuse"
@@ -55,7 +57,7 @@ jobs:
timeout-minutes: 45
run: |
pushd docker
./build-docker-ci.sh --distro ${{ matrix.distro }} --versions ${{ matrix.version }} --user ${{ secrets.DOCKERHUB_USERNAME }} --push --jobs 2 --elfutils-version 0.186
./build-docker-ci.sh --distro ${{ matrix.distro }} --versions ${{ matrix.version }} --user ${{ secrets.DOCKERHUB_USERNAME }} --push --jobs 2 --elfutils-version 0.186 --boost-version 1.79.0
popd
omnitrace-release-ubuntu:
@@ -103,7 +105,7 @@ jobs:
omnitrace-release-opensuse:
if: github.repository == 'AMDResearch/omnitrace'
runs-on: ubuntu-20.04
strategy:
+103 -110
Visa fil
@@ -34,9 +34,84 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["18.04", "20.04"]
rocm-version: ["0.0", "4.5", "5.0", "5.1", "5.2"]
default-rocm: ["5.0"]
include:
# ubuntu 18.04
- os-distro: "ubuntu"
os-version: "18.04"
rocm-version: "0.0"
- os-distro: "ubuntu"
os-version: "18.04"
rocm-version: "4.5"
- os-distro: "ubuntu"
os-version: "18.04"
rocm-version: "5.0"
- os-distro: "ubuntu"
os-version: "18.04"
rocm-version: "5.1"
- os-distro: "ubuntu"
os-version: "18.04"
rocm-version: "5.2"
# ubuntu 20.04
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "0.0"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "4.5"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "5.0"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "5.1"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "5.2"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "5.3"
# ubuntu 20.04
- os-distro: "ubuntu"
os-version: "22.04"
rocm-version: "0.0"
- os-distro: "ubuntu"
os-version: "22.04"
rocm-version: "5.3"
# opensuse 15.3
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "0.0"
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "4.5"
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "5.0"
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "5.1"
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "5.2"
- os-distro: "opensuse"
os-version: "15.3"
rocm-version: "5.3"
# opensuse 15.4
- os-distro: "opensuse"
os-version: "15.4"
rocm-version: "0.0"
- os-distro: "opensuse"
os-version: "15.4"
rocm-version: "5.0"
- os-distro: "opensuse"
os-version: "15.4"
rocm-version: "5.1"
- os-distro: "opensuse"
os-version: "15.4"
rocm-version: "5.2"
- os-distro: "opensuse"
os-version: "15.4"
rocm-version: "5.3"
steps:
- uses: actions/checkout@v3
@@ -46,27 +121,25 @@ jobs:
- name: Configure ROCm Version
if: ${{ matrix.rocm-version == 0 }}
run: |
echo "CI_ROCM_VERSION=${{ matrix.default-rocm }}" >> $GITHUB_ENV
echo "CI_SCRIPT_ARGS=--core +python" >> $GITHUB_ENV
- name: Configure ROCm Version
if: ${{ matrix.rocm-version > 0 }}
run: |
echo "CI_ROCM_VERSION=${{ matrix.rocm-version }}" >> $GITHUB_ENV
echo "CI_SCRIPT_ARGS=--rocm +python" >> $GITHUB_ENV
- name: Build Base Container
timeout-minutes: 20
run: |
pushd docker
./build-docker.sh --distro ubuntu --versions ${{ matrix.os }} --rocm-versions ${CI_ROCM_VERSION}
./build-docker.sh --distro ${{ matrix.os-distro }} --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }}
popd
- name: Build Release
timeout-minutes: 150
run: |
pushd docker
./build-docker-release.sh --distro ubuntu --versions ${{ matrix.os }} --rocm-versions ${CI_ROCM_VERSION} -- ${CI_SCRIPT_ARGS}
./build-docker-release.sh --distro ${{ matrix.os-distro }} --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }} -- ${CI_SCRIPT_ARGS}
popd
- name: List Files
@@ -76,26 +149,36 @@ jobs:
- name: STGZ Artifacts
timeout-minutes: 10
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ubuntu-${{ matrix.os }}-rocm-${{ matrix.rocm-version }}-stgz-installers
name: omnitrace-stgz-${{ matrix.os-distro }}-${{ matrix.os-version }}-rocm-${{ matrix.rocm-version }}-installer
path: |
build-release/stgz/*.sh
- name: DEB Artifacts
timeout-minutes: 10
uses: actions/upload-artifact@v2
if: ${{ matrix.os-distro == 'ubuntu' }}
uses: actions/upload-artifact@v3
with:
name: ubuntu-${{ matrix.os }}-rocm-${{ matrix.rocm-version }}-deb-installers
name: omnitrace-deb-${{ matrix.os-distro }}-${{ matrix.os-version }}-rocm-${{ matrix.rocm-version }}-installer
path: |
build-release/deb/*.deb
- name: RPM Artifacts
timeout-minutes: 10
if: ${{ matrix.os-distro != 'ubuntu' }}
uses: actions/upload-artifact@v3
with:
name: omnitrace-rpm-${{ matrix.os-distro }}-${{ matrix.os-version }}-rocm-${{ matrix.rocm-version }}-installer
path: |
build-release/rpm/*.rpm
# before testing remove any artifacts of the build
- name: Remove Build
timeout-minutes: 10
run: |
mv build-release/stgz/*.sh ./
mv build-release/deb/*.deb ./
shopt -s nullglob
for i in $(find build-release -type f | egrep '/(stgz|deb|rpm)/.*\.(sh|deb|rpm)$'); do mv ${i} ./; done
sudo rm -rf build-release
sudo rm -rf /opt/omnitrace
@@ -105,7 +188,7 @@ jobs:
set -v
for i in omnitrace-*.sh
do
./docker/test-docker-release.sh --distro ubuntu --versions ${{ matrix.os }} --rocm-versions ${CI_ROCM_VERSION} -- --stgz ${i}
./docker/test-docker-release.sh --distro ${{ matrix.os-distro }} --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }} -- --stgz ${i}
done
- name: Upload STGZ Release Assets
@@ -118,125 +201,35 @@ jobs:
- name: Test DEB Install
timeout-minutes: 20
if: ${{ matrix.os-distro == 'ubuntu' }}
run: |
set -v
for i in omnitrace_*.deb
do
./docker/test-docker-release.sh --distro ubuntu --versions ${{ matrix.os }} --rocm-versions ${CI_ROCM_VERSION} -- --deb ${i}
./docker/test-docker-release.sh --distro ${{ matrix.os-distro }} --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }} -- --deb ${i}
done
- name: Upload DEB Release Assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'AMDResearch/omnitrace'
if: matrix.os-distro == 'ubuntu' && startsWith(github.ref, 'refs/tags/') && github.repository == 'AMDResearch/omnitrace'
with:
fail_on_unmatched_files: True
files: |
omnitrace_*.deb
opensuse:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
os: ["15.2", "15.3"]
rocm-version: ["0.0", "4.5", "5.0", "5.1", "5.2"]
default-rocm: ["5.0"]
exclude:
- os: "15.2"
rocm-version: "5.1"
- os: "15.2"
rocm-version: "5.2"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure ROCm Version
if: ${{ matrix.rocm-version == 0 }}
run: |
echo "CI_ROCM_VERSION=${{ matrix.default-rocm }}" >> $GITHUB_ENV
echo "CI_SCRIPT_ARGS=--core +python" >> $GITHUB_ENV
- name: Configure ROCm Version
if: ${{ matrix.rocm-version > 0 }}
run: |
echo "CI_ROCM_VERSION=${{ matrix.rocm-version }}" >> $GITHUB_ENV
echo "CI_SCRIPT_ARGS=--rocm +python" >> $GITHUB_ENV
- name: Build Base Container
timeout-minutes: 20
run: |
pushd docker
./build-docker.sh --distro opensuse --versions ${{ matrix.os }} --rocm-versions ${CI_ROCM_VERSION}
popd
- name: Build Release
timeout-minutes: 150
run: |
pushd docker
./build-docker-release.sh --distro opensuse --versions ${{ matrix.os }} --rocm-versions ${CI_ROCM_VERSION} -- ${CI_SCRIPT_ARGS}
popd
- name: List Files
timeout-minutes: 10
run: |
find build-release -type f | egrep '\.(sh|deb|rpm)$'
- name: STGZ Artifacts
timeout-minutes: 10
uses: actions/upload-artifact@v2
with:
name: opensuse-${{ matrix.os }}-rocm-${{ matrix.rocm-version }}-stgz-installers
path: |
build-release/stgz/*.sh
- name: RPM Artifacts
timeout-minutes: 10
uses: actions/upload-artifact@v2
with:
name: opensuse-${{ matrix.os }}-rocm-${{ matrix.rocm-version }}-rpm-installers
path: |
build-release/rpm/*.rpm
# before testing remove any artifacts of the build
- name: Remove Build
timeout-minutes: 10
run: |
mv build-release/stgz/*.sh ./
mv build-release/rpm/*.rpm ./
sudo rm -rf build-release
sudo rm -rf /opt/omnitrace
- name: Test STGZ Install
timeout-minutes: 20
run: |
set -v
for i in omnitrace-*.sh
do
./docker/test-docker-release.sh --distro opensuse --versions ${{ matrix.os }} --rocm-versions ${CI_ROCM_VERSION} -- --stgz ${i}
done
- name: Upload STGZ Release Assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'AMDResearch/omnitrace'
with:
fail_on_unmatched_files: True
files: |
omnitrace-*.sh
- name: Test RPM Install
timeout-minutes: 20
if: ${{ matrix.os-distro != 'ubuntu' }}
run: |
set -v
for i in omnitrace-*.rpm
do
./docker/test-docker-release.sh --distro opensuse --versions ${{ matrix.os }} --rocm-versions ${CI_ROCM_VERSION} -- --rpm ${i}
./docker/test-docker-release.sh --distro opensuse --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }} -- --rpm ${i}
done
- name: Upload RPM Release Assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'AMDResearch/omnitrace'
if: matrix.os-distro != 'ubuntu' && startsWith(github.ref, 'refs/tags/') && github.repository == 'AMDResearch/omnitrace'
with:
fail_on_unmatched_files: True
files: |
@@ -1,5 +1,5 @@
name: formatting
name: Formatting
on:
push:
@@ -19,9 +19,9 @@ jobs:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
@@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
@@ -60,7 +60,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install dependencies
run: |
DISTRIB_CODENAME=$(cat /etc/lsb-release | grep DISTRIB_CODENAME | awk -F '=' '{print $NF}')
@@ -88,7 +88,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: check-includes
run: |
set +e
+3 -3
Visa fil
@@ -26,7 +26,7 @@ jobs:
os-release: [ '15.2', '15.3' ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Packages
timeout-minutes: 10
@@ -109,7 +109,7 @@ jobs:
- name: CTest Artifacts
if: success() || failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ctest-${{ github.job }}-log
path: |
@@ -117,7 +117,7 @@ jobs:
- name: Data Artifacts
if: success() || failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: data-${{ github.job }}-files
path: |
@@ -138,7 +138,7 @@ jobs:
- name: CTest Artifacts
if: success() || failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ctest-${{ github.job }}-log
path: |
@@ -146,7 +146,7 @@ jobs:
- name: Data Artifacts
if: success() || failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: data-${{ github.job }}-files
path: |
@@ -56,7 +56,7 @@ jobs:
static-libstdcxx: 'OFF'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Packages
timeout-minutes: 10
@@ -66,19 +66,25 @@ jobs:
add-apt-repository -y ppa:ubuntu-toolchain-r/test &&
apt-get update &&
apt-get upgrade -y &&
apt-get install -y build-essential m4 autoconf libtool python3-pip libiberty-dev clang libomp-dev libmpich-dev mpich ${{ matrix.compiler }} &&
apt-get install -y build-essential m4 autoconf libtool python3-pip libiberty-dev clang libomp-dev libmpich-dev mpich environment-modules ${{ matrix.compiler }} &&
python3 -m pip install --upgrade pip &&
python3 -m pip install numpy &&
python3 -m pip install perfetto &&
python3 -m pip install 'cmake==3.16.3' &&
for i in 6 7 8 9 10; do /opt/conda/envs/py3.${i}/bin/python -m pip install numpy perfetto dataclasses; done
- name: Test Environment Modules
timeout-minutes: 15
shell: bash
run: |
set -v
source /usr/share/modules/init/$(basename ${SHELL})
module avail
- name: Configure Env
run:
echo "CC=$(echo '${{ matrix.compiler }}' | sed 's/+/c/g')" >> $GITHUB_ENV &&
echo "CXX=${{ matrix.compiler }}" >> $GITHUB_ENV &&
echo "/opt/omnitrace/bin:${HOME}/.local/bin" >> $GITHUB_PATH &&
echo "LD_LIBRARY_PATH=/opt/omnitrace/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
echo "CXX=${{ matrix.compiler }}" >> $GITHUB_ENV
- name: Configure CMake
timeout-minutes: 10
@@ -117,34 +123,28 @@ jobs:
- name: Test
timeout-minutes: 45
run:
cd build &&
ldd ./bin/omnitrace &&
./bin/omnitrace --help &&
ctest -V -N -O omnitrace-ctest-${{ github.job }}-commands.log &&
shell: bash
run: |
cd build
source /usr/share/modules/init/$(basename ${SHELL})
module use ./share/modulefiles
module avail
module load omnitrace
echo $(which omnitrace)
ldd $(which omnitrace)
omnitrace --help
ctest -V -N -O omnitrace-ctest-${{ github.job }}-commands.log
ctest -V --output-log omnitrace-ctest-${{ github.job }}.log --stop-on-failure
- name: Test Install
timeout-minutes: 10
timeout-minutes: 15
shell: bash
run: |
set -v
export OMNITRACE_DEBUG=ON
which omnitrace-avail
ldd $(which omnitrace-avail)
omnitrace-avail --help
omnitrace-avail -a
which omnitrace-critical-trace
ldd $(which omnitrace-critical-trace)
which omnitrace
ldd $(which omnitrace)
omnitrace --help
omnitrace -e -v 1 -o ls.inst --simulate -- ls
for i in $(find omnitrace-ls.inst-output -type f); do echo -e "\n\n --> ${i} \n\n"; cat ${i}; done
omnitrace -e -v 1 -o ls.inst -- ls
./ls.inst
omnitrace -e -v 1 --simulate -- ls
for i in $(find omnitrace-ls-output -type f); do echo -e "\n\n --> ${i} \n\n"; cat ${i}; done
omnitrace -e -v 1 -- ls
source /usr/share/modules/init/$(basename ${SHELL})
module use /opt/omnitrace/share/modulefiles
module avail
module load omnitrace
./scripts/test-install.sh --test-omnitrace{,-avail,-sample,-rewrite,-runtime,-critical-trace}=1 --test-omnitrace-python=${{ matrix.python }}
- name: Test User API
timeout-minutes: 10
@@ -154,7 +154,7 @@ jobs:
- name: CTest Artifacts
if: success() || failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ctest-${{ github.job }}-log
path: |
@@ -162,7 +162,7 @@ jobs:
- name: Data Artifacts
if: success() || failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: data-${{ github.job }}-files
path: |
@@ -204,7 +204,7 @@ jobs:
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Packages
timeout-minutes: 10
@@ -296,63 +296,12 @@ jobs:
ctest -V ${{ matrix.ctest_exclude }} -N -O omnitrace-ctest-${{ github.job }}-commands.log &&
ctest -V ${{ matrix.ctest_exclude }} --output-log omnitrace-ctest-${{ github.job }}.log --stop-on-failure
- name: Configure Install Env
run: |
echo "/opt/omnitrace/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=/opt/omnitrace/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
echo "OMNITRACE_CONFIG_FILE=test-install.cfg" >> $GITHUB_ENV
- name: Test Install
timeout-minutes: 10
if: ${{ matrix.perfetto-tools == 'ON' }}
timeout-minutes: 15
shell: bash
run: |
set -v
cat ${OMNITRACE_CONFIG_FILE}
omnitrace-perfetto-traced --background
which omnitrace-avail
ldd $(which omnitrace-avail)
omnitrace-avail --help
omnitrace-avail -a
which omnitrace-python
omnitrace-python --help
which omnitrace-critical-trace
ldd $(which omnitrace-critical-trace)
which omnitrace
ldd $(which omnitrace)
omnitrace --help
omnitrace -e -v 1 -o ls.inst --simulate -- ls
omnitrace -e -v 1 --simulate -- ls
omnitrace -e -v 1 -o ls.inst -- ls
omnitrace-perfetto --out ls-perfetto-trace.proto --txt -c omnitrace.cfg
./ls.inst
omnitrace -e -v 1 -- ls
du -m ls-perfetto-trace.proto
/opt/conda/envs/py3.8/bin/python ./tests/validate-perfetto-proto.py -p -i ./ls-perfetto-trace.proto
- name: Test Install
timeout-minutes: 10
if: ${{ matrix.perfetto-tools == 'OFF' }}
run: |
set -v
cat ${OMNITRACE_CONFIG_FILE}
which omnitrace-avail
ldd $(which omnitrace-avail)
omnitrace-avail --help
omnitrace-avail -a
which omnitrace-python
omnitrace-python --help
which omnitrace-critical-trace
ldd $(which omnitrace-critical-trace)
which omnitrace
ldd $(which omnitrace)
omnitrace --help
omnitrace -e -v 1 -o sleep.inst --simulate -- sleep
omnitrace -e -v 1 --simulate -- sleep
omnitrace -e -v 1 -o sleep.inst -- sleep
./sleep.inst 5
omnitrace -e -v 1 -- sleep 5
cat omnitrace-tests-output/sleep.inst/wall_clock.txt
cat omnitrace-tests-output/sleep/wall_clock.txt
source /opt/omnitrace/share/omnitrace/setup-env.sh
./scripts/test-install.sh --test-omnitrace{,-avail,-sample,-python,-rewrite,-runtime,-critical-trace}=1
- name: Test User API
timeout-minutes: 10
@@ -362,7 +311,7 @@ jobs:
- name: CTest Artifacts
if: success() || failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ctest-${{ github.job }}-log
path: |
@@ -370,7 +319,7 @@ jobs:
- name: Data Artifacts
if: success() || failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: data-${{ github.job }}-files
path: |
@@ -417,7 +366,7 @@ jobs:
OMNITRACE_CI: ON
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Packages
timeout-minutes: 10
@@ -507,7 +456,7 @@ jobs:
run: |
set -v
source /opt/omnitrace/share/omnitrace/setup-env.sh
${{ github.workspace }}/scripts/test-install.sh --test-omnitrace{,-avail,-python,-rewrite,-runtime,-critical-trace}=1
${{ github.workspace }}/scripts/test-install.sh --test-omnitrace{,-avail,-sample,-python,-rewrite,-runtime,-critical-trace}=1
- name: Test Install with Modulefile
timeout-minutes: 15
@@ -516,7 +465,7 @@ jobs:
source /usr/share/modules/init/$(basename ${SHELL})
module use /opt/omnitrace/share/modulefiles
module load omnitrace
${{ github.workspace }}/scripts/test-install.sh --test-omnitrace{,-avail,-python,-rewrite,-runtime,-critical-trace}=1
${{ github.workspace }}/scripts/test-install.sh --test-omnitrace{,-avail,-sample,-python,-rewrite,-runtime,-critical-trace}=1
- name: Test User API
timeout-minutes: 10
@@ -526,7 +475,7 @@ jobs:
- name: CTest Artifacts
if: success() || failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ctest-${{ github.job }}-log
path: |
@@ -534,7 +483,7 @@ jobs:
- name: Data Artifacts
if: success() || failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: data-${{ github.job }}-files
path: |
@@ -0,0 +1,154 @@
name: Ubuntu 22.04 (GCC, Python)
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
OMNITRACE_VERBOSE: 1
OMNITRACE_CI: ON
jobs:
ubuntu-jammy-external:
runs-on: ubuntu-20.04
container:
image: jrmadsen/omnitrace:ci-base-ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: ['g++-11', 'g++-12']
hip: ['OFF']
mpi: ['OFF']
ompt: ['OFF']
papi: ['OFF']
python: ['ON']
lto: ['OFF']
strip: ['OFF']
hidden: ['ON', 'OFF']
build-type: ['Release']
mpi-headers: ['ON', 'OFF']
static-libgcc: ['OFF']
static-libstdcxx: ['OFF']
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
steps:
- uses: actions/checkout@v3
- name: Install Packages
timeout-minutes: 10
run:
apt-get update &&
apt-get install -y software-properties-common &&
apt-get upgrade -y &&
apt-get install -y build-essential m4 autoconf libtool python3-pip libiberty-dev clang libomp-dev libopenmpi-dev libfabric-dev openmpi-bin environment-modules ${{ matrix.compiler }} &&
python3 -m pip install --upgrade pip &&
python3 -m pip install numpy &&
python3 -m pip install 'cmake==3.21.4' &&
for i in 6 7 8 9 10; do /opt/conda/envs/py3.${i}/bin/python -m pip install numpy perfetto dataclasses; done
- name: Test Environment Modules
timeout-minutes: 15
shell: bash
run: |
set -v
source /usr/share/modules/init/$(basename ${SHELL})
module avail
- name: Configure Env
run: |
echo "CC=$(echo '${{ matrix.compiler }}' | sed 's/+/c/g')" >> $GITHUB_ENV
echo "CXX=${{ matrix.compiler }}" >> $GITHUB_ENV
- name: Configure CMake
timeout-minutes: 10
run:
git config --global --add safe.directory ${PWD} &&
cmake --version &&
cmake -B build
-DCMAKE_C_COMPILER=$(echo '${{ matrix.compiler }}' | sed 's/+/c/g')
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
-DCMAKE_INSTALL_PREFIX=/opt/omnitrace-dev
-DOMNITRACE_BUILD_TESTING=ON
-DOMNITRACE_USE_MPI=${{ matrix.mpi }}
-DOMNITRACE_USE_HIP=${{ matrix.hip }}
-DOMNITRACE_USE_OMPT=${{ matrix.ompt }}
-DOMNITRACE_USE_PAPI=${{ matrix.papi }}
-DOMNITRACE_USE_PYTHON=${{ matrix.python }}
-DOMNITRACE_USE_MPI_HEADERS=${{ matrix.mpi-headers }}
-DOMNITRACE_STRIP_LIBRARIES=${{ matrix.strip }}
-DOMNITRACE_BUILD_LTO=${{ matrix.lto }}
-DOMNITRACE_BUILD_HIDDEN_VISIBILITY=${{ matrix.hidden }}
-DOMNITRACE_BUILD_STATIC_LIBGCC=${{ matrix.static-libgcc }}
-DOMNITRACE_BUILD_STATIC_LIBSTDCXX=${{ matrix.static-libstdcxx }}
-DOMNITRACE_PYTHON_PREFIX=/opt/conda/envs
-DOMNITRACE_PYTHON_ENVS="py3.6;py3.7;py3.8;py3.9;py3.10"
-DUSE_CLANG_OMP=OFF
- name: Build
timeout-minutes: 60
run:
cmake --build build --target all --parallel 2 -- VERBOSE=1
- name: Install
timeout-minutes: 10
run:
cmake --build build --target install --parallel 2
- name: Test
timeout-minutes: 45
run:
cd build &&
ctest -V -N -O omnitrace-ctest-${{ github.job }}-commands.log &&
ctest -V --output-log omnitrace-ctest-${{ github.job }}.log
- name: CPack and Install
run: |
cd build
cpack -G STGZ
mkdir -p /opt/omnitrace
./omnitrace-*.sh --prefix=/opt/omnitrace --exclude-subdir --skip-license
- name: Test Install with Modulefile
timeout-minutes: 15
shell: bash
run: |
set -v
source /usr/share/modules/init/$(basename ${SHELL})
module use /opt/omnitrace/share/modulefiles
module avail
module load omnitrace
./scripts/test-install.sh --test-omnitrace=1 --test-omnitrace-avail=1 --test-omnitrace-sample=1 --test-omnitrace-python=1 --test-omnitrace-rewrite=1 --test-omnitrace-runtime=1 --test-omnitrace-critical-trace=1
- name: Test User API
timeout-minutes: 10
run: |
set -v
./scripts/test-find-package.sh --install-dir /opt/omnitrace
- name: CTest Artifacts
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: ctest-${{ github.job }}-log
path: |
build/*.log
- name: Data Artifacts
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: data-${{ github.job }}-files
path: |
build/omnitrace-tests-config/*.cfg
build/omnitrace-tests-output/**/*.txt
build/omnitrace-tests-output/**/*-instr*.json
@@ -144,7 +144,7 @@ if(OMNITRACE_USE_PAPI AND NOT OMNITRACE_BUILD_PAPI)
endif()
if(NOT OMNITRACE_BUILD_DYNINST)
if(NOT DYNINST_BUILD_BOOST)
foreach(_BOOST_COMPONENT atomic system thread date-time filesystem)
foreach(_BOOST_COMPONENT atomic system thread date-time filesystem timer)
list(APPEND _DEBIAN_PACKAGE_DEPENDS
"libboost-${_BOOST_COMPONENT}-dev (>= 1.67.0)")
endforeach()
@@ -264,7 +264,7 @@ if(OMNITRACE_BUILD_DYNINST)
RELATIVE_PATH external/dyninst
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
REPO_URL https://github.com/jrmadsen/dyninst.git
REPO_BRANCH formatting)
REPO_BRANCH omnitrace)
set(DYNINST_OPTION_PREFIX ON)
set(DYNINST_BUILD_DOCS OFF)
@@ -12,21 +12,38 @@ SHELL [ "/bin/bash", "-c" ]
ENV PATH /usr/local/bin:${PATH}
RUN if [ -n "$(cat /etc/os-release | grep 'VERSION="8"')" ]; then \
dnf -y --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos && \
dnf -y distro-sync; \
fi
RUN yum update -y && \
yum groupinstall -y "Development Tools" && \
yum install -y centos-release-scl && \
yum install -y epel-release && \
yum install -y devtoolset-9 python3-pip openmpi3-devel zlib-devel numactl-devel papi-devel dpkg-devel dpkg-dev wget curl && \
yum groupinstall -y "Development Tools"
ARG TOOLSET_VERSION=9
RUN yum install -y epel-release && \
if [ -n "$(cat /etc/os-release | grep 'VERSION="8"')" ]; then \
yum install -y centos-release-stream && \
yum install -y gcc-toolset-${TOOLSET_VERSION} openmpi-devel; \
else \
yum install -y centos-release-scl && \
yum install -y devtoolset-${TOOLSET_VERSION} openmpi3-devel dpkg-dev; \
fi; \
yum install -y python3-pip zlib-devel numactl-devel papi-devel dpkg-devel wget curl && \
python3 -m pip install 'cmake==3.21.4'
ARG ROCM_VERSION=0.0
ARG AMDGPU_RPM=21.40.2/rhel/7.9/amdgpu-install-21.40.2.40502-1.el7.noarch.rpm
# ARG AMDGPU_RPM=latest/rhel/7.9/amdgpu-install-21.50.50000-1.el7.noarch.rpm
RUN yum install -y https://repo.radeon.com/amdgpu-install/${AMDGPU_RPM} && \
amdgpu-install --usecase=rocm,hip,hiplibsdk --no-dkms --skip-broken -y && \
yum install -y rocm-hip-sdk rocm-smi-lib roctracer-dev rocprofiler-dev rccl-dev && \
yum update -y && \
yum clean all
RUN if [ "${ROCM_VERSION}" != "0.0" ]; then \
yum install -y https://repo.radeon.com/amdgpu-install/${AMDGPU_RPM} && \
amdgpu-install --usecase=rocm,hip,hiplibsdk --no-dkms --skip-broken -y && \
yum install -y rocm-hip-sdk rocm-smi-lib roctracer-dev rocprofiler-dev rccl-dev && \
yum update -y && \
yum clean all; \
fi
ARG PYTHON_VERSIONS="6 7 8 9 10"
@@ -39,7 +56,7 @@ RUN wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -
conda clean -a -y && \
conda init
RUN ln -s /opt/rocm-* /opt/rocm
RUN if [ "${ROCM_VERSION}" != "0.0" ]; then ln -sf /opt/rocm-${ROCM_VERSION}* /opt/rocm; fi
WORKDIR /home
SHELL [ "/bin/bash", "--login", "-c" ]
@@ -18,15 +18,18 @@ RUN zypper update -y && \
zypper install -y python3-pip openmpi3-devel gcc-c++ git libnuma-devel dpkg-devel rpm-build wget curl binutils-gold && \
python3 -m pip install 'cmake==3.21.4'
# ARG AMDGPU_RPM=21.40.2/sle/15/amdgpu-install-21.40.2.40502-1.noarch.rpm
ARG ROCM_VERSION=0.0
ARG AMDGPU_RPM=latest/sle/15/amdgpu-install-21.50.50000-1.noarch.rpm
# ARG AMDGPU_RPM=21.40.2/sle/15/amdgpu-install-21.40.2.40502-1.noarch.rpm
RUN zypper --no-gpg-checks install -y https://repo.radeon.com/amdgpu-install/${AMDGPU_RPM} && \
zypper addrepo https://download.opensuse.org/repositories/devel:languages:perl/SLE_15/devel:languages:perl.repo && \
zypper --non-interactive --gpg-auto-import-keys refresh && \
amdgpu-install --usecase=rocm,hip,hiplibsdk --no-dkms -y && \
zypper install -y rocm-hip-sdk rocm-smi-lib roctracer-dev rocprofiler-dev rccl-devel && \
zypper clean --all
RUN if [ "${ROCM_VERSION}" != "0.0" ]; then \
zypper --no-gpg-checks install -y https://repo.radeon.com/amdgpu-install/${AMDGPU_RPM} && \
zypper addrepo https://download.opensuse.org/repositories/devel:languages:perl/SLE_15/devel:languages:perl.repo && \
zypper --non-interactive --gpg-auto-import-keys refresh && \
amdgpu-install --usecase=rocm,hip,hiplibsdk --no-dkms -y && \
zypper install -y rocm-hip-sdk rocm-smi-lib roctracer-dev rocprofiler-dev rccl-devel && \
zypper clean --all; \
fi
ARG PYTHON_VERSIONS="6 7 8 9 10"
@@ -16,20 +16,32 @@ SHELL [ "/bin/bash", "-c" ]
ARG EXTRA_PACKAGES=""
ARG ROCM_REPO_VERSION="debian"
ARG ROCM_VERSION="0.0"
ARG ROCM_REPO_DIST="ubuntu"
ARG PYTHON_VERSIONS="6 7 8 9 10"
ENV PATH ${HOME}/.local/bin:${PATH}
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y build-essential cmake libnuma1 wget gnupg2 m4 bash-completion git-core autoconf libtool autotools-dev python3-pip lsb-release libpapi-dev libpfm4-dev libudev1 libopenmpi-dev rpm librpm-dev curl && \
python3 -m pip install 'cmake==3.21.4' && \
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - && \
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${ROCM_REPO_VERSION}/ ${ROCM_REPO_DIST} main" | tee /etc/apt/sources.list.d/rocm.list && \
apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y rocm-dev rocm-utils rocm-smi-lib roctracer-dev rocprofiler-dev rccl-dev hip-base hsa-amd-aqlprofile hsa-rocr-dev hsakmt-roct-dev ${EXTRA_PACKAGES} && \
apt-get autoclean
apt-get install -y build-essential cmake libnuma1 wget gnupg2 m4 bash-completion git-core autoconf libtool autotools-dev python3-pip lsb-release libpapi-dev libpfm4-dev libudev1 libopenmpi-dev rpm librpm-dev curl apt-utils && \
python3 -m pip install 'cmake==3.21.4'
RUN if [ "${ROCM_VERSION}" != "0.0" ]; then \
if [ -d /etc/apt/trusted.gpg.d ]; then \
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/rocm.gpg; \
else \
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -; \
fi && \
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${ROCM_REPO_VERSION}/ ${ROCM_REPO_DIST} main" | tee /etc/apt/sources.list.d/rocm.list && \
apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y hsa-amd-aqlprofile hsa-rocr-dev hsakmt-roct-dev && \
apt-get install -y hip-base hip-runtime-amd hip-dev && \
apt-get install -y rocm-llvm rocm-core rocm-smi-lib rocm-device-libs && \
apt-get install -y roctracer-dev rocprofiler-dev rccl-dev ${EXTRA_PACKAGES} && \
if [ "$(echo ${ROCM_VERSION} | awk -F '.' '{print $1}')" -lt "5" ]; then apt-get install -y rocm-dev; fi && \
apt-get autoclean; \
fi
RUN wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && \
bash miniconda.sh -b -p /opt/conda && \
@@ -14,10 +14,11 @@ SHELL [ "/bin/bash", "-c" ]
ARG EXTRA_PACKAGES=""
ARG ELFUTILS_DOWNLOAD_VERSION="0.186"
ARG BOOST_DOWNLOAD_VERSION="1.79.0"
ARG NJOBS="12"
ARG PYTHON_VERSIONS="6 7 8 9 10"
ENV PATH ${HOME}/.local/bin:${PATH}
ENV PATH /usr/local/bin:${PATH}
ENV LIBRARY_PATH /usr/local/lib:/usr/local/lib64:${LIBRARY_PATH}
ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64:${LD_LIBRARY_PATH}
ENV CMAKE_PREFIX_PATH /usr/local:${CMAKE_PREFIX_PATH}
@@ -31,7 +32,7 @@ RUN apt-get update && \
apt-get autoclean && \
locale -a && \
cd /tmp/dyninst && \
cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_BOOST=ON -DBUILD_TBB=ON -DBUILD_ELFUTILS=ON -DBUILD_LIBIBERTY=ON -DELFUTILS_DOWNLOAD_VERSION=${ELFUTILS_DOWNLOAD_VERSION} && \
cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_BOOST=ON -DBUILD_TBB=ON -DBUILD_ELFUTILS=ON -DBUILD_LIBIBERTY=ON -DELFUTILS_DOWNLOAD_VERSION=${ELFUTILS_DOWNLOAD_VERSION} -DBOOST_DOWNLOAD_VERSION=${BOOST_DOWNLOAD_VERSION} && \
cmake --build build --target all --parallel ${NJOBS} && \
cmake --build build --target install --parallel ${NJOBS} && \
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && \
@@ -7,6 +7,7 @@ set -e
: ${VERSIONS:=20.04}
: ${NJOBS=$(nproc)}
: ${ELFUTILS_VERSION:=0.186}
: ${BOOST_VERSION:=1.79.0}
: ${PUSH:=0}
verbose-run()
@@ -38,6 +39,7 @@ usage()
print_default_option versions "[VERSION] [VERSION...]" "Ubuntu or OpenSUSE release" "${VERSIONS}"
print_default_option "jobs -j" "[N]" "parallel build jobs" "${NJOBS}"
print_default_option elfutils-version "[0.183..0.186]" "ElfUtils version" "${ELFUTILS_VERSION}"
print_default_option boost-version "[1.67.0..1.79.0]" "Boost version" "${BOOST_VERSION}"
print_default_option user "[USERNAME]" "DockerHub username" "${USER}"
}
@@ -83,6 +85,11 @@ do
ELFUTILS_VERSION=${1}
reset-last
;;
"--boost-version")
shift
BOOST_VERSION=${1}
reset-last
;;
--user|-u)
shift
USER=${1}
@@ -131,7 +138,8 @@ do
--build-arg DISTRO=${DISTRO_IMAGE} \
--build-arg VERSION=${VERSION} \
--build-arg NJOBS=${NJOBS} \
--build-arg ELFUTILS_DOWNLOAD_VERSION=${ELFUTILS_VERSION}
--build-arg ELFUTILS_DOWNLOAD_VERSION=${ELFUTILS_VERSION} \
--build-arg BOOST_DOWNLOAD_VERSION=${BOOST_VERSION}
done
if [ "${PUSH}" -gt 0 ]; then
@@ -111,12 +111,12 @@ if [ ! -f ${DOCKER_FILE} ]; then send-error "File \"${DOCKER_FILE}\" not found";
for VERSION in ${VERSIONS}
do
for i in ${ROCM_VERSIONS}
for ROCM_VERSION in ${ROCM_VERSIONS}
do
CONTAINER=${USER}/omnitrace:release-base-${DISTRO}-${VERSION}-rocm-${i}
ROCM_MAJOR=$(echo ${i} | sed 's/\./ /g' | awk '{print $1}')
ROCM_MINOR=$(echo ${i} | sed 's/\./ /g' | awk '{print $2}')
ROCM_PATCH=$(echo ${i} | sed 's/\./ /g' | awk '{print $3}')
CONTAINER=${USER}/omnitrace:release-base-${DISTRO}-${VERSION}-rocm-${ROCM_VERSION}
ROCM_MAJOR=$(echo ${ROCM_VERSION} | sed 's/\./ /g' | awk '{print $1}')
ROCM_MINOR=$(echo ${ROCM_VERSION} | sed 's/\./ /g' | awk '{print $2}')
ROCM_PATCH=$(echo ${ROCM_VERSION} | sed 's/\./ /g' | awk '{print $3}')
if [ -n "${ROCM_PATCH}" ]; then
ROCM_VERSN=$(( (${ROCM_MAJOR}*10000)+(${ROCM_MINOR}*100)+(${ROCM_PATCH}) ))
ROCM_SEP="."
@@ -126,46 +126,73 @@ do
fi
if [ "${DISTRO}" = "ubuntu" ]; then
ROCM_REPO_DIST="ubuntu"
ROCM_REPO_VERSION=${i}
case "${i}" in
ROCM_REPO_VERSION=${ROCM_VERSION}
case "${ROCM_VERSION}" in
4.1* | 4.0*)
ROCM_REPO_DIST="xenial"
;;
5.3*)
case "${VERSION}" in
22.04)
ROCM_REPO_DIST="jammy"
;;
20.04)
ROCM_REPO_DIST="focal"
;;
18.04)
ROCM_REPO_DIST="bionic"
;;
*)
;;
esac
;;
*)
;;
esac
verbose-run docker build . -f ${DOCKER_FILE} --tag ${CONTAINER} --build-arg DISTRO=${DISTRO} --build-arg VERSION=${VERSION} --build-arg ROCM_REPO_VERSION=${ROCM_REPO_VERSION} --build-arg ROCM_REPO_DIST=${ROCM_REPO_DIST} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
verbose-run docker build . -f ${DOCKER_FILE} --tag ${CONTAINER} --build-arg DISTRO=${DISTRO} --build-arg VERSION=${VERSION} --build-arg ROCM_VERSION=${ROCM_VERSION} --build-arg ROCM_REPO_VERSION=${ROCM_REPO_VERSION} --build-arg ROCM_REPO_DIST=${ROCM_REPO_DIST} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
elif [ "${DISTRO}" = "centos" ]; then
case "${VERSION}" in
7)
RPM_PATH=7.9
RPM_TAG=".el7"
TOOLSET_VERSION=9
;;
8)
RPM_PATH=8.5
RPM_TAG=".el7"
RPM_PATH=8.4
RPM_TAG=".el8"
TOOLSET_VERSION=11
;;
9)
RPM_PATH=9.0
RPM_TAG=".el9"
TOOLSET_VERSION=11
;;
*)
send-error "Invalid centos version ${VERSION}. Supported: 7, 8"
send-error "Invalid centos version ${VERSION}. Supported: 7, 8, 9"
esac
case "${i}" in
5.0*)
ROCM_RPM=latest/rhel/${RPM_PATH}/amdgpu-install-21.50.50000-1${RPM_TAG}.noarch.rpm
case "${ROCM_VERSION}" in
5.3 | 5.3.*)
ROCM_RPM=${ROCM_VERSION}/rhel/${RPM_PATH}/amdgpu-install-${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1${RPM_TAG}.noarch.rpm
;;
4.5 | 4.5.2)
ROCM_RPM=21.40.2/rhel/${RPM_PATH}/amdgpu-install-21.40.2.40502-1${RPM_TAG}.noarch.rpm
5.2 | 5.2.*)
ROCM_RPM=22.20${ROCM_SEP}${ROCM_PATCH}/rhel/${RPM_PATH}/amdgpu-install-22.20.${ROCM_VERSN}-1${RPM_TAG}.noarch.rpm
;;
4.5.1)
ROCM_RPM=21.40.1/rhel/${RPM_PATH}/amdgpu-install-21.40.1.40501-1${RPM_TAG}.noarch.rpm
5.1 | 5.1.*)
ROCM_RPM=22.10${ROCM_SEP}${ROCM_PATCH}/rhel/${RPM_PATH}/amdgpu-install-22.10${ROCM_SEP}${ROCM_PATCH}.${ROCM_VERSN}-1${RPM_TAG}.noarch.rpm
;;
4.5.0)
ROCM_RPM=21.40/rhel/${RPM_PATH}/amdgpu-install-21.40.1.40501-1${RPM_TAG}.noarch.rpm
5.0 | 5.0.*)
ROCM_RPM=21.50${ROCM_SEP}${ROCM_PATCH}/rhel/${RPM_PATH}/amdgpu-install-21.50${ROCM_SEP}${ROCM_PATCH}.${ROCM_VERSN}-1${RPM_TAG}.noarch.rpm
;;
4.5 | 4.5.*)
ROCM_RPM=21.40${ROCM_SEP}${ROCM_PATCH}/rhel/${RPM_PATH}/amdgpu-install-21.40${ROCM_SEP}${ROCM_PATCH}.${ROCM_VERSN}-1.noarch.rpm
;;
0.0)
;;
*)
send-error "Unsupported combination :: ${DISTRO}-${VERSION} + ROCm ${i}"
send-error "Unsupported combination :: ${DISTRO}-${VERSION} + ROCm ${ROCM_VERSION}"
;;
esac
verbose-run docker build . -f ${DOCKER_FILE} --tag ${CONTAINER} --build-arg DISTRO=${DISTRO} --build-arg VERSION=${VERSION} --build-arg AMDGPU_RPM=${ROCM_RPM} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
verbose-run docker build . -f ${DOCKER_FILE} --tag ${CONTAINER} --build-arg DISTRO=${DISTRO} --build-arg VERSION=${VERSION} --build-arg ROCM_VERSION=${ROCM_VERSION} --build-arg TOOLSET_VERSION=${TOOLSET_VERSION} --build-arg AMDGPU_RPM=${ROCM_RPM} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
elif [ "${DISTRO}" = "opensuse" ]; then
case "${VERSION}" in
15.*)
@@ -176,14 +203,14 @@ do
send-error "Invalid opensuse version ${VERSION}. Supported: 15.x"
;;
esac
case "${i}" in
case "${ROCM_VERSION}" in
5.3 | 5.3.*)
ROCM_RPM=${ROCM_VERSION}/sle/${VERSION}/amdgpu-install-${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1.noarch.rpm
;;
5.2 | 5.2.*)
ROCM_RPM=22.20${ROCM_SEP}${ROCM_PATCH}/sle/${VERSION}/amdgpu-install-22.20.${ROCM_VERSN}-1.noarch.rpm
;;
5.1 | 5.1.0)
ROCM_RPM=22.10/sle/15/amdgpu-install-22.10.50100-1.noarch.rpm
;;
5.1.*)
5.1 | 5.1.*)
ROCM_RPM=22.10${ROCM_SEP}${ROCM_PATCH}/sle/15/amdgpu-install-22.10${ROCM_SEP}${ROCM_PATCH}.${ROCM_VERSN}-1.noarch.rpm
;;
5.0 | 5.0.*)
@@ -192,11 +219,13 @@ do
4.5 | 4.5.*)
ROCM_RPM=21.40${ROCM_SEP}${ROCM_PATCH}/sle/15/amdgpu-install-21.40${ROCM_SEP}${ROCM_PATCH}.${ROCM_VERSN}-1.noarch.rpm
;;
0.0)
;;
*)
send-error "Unsupported combination :: ${DISTRO}-${VERSION} + ROCm ${i}"
send-error "Unsupported combination :: ${DISTRO}-${VERSION} + ROCm ${ROCM_VERSION}"
;;
esac
verbose-run docker build . -f ${DOCKER_FILE} --tag ${CONTAINER} --build-arg DISTRO=${DISTRO_IMAGE} --build-arg VERSION=${VERSION} --build-arg AMDGPU_RPM=${ROCM_RPM} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
verbose-run docker build . -f ${DOCKER_FILE} --tag ${CONTAINER} --build-arg DISTRO=${DISTRO_IMAGE} --build-arg VERSION=${VERSION} --build-arg ROCM_VERSION=${ROCM_VERSION} --build-arg AMDGPU_RPM=${ROCM_RPM} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
fi
if [ "${PUSH}" -ne 0 ]; then
docker push ${CONTAINER}
@@ -22,6 +22,7 @@
#include <mpi.h>
#include <array>
#include <cfloat>
#include <chrono>
#include <cmath>
@@ -11,6 +11,7 @@ add_executable(openmp-cg ${CMAKE_CURRENT_SOURCE_DIR}/CG/cg.cpp
add_executable(openmp-lu ${CMAKE_CURRENT_SOURCE_DIR}/LU/lu.cpp
$<TARGET_OBJECTS:openmp-common>)
option(USE_CLANG_OMP "Use the clang OpenMP if available" ON)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
find_package(OpenMP REQUIRED)
target_link_libraries(openmp-common PUBLIC OpenMP::OpenMP_CXX)
@@ -24,7 +25,8 @@ else()
NAMES omp omp5 ${CMAKE_SHARED_LIBRARY_PREFIX}omp${CMAKE_SHARED_LIBRARY_SUFFIX}.5)
if(CLANGXX_EXECUTABLE
AND LIBOMP_LIBRARY
AND COMMAND omnitrace_custom_compilation)
AND COMMAND omnitrace_custom_compilation
AND USE_CLANG_OMP)
target_compile_options(openmp-common PUBLIC -W -Wall -fopenmp=libomp)
target_link_libraries(openmp-common PUBLIC ${LIBOMP_LIBRARY})
omnitrace_custom_compilation(COMPILER ${CLANGXX_EXECUTABLE} TARGET openmp-common)
Submodule projects/rocprofiler-systems/external/timemory updated: ddc49db2ec...c8a52973e5
@@ -4,7 +4,7 @@
: ${BUILD_DIR:=build-release}
: ${VERSION:=0.0.4}
: ${ROCM_VERSION:=4.5.0}
: ${BOOST_VERSION:=1.69.0}
: ${BOOST_VERSION:=1.79.0}
: ${NJOBS:=12}
: ${DISTRO:=""}
: ${LTO:="OFF"}
@@ -19,6 +19,16 @@ verbose-run()
eval $@
}
toupper()
{
echo "$@" | awk -F '\|~\|' '{print toupper($1)}';
}
get-bool()
{
echo "${1}" | egrep -i '^(y|on|yes|true|[1-9])$' &> /dev/null && echo 1 || echo 0
}
if [ -d "$(realpath /tmp)" ]; then
: ${TMPDIR:=/tmp}
export TMPDIR
@@ -28,6 +38,7 @@ fi
: ${SOURCE_DIR:=$(dirname ${SCRIPT_DIR})}
: ${ENABLE_OMNITRACE:=1}
: ${ENABLE_OMNITRACE_AVAIL:=1}
: ${ENABLE_OMNITRACE_SAMPLE:=1}
: ${ENABLE_OMNITRACE_PYTHON:=0}
: ${ENABLE_OMNITRACE_REWRITE:=1}
: ${ENABLE_OMNITRACE_RUNTIME:=1}
@@ -40,6 +51,7 @@ usage()
print_option source-dir "<PATH>" "Location of source directory" "${SOURCE_DIR}"
print_option test-omnitrace "0|1" "Enable testing omnitrace exe" "${ENABLE_OMNITRACE}"
print_option test-omnitrace-avail "0|1" "Enable testing omnitrace-avail" "${ENABLE_OMNITRACE_AVAIL}"
print_option test-omnitrace-sample "0|1" "Enable testing omnitrace-sample" "${ENABLE_OMNITRACE_SAMPLE}"
print_option test-omnitrace-python "0|1" "Enable testing omnitrace-python" "${ENABLE_OMNITRACE_PYTHON}"
print_option test-omnitrace-rewrite "0|1" "Enable testing omnitrace binary rewrite" "${ENABLE_OMNITRACE_REWRITE}"
print_option test-omnitrace-runtime "0|1" "Enable testing omnitrace runtime instrumentation" "${ENABLE_OMNITRACE_RUNTIME}"
@@ -74,11 +86,12 @@ do
if [ -z "${VAL}" ]; then
while [[ $# -gt 0 ]]
do
VAL=${1}
VAL=$(get-bool ${1})
shift
break
done
else
VAL=$(get-bool ${VAL})
ARG="$(echo ${ARG} | sed 's/=/ /1' | awk '{print $1}')"
fi
@@ -97,6 +110,10 @@ do
ENABLE_OMNITRACE_AVAIL=${VAL}
continue
;;
--test-omnitrace-sample)
ENABLE_OMNITRACE_SAMPLE=${VAL}
continue
;;
--test-omnitrace-python)
ENABLE_OMNITRACE_PYTHON=${VAL}
continue
@@ -140,6 +157,14 @@ test-omnitrace-avail()
verbose-run omnitrace-avail -a
}
test-omnitrace-sample()
{
verbose-run which omnitrace-sample
verbose-run ldd $(which omnitrace-sample)
verbose-run omnitrace-sample --help
verbose-run omnitrace-sample --cputime 100 --realtime 50 --hsa-interrupt 0 -TPH -- python3 ${SOURCE_DIR}/examples/python/external.py -n 5 -v 20
}
test-omnitrace-python()
{
verbose-run which omnitrace-python
@@ -173,6 +198,7 @@ test-omnitrace-critical-trace()
if [ "${ENABLE_OMNITRACE}" -ne 0 ]; then verbose-run test-omnitrace; fi
if [ "${ENABLE_OMNITRACE_AVAIL}" -ne 0 ]; then verbose-run test-omnitrace-avail; fi
if [ "${ENABLE_OMNITRACE_SAMPLE}" -ne 0 ]; then verbose-run test-omnitrace-sample; fi
if [ "${ENABLE_OMNITRACE_PYTHON}" -ne 0 ]; then verbose-run test-omnitrace-python; fi
if [ "${ENABLE_OMNITRACE_REWRITE}" -ne 0 ]; then verbose-run test-omnitrace-rewrite; fi
if [ "${ENABLE_OMNITRACE_RUNTIME}" -ne 0 ]; then verbose-run test-omnitrace-runtime; fi
@@ -7,6 +7,7 @@
add_executable(omnitrace-sample ${CMAKE_CURRENT_LIST_DIR}/omnitrace-sample.cpp
${CMAKE_CURRENT_LIST_DIR}/impl.cpp)
target_compile_definitions(omnitrace-sample PRIVATE TIMEMORY_CMAKE=1)
target_include_directories(omnitrace-sample PRIVATE ${CMAKE_CURRENT_LIST_DIR})
target_link_libraries(
omnitrace-sample
@@ -43,6 +43,14 @@
#include <unistd.h>
#include <vector>
#if !defined(OMNITRACE_USE_ROCTRACER)
# define OMNITRACE_USE_ROCTRACER 0
#endif
#if !defined(OMNITRACE_USE_ROCPROFILER)
# define OMNITRACE_USE_ROCPROFILER 0
#endif
namespace color = tim::log::color;
using tim::log::stream;
using namespace timemory::join;
@@ -231,8 +239,12 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
%{INDENT}% 1 do not modify how ROCm is notified about kernel completion)";
auto _realtime_reqs = (get_env("HSA_ENABLE_INTERRUPT", std::string{}, false).empty())
? std::initializer_list<std::string>{ "hsa-interrupt" }
: std::initializer_list<std::string>{};
? std::vector<std::string>{ "hsa-interrupt" }
: std::vector<std::string>{};
#if OMNITRACE_USE_ROCTRACER == 0 && OMNITRACE_USE_ROCPROFILER == 0
_realtime_reqs.clear();
#endif
const auto* _trace_policy_desc =
R"(Policy for new data when the buffer size limit is reached:
@@ -516,7 +528,7 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
parser.add_argument({ "--realtime" }, _realtime_desc)
.min_count(0)
.requires(_realtime_reqs)
.requires(std::move(_realtime_reqs))
.action([&](parser_t& p) {
auto _v = p.get<std::deque<std::string>>("realtime");
update_env(_env, "OMNITRACE_SAMPLING_REALTIME", true);
@@ -652,10 +664,30 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
update_env(_env, "HSA_ENABLE_INTERRUPT", p.get<int>("hsa-interrupt"));
});
auto _args = parser.parse_known_args(argc, argv);
auto _cerr = std::get<0>(_args);
auto _cmdc = std::get<1>(_args);
auto* _cmdv = std::get<2>(_args);
auto _inpv = std::vector<char*>{};
auto _outv = std::vector<char*>{};
bool _hash = false;
for(int i = 0; i < argc; ++i)
{
if(_hash)
{
_outv.emplace_back(argv[i]);
}
else if(std::string_view{ argv[i] } == "--")
{
_hash = true;
}
else
{
_inpv.emplace_back(argv[i]);
}
}
auto _cerr = parser.parse_args(_inpv.size(), _inpv.data());
if(help_check(parser, argc, argv))
help_action(parser);
else if(_cerr)
throw std::runtime_error(_cerr.what());
if(parser.exists("realtime") && !parser.exists("cputime"))
update_env(_env, "OMNITRACE_SAMPLING_CPUTIME", false);
@@ -663,14 +695,5 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
throw std::runtime_error(
"Error! '--profile' argument conflicts with '--flat-profile' argument");
if(help_check(parser, _cmdc, _cmdv)) help_action(parser);
if(_cerr) throw std::runtime_error(_cerr.what());
std::vector<char*> _argv = {};
_argv.reserve(_cmdc);
for(int i = 1; i < _cmdc; ++i)
_argv.emplace_back(_cmdv[i]);
return _argv;
return _outv;
}
@@ -43,8 +43,7 @@ main(int argc, char** argv)
std::vector<char*> _argv = {};
if(_has_double_hyphen)
{
auto _size = _env.size();
_argv = parse_args(argc, argv, _env);
_argv = parse_args(argc, argv, _env);
}
else
{
@@ -2181,7 +2181,7 @@ main(int argc, char** argv)
TIMEMORY_PIPE* ldd = tim::popen::popen(cmdv0.c_str());
tim::set_env("LD_TRACE_LOADED_OBJECTS", "0", 1);
strvec_t linked_libraries = tim::popen::read_fork(ldd);
strvec_t linked_libraries = tim::popen::read_ldd_fork(ldd);
auto perr = tim::popen::pclose(ldd);
if(perr != 0) perror("Error in omnitrace_fork");
@@ -2271,10 +2271,10 @@ main(int argc, char** argv)
// cleanup
for(int i = 0; i < argc; ++i)
delete[] _argv[i];
free(_argv[i]);
delete[] _argv;
for(int i = 0; i < _cmdc; ++i)
delete[] _cmdv[i];
free(_cmdv[i]);
delete[] _cmdv;
verbprintf(0, "End of omnitrace\n");
@@ -99,6 +99,7 @@ void
pthread_mutex_gotcha::configure()
{
pthread_mutex_gotcha_t::get_initializer() = []() {
if(!tim::settings::enabled()) return;
if(config::get_trace_thread_locks())
{
pthread_mutex_gotcha_t::configure(
@@ -754,19 +754,23 @@ configure_settings(bool _init)
if(_config->get_suppress_config()) continue;
OMNITRACE_BASIC_VERBOSE(1, "Reading config file %s\n", itr.c_str());
_config->read(itr);
if(_main_proc &&
if(_config->read(itr) && _main_proc &&
((_config->get<bool>("OMNITRACE_CI") && settings::verbose() >= 0) ||
settings::verbose() >= 1 || settings::debug()))
{
std::ifstream _in{ itr };
auto fitr = settings::format(itr, _config->get_tag());
std::ifstream _in{ fitr };
std::stringstream _iss{};
while(_in)
{
std::string _s{};
getline(_in, _s);
_iss << _s << "\n";
std::string _line{};
getline(_in, _line);
_iss << _line << "\n";
}
if(!_iss.str().empty())
{
OMNITRACE_BASIC_PRINT("config file '%s':\n%s\n", fitr.c_str(),
_iss.str().c_str());
}
if(!_iss.str().empty())
{
@@ -21,6 +21,8 @@
// SOFTWARE.
#include "library/tracing.hpp"
#include "library/config.hpp"
#include "library/state.hpp"
#include "library/thread_info.hpp"
namespace omnitrace
@@ -67,8 +69,9 @@ void
record_thread_start_time()
{
static thread_local std::once_flag _once{};
std::call_once(_once,
[]() { thread_info::set_start(comp::wall_clock::record(), true); });
std::call_once(_once, []() {
thread_info::set_start(comp::wall_clock::record(), get_mode() != Mode::Sampling);
});
}
} // namespace tracing
} // namespace omnitrace
@@ -194,7 +194,7 @@ endif()
function(OMNITRACE_WRITE_TEST_CONFIG _FILE _ENV)
set(_ENV_ONLY
"OMNITRACE_(USE_MPIP|DEBUG_SETTINGS|FORCE_ROCPROFILER_INIT|DEFAULT_MIN_INSTRUCTIONS)="
"OMNITRACE_(USE_MPIP|DEBUG_SETTINGS|FORCE_ROCPROFILER_INIT|DEFAULT_MIN_INSTRUCTIONS|COLORIZED_LOG)="
)
set(_FILE_CONTENTS)
set(_ENV_CONTENTS)
@@ -993,6 +993,7 @@ omnitrace_add_test(
set(_ompt_preload_environ
"${_ompt_environment}"
"OMNITRACE_VERBOSE=2"
"OMNITRACE_USE_OMPT=OFF"
"OMNITRACE_USE_SAMPLING=ON"
"OMNITRACE_USE_PROCESS_SAMPLING=OFF"
@@ -1002,7 +1003,8 @@ set(_ompt_preload_environ
"OMNITRACE_SAMPLING_CPUTIME=ON"
"OMNITRACE_SAMPLING_REALTIME=ON"
"OMNITRACE_SAMPLING_CPUTIME_FREQ=1000"
"OMNITRACE_SAMPLING_REALTIME_FREQ=500")
"OMNITRACE_SAMPLING_REALTIME_FREQ=500"
"OMNITRACE_COLORIZED_LOG=OFF")
set(_ompt_preload_samp_regex
"Sampler for thread 0 will be triggered 1000.0x per second of CPU-time(.*)Sampler for thread 0 will be triggered 500.0x per second of wall-time(.*)Sampling will be disabled after 0.250000 seconds(.*)Sampling duration of 0.250000 seconds has elapsed. Shutting down sampling"