Skip to content

Commit

Permalink
misc: Add Omnitrace to Dockerfile.amd
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Nov 22, 2022
1 parent f065444 commit 39e3a3c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions docker/Dockerfile.amd
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ ENV PATH=${PATH}:/opt/openmpi/bin:$AOMP/bin
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/openmpi/lib:$AOMP/lib
ENV OMPI_CC=$AOMP/bin/clang

# Install Omnitrace, an AMDResearch profiling tool which is de facto the best profiler from AMD
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
RUN mv omnitrace-1.7.3-ubuntu-20.04-ROCm-50100-PAPI-OMPT-Python3.sh omnitrace-installer.sh && \
chmod +x omnitrace-installer.sh && \
mkdir -p /opt/omnitrace && \
mv omnitrace-installer.sh /opt/omnitrace && \
cd /opt/omnitrace && \
./omnitrace-installer.sh --skip-license && \
cd -

# Devito env
ENV DEVITO_ARCH="aomp"
ENV DEVITO_PLATFORM="amdgpuX"
Expand Down
7 changes: 6 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ if [[ -z "${DEPLOY_ENV}" ]]; then
./codecov -t -t ${CODECOV_TOKEN} -F "${DEVITO_ARCH}-${DEVITO-PLATFORM}"
else
exec "$@"
fi
fi

if [[ -n "${ROCM_VERSION}" ]]; then
echo "sourcing Omnitrace"
source /opt/omnitrace/share/omnitrace/setup-env.sh
fi

0 comments on commit 39e3a3c

Please sign in to comment.