Skip to content

Commit c68711f

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 c68711f

File tree

4 files changed

+39
-11
lines changed

4 files changed

+39
-11
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: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ credentials:
2929

3030
volumes:
3131
- {mountPath: /hpc/local/bin, hostPath: /hpc/local/bin}
32-
- {mountPath: /hpc/local/oss, hostPath: /hpc/local/oss}
32+
#- {mountPath: /hpc/local/oss, hostPath: /hpc/local/oss}
3333
- {mountPath: /hpc/local/oss/xlio, hostPath: /hpc/local/oss/xlio}
3434
- {mountPath: /auto/sw_tools/Commercial, hostPath: /auto/sw_tools/Commercial}
35-
- {mountPath: /hpc/local/commercial, hostPath: /hpc/local/commercial}
36-
- {mountPath: /hpc/local/etc/modulefiles, hostPath: /hpc/local/etc/modulefiles}
35+
#- {mountPath: /hpc/local/commercial, hostPath: /hpc/local/commercial}
36+
#- {mountPath: /hpc/local/etc/modulefiles, hostPath: /hpc/local/etc/modulefiles}
3737
# for Antivirus
3838
- {mountPath: /auto/BACKUP/logs_of_LOGS, hostPath: /auto/BACKUP/logs_of_LOGS}
3939
- {mountPath: /auto/GLIT/SCRIPTS/HELPERS, hostPath: /auto/GLIT/SCRIPTS/HELPERS}
@@ -87,6 +87,7 @@ 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+
- {name: 'compiler', url: 'harbor.mellanox.com/swx-infra/media/xlio/x86_64/rhel8.6/compiler:20251106', category: 'tool', arch: 'x86_64'}
9091
- {name: 'header-check', url: 'harbor.mellanox.com/toolbox/header_check:0.0.58', category: 'tool', arch: 'x86_64', tag: '0.0.58'}
9192
# static tests
9293
- {
@@ -222,12 +223,12 @@ steps:
222223
- "{nodeLabel: 'skip-agent'}"
223224
run: |
224225
echo "Installing DOCA: ${DOCA_VERSION} ..."
225-
.ci/scripts/doca_install.sh
226+
.ci/scripts/doca_install.sh
226227
227228
- name: Install Doca-host on Tools
228229
run: |
229230
echo "Installing DOCA: ${DOCA_VERSION} ..."
230-
.ci/scripts/doca_install.sh
231+
.ci/scripts/doca_install.sh
231232
containerSelector:
232233
- "{name: 'style', category: 'tool', variant: 1}"
233234
agentSelector:
@@ -323,7 +324,7 @@ steps:
323324
- name: Compiler
324325
enable: ${do_compiler}
325326
containerSelector:
326-
- "{name: 'toolbox', category: 'tool'}"
327+
- "{name: 'compiler', category: 'tool'}"
327328
agentSelector:
328329
- "{nodeLabel: 'skip-agent'}"
329330
run: |

contrib/jenkins_tests/compiler.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ rm -rf $compiler_dir
1010
mkdir -p $compiler_dir
1111
cd $compiler_dir
1212

13-
compiler_list="clang:clang++:dev/clang-9.0.1 icc:icpc:intel/ics-18.0.4 icc:icpc:intel/ics-19.1.1 gcc:g++:dev/gcc-8.3.0 gcc:g++:dev/gcc-9.3.0 gcc:g++:dev/gcc-10.1.0"
13+
compiler_list="clang:clang++:dev/clang-9.0.1 gcc:g++:dev/gcc-8.3.0 gcc:g++:dev/gcc-9.3.0 gcc:g++:dev/gcc-10.1.0"
14+
15+
# compiler_list="clang:clang++:dev/clang-9.0.1 icc:icpc:intel/ics-18.0.4 icc:icpc:intel/ics-19.1.1 gcc:g++:dev/gcc-8.3.0 gcc:g++:dev/gcc-9.3.0 gcc:g++:dev/gcc-10.1.0"
1416

1517
compiler_tap=${WORKSPACE}/${prefix}/compiler.tap
1618
echo "1..$(echo $compiler_list | tr " " "\n" | wc -l)" > $compiler_tap

third_party/json-c/json_config.h

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)