-
Notifications
You must be signed in to change notification settings - Fork 0
/
mpi
39 lines (34 loc) · 1.49 KB
/
mpi
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
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt -y update
RUN apt -y upgrade
RUN apt -y install \
binutils build-essential libtool texinfo gzip zip unzip patchutils curl git \
make cmake ninja-build automake bison flex gperf grep sed gawk bc \
zlib1g-dev libexpat1-dev libmpc-dev libglib2.0-dev libfdt-dev libpixman-1-dev \
vim tmux python-is-python3
RUN mkdir -p /riscv/_install
WORKDIR /riscv
ENV PATH=`/riscv/_install/bin:$PATH`
RUN git clone --recursive https://github.com/riscv/riscv-gnu-toolchain -j`nproc`
WORKDIR /riscv/riscv-gnu-toolchain
RUN git checkout --recurse-submodules cc1075c916491ac5bd6cae419f6ca371a268b10d
# https://stackoverflow.com/a/71730953
WORKDIR /riscv/riscv-gnu-toolchain/riscv-gcc
RUN git checkout riscv-gcc-rvv-next
WORKDIR /riscv/riscv-gnu-toolchain/riscv-binutils-gdb
RUN git checkout riscv-binutils-2.38
WORKDIR /riscv/riscv-gnu-toolchain/
RUN ./configure --prefix=/riscv/_install --enable-multilib
RUN make linux -j`nproc`
RUN make install
RUN mkdir -p /mpi/_install
WORKDIR /mpi
RUN apt -y install m4 autoconf automake libtool pandoc wget
# https://www.open-mpi.org/software/ompi/v4.1/
RUN wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.3.tar.gz && \
tar xf openmpi-4.1.3.tar.gz
WORKDIR /mpi/openmpi-4.1.3
RUN ./configure --prefix=/mpi/_install --enable-script-wrapper-compilers --host=riscv64 CC=/riscv/_install/bin/riscv64-unknown-linux-gnu-gcc CXX=/riscv/_install/bin/riscv64-unknown-linux-gnu-g++
RUN make all -j`nproc`
RUN make install