-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdarshan_exp
65 lines (56 loc) · 1.94 KB
/
darshan_exp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# ------------------------------------------------------------------------------
# Dockerfile : Instrumentation d'une application MPI avec Darshan
# ------------------------------------------------------------------------------
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
# 1) Installation des paquets nécessaires
RUN apt-get update -y && \
apt-get install -y \
git \
build-essential \
wget \
curl \
cmake \
python3 \
python3-pip \
openmpi-bin \
libopenmpi-dev \
zlib1g-dev \
libbz2-dev \
libcurl4-openssl-dev \
bzip2
# 2) Cloner le dépôt Darshan et se positionner sur le tag voulu
ARG DARSHAN_TAG=darshan-3.4.3
RUN git clone https://github.com/darshan-hpc/darshan.git /opt/darshan && \
cd /opt/darshan && \
git checkout ${DARSHAN_TAG} && \
./prepare.sh
# 3) Compiler et installer Darshan (runtime)
RUN cd /opt/darshan/darshan-runtime && \
./configure --prefix=/opt/darshan-install \
--with-mem-align=8 \
CC="mpicc" \
--with-log-path=/tmp \
--with-jobid-env=DOCKER_JOBID \
--disable-cuserid \
--disable-groupname && \
make -j && \
make install
# 4) (Optionnel) Compiler et installer Darshan (utilitaires)
# aussi darshan-parser, darshan-job-summary.pl, etc.
RUN cd /opt/darshan/darshan-util && \
./configure --prefix=/opt/darshan-install \
--with-zlib \
--enable-shared \
CFLAGS='-fPIC -O3' && \
make -j && \
make install
# 5) Variables d'environnement pour Darshan
ENV PATH="/opt/darshan-install/bin:${PATH}"
ENV LD_LIBRARY_PATH="/opt/darshan-install/lib:${LD_LIBRARY_PATH}"
# 6) Copie et compilation d'un exemple MPI
COPY my_mpi_io.c /usr/local/src/
WORKDIR /usr/local/src
RUN mpicc my_mpi_io.c -o my_mpi_io
# 7) Commande par défaut : bash interactif
CMD ["/bin/bash"]