Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0a3aa13

Browse files
committedNov 21, 2022
misc: Add Omnitrace to Dockerfile.amd
1 parent 85a9aa5 commit 0a3aa13

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed
 

‎docker/Dockerfile.amd

+10
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ ENV PATH=${PATH}:/opt/openmpi/bin:$AOMP/bin
4545
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/openmpi/lib:$AOMP/lib
4646
ENV OMPI_CC=$AOMP/bin/clang
4747

48+
# Install Omnitrace, an AMDResearch profiling tool which is de facto the best profiler from AMD
49+
RUN wget https://github.com/AMDResearch/omnitrace/releases/download/v1.7.3/omnitrace-1.7.3-ubuntu-20.04-ROCm-50100-PAPI-OMPT-Python3.sh -q
50+
RUN mv omnitrace-1.7.3-ubuntu-20.04-ROCm-50100-PAPI-OMPT-Python3.sh omnitrace-installer.sh && \
51+
chmod +x omnitrace-installer.sh && \
52+
mkdir -p /opt/omnitrace && \
53+
mv omnitrace-installer.sh /opt/omnitrace && \
54+
cd /opt/omnitrace && \
55+
./omnitrace-installer.sh --skip-license && \
56+
cd -
57+
4858
# Devito env
4959
ENV DEVITO_ARCH="aomp"
5060
ENV DEVITO_PLATFORM="amdgpuX"

‎docker/entrypoint.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@ if [[ -z "${DEPLOY_ENV}" ]]; then
1515
./codecov -t -t ${CODECOV_TOKEN} -F "${DEVITO_ARCH}-${DEVITO-PLATFORM}"
1616
else
1717
exec "$@"
18-
fi
18+
fi
19+
20+
if [[ -n "${ROCM_VERSION}" ]]; then
21+
echo "sourcing Omnitrace"
22+
source /opt/omnitrace/share/omnitrace/setup-env.sh
23+
fi

0 commit comments

Comments
 (0)
Please sign in to comment.