Skip to content

Commit 75be208

Browse files
committed
Minor tidy of mpi def files
1 parent 52051f3 commit 75be208

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mpi.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ example can be used:
151151
152152
%environment
153153
# Point to MPICH binaries, libraries man pages
154-
export MPICH_DIR=/opt/mpich-4.1.1
154+
export MPICH_DIR=/opt/mpich
155155
export PATH="$MPICH_DIR/bin:$PATH"
156156
export LD_LIBRARY_PATH="$MPICH_DIR/lib:$LD_LIBRARY_PATH"
157157
export MANPATH=$MPICH_DIR/share/man:$MANPATH
158158
159159
%post
160160
echo "Installing required packages..."
161161
export DEBIAN_FRONTEND=noninteractive
162-
apt-get update && apt-get install -y wget git bash gcc gfortran g++ make
162+
apt-get update && apt-get install -y wget git bash gcc gfortran g++ make python3-dev
163163
164164
# Information about the version of MPICH to use
165165
export MPICH_VERSION=4.1.1
@@ -172,7 +172,7 @@ example can be used:
172172
# Download
173173
cd /tmp/mpich && wget -O mpich-$MPICH_VERSION.tar.gz $MPICH_URL && tar xzf mpich-$MPICH_VERSION.tar.gz
174174
# Compile and install
175-
cd /tmp/mpich/mpich-$MPICH_VERSION && ./configure --prefix=$MPICH_DIR && make install
175+
cd /tmp/mpich/mpich-$MPICH_VERSION && ./configure --prefix=$MPICH_DIR && make -j$(nproc) install
176176
177177
# Set env variables so we can compile our application
178178
export PATH=$MPICH_DIR/bin:$PATH
@@ -219,13 +219,13 @@ If the host MPI is Open MPI, the definition file looks like:
219219
echo "Installing Open MPI"
220220
export OMPI_DIR=/opt/ompi
221221
export OMPI_VERSION=4.1.5
222-
export OMPI_URL="https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-$OMPI_VERSION.tar.bz2"
222+
export OMPI_URL="https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-$OMPI_VERSION.tar.bz2"
223223
mkdir -p /tmp/ompi
224224
mkdir -p /opt
225225
# Download
226226
cd /tmp/ompi && wget -O openmpi-$OMPI_VERSION.tar.bz2 $OMPI_URL && tar -xjf openmpi-$OMPI_VERSION.tar.bz2
227227
# Compile and install
228-
cd /tmp/ompi/openmpi-$OMPI_VERSION && ./configure --prefix=$OMPI_DIR && make -j8 install
228+
cd /tmp/ompi/openmpi-$OMPI_VERSION && ./configure --prefix=$OMPI_DIR && make -j$(nproc) install
229229
230230
# Set env variables so we can compile our application
231231
export PATH=$OMPI_DIR/bin:$PATH

0 commit comments

Comments
 (0)