Skip to content

Commit 82df1be

Browse files
committed
[CI] issue: HPCINFRA-4016 Optimize compiler step
The compiler step currently takes a long time to run (about 20–40 minutes). Add a Dockerfile that copies the compiler modulefiles locally. Run the compiler step on this image to avoid NFS access and reduce the step duration. Signed-off-by: Noam Tsemah <[email protected]>
1 parent a72ad32 commit 82df1be

File tree

3 files changed

+44
-3
lines changed

3 files changed

+44
-3
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
ARG ARCH=x86_64
2+
FROM harbor.mellanox.com/hpcx/$ARCH/rhel8.6/builder:inbox as builder
3+
4+
#Builder stage to access compilers from mounted NFS
5+
RUN mkdir -p /tmp/compilers/oss/clang \
6+
&& mkdir -p /tmp/compilers/oss \
7+
&& mkdir -p /tmp/compilers/commercial/intel \
8+
&& mkdir -p /tmp/compilers/etc/modulefiles/dev \
9+
&& mkdir -p /tmp/compilers/etc/modulefiles/intel
10+
11+
# Copy compilers from NFS to temp location
12+
RUN if [ -d /hpc/local/oss/clang/9.0.1 ]; then cp -r /hpc/local/oss/clang/9.0.1 /tmp/compilers/oss/clang/; fi && \
13+
if [ -d /hpc/local/oss/gcc-8.3.0 ]; then cp -r /hpc/local/oss/gcc-8.3.0 /tmp/compilers/oss/; fi && \
14+
if [ -d /hpc/local/oss/gcc-9.3.0 ]; then cp -r /hpc/local/oss/gcc-9.3.0 /tmp/compilers/oss/; fi && \
15+
if [ -d /hpc/local/oss/gcc-10.1.0 ]; then cp -r /hpc/local/oss/gcc-10.1.0 /tmp/compilers/oss/; fi && \
16+
#if [ -d /hpc/local/commercial/intel/parallel_studio_xe_2018_update4 ]; then cp -r /hpc/local/commercial/intel/parallel_studio_xe_2018_update4 /tmp/compilers/commercial/intel/; fi && \
17+
#if [ -d /hpc/local/commercial/intel/parallel_studio_xe_2020_update1 ]; then cp -r /hpc/local/commercial/intel/parallel_studio_xe_2020_update1 /tmp/compilers/commercial/intel/; fi && \
18+
if [ -e /hpc/local/etc/modulefiles/dev/clang-9.0.1 ]; then cp -r /hpc/local/etc/modulefiles/dev/clang-9.0.1 /tmp/compilers/etc/modulefiles/dev/; fi && \
19+
if [ -e /hpc/local/etc/modulefiles/dev/gcc-8.3.0 ]; then cp -r /hpc/local/etc/modulefiles/dev/gcc-8.3.0 /tmp/compilers/etc/modulefiles/dev/; fi && \
20+
if [ -e /hpc/local/etc/modulefiles/dev/gcc-9.3.0 ]; then cp -r /hpc/local/etc/modulefiles/dev/gcc-9.3.0 /tmp/compilers/etc/modulefiles/dev/; fi && \
21+
if [ -e /hpc/local/etc/modulefiles/dev/gcc-10.1.0 ]; then cp -r /hpc/local/etc/modulefiles/dev/gcc-10.1.0 /tmp/compilers/etc/modulefiles/dev/; fi && \
22+
if [ -e /hpc/local/etc/modulefiles/intel/ics-18.0.4 ]; then cp -r /hpc/local/etc/modulefiles/intel/ics-18.0.4 /tmp/compilers/etc/modulefiles/intel/; fi && \
23+
if [ -e /hpc/local/etc/modulefiles/intel/ics-19.1.1 ]; then cp -r /hpc/local/etc/modulefiles/intel/ics-19.1.1 /tmp/compilers/etc/modulefiles/intel/; fi
24+
25+
26+
FROM harbor.mellanox.com/hpcx/$ARCH/rhel8.6/builder:inbox
27+
28+
# Copy compilers from builder stage
29+
COPY --from=builder /tmp/compilers/ /hpc/local/

.ci/matrix_job.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ runs_on_dockers:
8787
category: 'tool'
8888
}
8989
- {name: 'toolbox', url: 'harbor.mellanox.com/hpcx/x86_64/rhel8.6/builder:inbox', category: 'tool', arch: 'x86_64'}
90+
- {
91+
file: '.ci/dockerfiles/Dockerfile.rhel8.6.compiler',
92+
arch: 'x86_64',
93+
name: 'compiler',
94+
uri: 'xlio/$arch/rhel8.6/$name',
95+
tag: '20251110',
96+
build_args: '--volume /hpc/local:/hpc/local:ro --no-cache',
97+
category: 'tool'
98+
}
9099
- {name: 'header-check', url: 'harbor.mellanox.com/toolbox/header_check:0.0.58', category: 'tool', arch: 'x86_64', tag: '0.0.58'}
91100
# static tests
92101
- {
@@ -222,12 +231,12 @@ steps:
222231
- "{nodeLabel: 'skip-agent'}"
223232
run: |
224233
echo "Installing DOCA: ${DOCA_VERSION} ..."
225-
.ci/scripts/doca_install.sh
234+
.ci/scripts/doca_install.sh
226235
227236
- name: Install Doca-host on Tools
228237
run: |
229238
echo "Installing DOCA: ${DOCA_VERSION} ..."
230-
.ci/scripts/doca_install.sh
239+
.ci/scripts/doca_install.sh
231240
containerSelector:
232241
- "{name: 'style', category: 'tool', variant: 1}"
233242
agentSelector:
@@ -323,7 +332,7 @@ steps:
323332
- name: Compiler
324333
enable: ${do_compiler}
325334
containerSelector:
326-
- "{name: 'toolbox', category: 'tool'}"
335+
- "{name: 'compiler', category: 'tool'}"
327336
agentSelector:
328337
- "{nodeLabel: 'skip-agent'}"
329338
run: |

contrib/jenkins_tests/compiler.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ source $(dirname $0)/globals.sh
44

55
echo "Checking for compiler ..."
66

7+
echo "Checking for mounted volumes ..."
8+
mount | grep hpc
9+
710
cd $WORKSPACE
811

912
rm -rf $compiler_dir

0 commit comments

Comments
 (0)