-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from jithinjosepkl/master
CentOS HPC image
- Loading branch information
Showing
16 changed files
with
295 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common/hpc-tuning.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
# install utils | ||
./install_utils.sh | ||
|
||
# install compilers | ||
./install_gcc-8.2.sh | ||
|
||
# install mellanox ofed | ||
./install_mellanoxofed.sh | ||
|
||
# install mpi libraries | ||
./install_mpis.sh | ||
|
||
# optimizations | ||
./hpc-tuning.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../common/install_gcc-8.2.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
wget https://www.mellanox.com/downloads/ofed/MLNX_OFED-4.7-1.0.0.1/MLNX_OFED_LINUX-4.7-1.0.0.1-rhel7.6-x86_64.tgz | ||
tar zxvf MLNX_OFED_LINUX-4.7-1.0.0.1-rhel7.6-x86_64.tgz | ||
./MLNX_OFED_LINUX-4.7-1.0.0.1-rhel7.6-x86_64/mlnxofedinstall --force | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../common/install_mpis.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common/install_utils.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common/hpc-tuning.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
# install utils | ||
./install_utils.sh | ||
|
||
# install compilers | ||
./install_gcc-8.2.sh | ||
|
||
# install mellanox ofed | ||
./install_mellanoxofed.sh | ||
|
||
# install mpi libraries | ||
./install_mpis.sh | ||
|
||
# optimizations | ||
./hpc-tuning.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../common/install_gcc-8.2.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
wget http://content.mellanox.com/ofed/MLNX_OFED-4.7-1.0.0.1/MLNX_OFED_LINUX-4.7-1.0.0.1-rhel7.7-x86_64.tgz | ||
tar zxvf MLNX_OFED_LINUX-4.7-1.0.0.1-rhel7.7-x86_64.tgz | ||
./MLNX_OFED_LINUX-4.7-1.0.0.1-rhel7.7-x86_64/mlnxofedinstall --force | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../common/install_mpis.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common/install_utils.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Disable some unneeded services by default (administrators can re-enable if desired) | ||
systemctl disable wpa_supplicant | ||
systemctl disable abrtd | ||
systemctl disable firewalld | ||
|
||
# Update memory limits | ||
cat << EOF >> /etc/security/limits.conf | ||
* hard memlock unlimited | ||
* soft memlock unlimited | ||
* soft nofile 65535 | ||
* hard nofile 65535 | ||
EOF | ||
|
||
# Enable reclaim mode | ||
echo "vm.zone_reclaim_mode = 1" >> /etc/sysctl.conf | ||
sysctl -p | ||
|
||
# Configure WALinuxAgent | ||
sed -i -e 's/# OS.EnableRDMA=y/OS.EnableRDMA=y/g' /etc/waagent.conf | ||
sed -i -e 's/CGroups.EnforceLimits=n/CGroups.EnforceLimits=y/g' /etc/waagent.conf | ||
systemctl enable waagent | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
# Install pre-reqs and development tools | ||
yum groupinstall -y "Development Tools" | ||
yum install -y numactl \ | ||
numactl-devel \ | ||
libxml2-devel \ | ||
byacc \ | ||
environment-modules \ | ||
python-devel \ | ||
python-setuptools \ | ||
gtk2 \ | ||
atk \ | ||
cairo \ | ||
tcl \ | ||
tk \ | ||
m4 \ | ||
glibc-devel \ | ||
glibc-static \ | ||
libudev-devel \ | ||
binutils \ | ||
binutils-devel \ | ||
selinux-policy-devel \ | ||
kernel-headers \ | ||
nfs-utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
set -x | ||
|
||
# Install gcc 8.2 | ||
|
||
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2 | ||
tar -xvf gmp-6.1.0.tar.bz2 | ||
cd ./gmp-6.1.0 | ||
./configure && make -j && make install | ||
cd .. | ||
|
||
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2 | ||
tar -xvf mpfr-3.1.4.tar.bz2 | ||
cd mpfr-3.1.4 | ||
./configure && make -j && make install | ||
cd .. | ||
|
||
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz | ||
tar -xvf mpc-1.0.3.tar.gz | ||
cd mpc-1.0.3 | ||
./configure && make -j && make install | ||
cd .. | ||
|
||
# install gcc 8.2 | ||
wget https://ftp.gnu.org/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.gz | ||
tar -xvf gcc-8.2.0.tar.gz | ||
cd gcc-8.2.0 | ||
./configure --disable-multilib --prefix=/opt/gcc-8.2.0 && make -j && make install | ||
cd .. | ||
|
||
|
||
# create modulefile | ||
cat << EOF >> /usr/share/Modules/modulefiles/gcc-8.2.0 | ||
#%Module 1.0 | ||
# | ||
# GCC 8.2.0 | ||
# | ||
prepend-path PATH /opt/gcc-8.2.0/bin | ||
prepend-path LD_LIBRARY_PATH /opt/gcc-8.2.0/lib64 | ||
setenv CC /opt/gcc-8.2.0/bin/gcc | ||
setenv GCC /opt/gcc-8.2.0/bin/gcc | ||
EOF | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# Load gcc-8.2.0 | ||
export PATH=/opt/gcc-8.2.0/bin:$PATH | ||
export LD_LIBRARY_PATH=/opt/gcc-8.2.0/lib64:$LD_LIBRARY_PATH | ||
set CC=/opt/gcc-8.2.0/bin/gcc | ||
set GCC=/opt/gcc-8.2.0/bin/gcc | ||
|
||
|
||
INSTALL_PREFIX=/opt | ||
|
||
# HPC-X v2.5.0 | ||
HPCX_VERSION="v2.5.0" | ||
wget http://www.mellanox.com/downloads/hpc/hpc-x/v2.5/hpcx-v2.5.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.6-x86_64.tbz | ||
tar -xvf hpcx-v2.5.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.6-x86_64.tbz | ||
mv hpcx-v2.5.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.6-x86_64 ${INSTALL_PREFIX} | ||
HPCX_PATH=${INSTALL_PREFIX}/hpcx-v2.5.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.6-x86_64 | ||
HCOLL_PATH=${HPCX_PATH}/hcoll | ||
UCX_PATH=${HPCX_PATH}/ucx | ||
|
||
# MVAPICH2 2.3.2 | ||
MV2_VERSION="2.3.2" | ||
wget http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-${MV2_VERSION}.tar.gz | ||
tar -xvf mvapich2-${MV2_VERSION}.tar.gz | ||
cd mvapich2-${MV2_VERSION} | ||
./configure --prefix=${INSTALL_PREFIX}/mvapich2-${MV2_VERSION} --enable-g=none --enable-fast=yes && make -j && make install | ||
cd .. | ||
|
||
|
||
# OpenMPI 4.0.1 | ||
OMPI_VERSION="4.0.1" | ||
wget https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-${OMPI_VERSION}.tar.gz | ||
tar -xvf openmpi-${OMPI_VERSION}.tar.gz | ||
cd openmpi-${OMPI_VERSION} | ||
./configure --prefix=${INSTALL_PREFIX}/openmpi-${OMPI_VERSION} --with-ucx=${UCX_PATH} --with-hcoll=${HCOLL_PATH} --enable-mpirun-prefix-by-default --with-platform=contrib/platform/mellanox/optimized && make -j && make install | ||
cd .. | ||
|
||
|
||
# Intel MPI 2019 (update 5) | ||
IMPI_2019_VERSION="2019.5.281" | ||
wget http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15838/l_mpi_${IMPI_2019_VERSION}.tgz | ||
tar -xvf l_mpi_${IMPI_2019_VERSION}.tgz | ||
cd l_mpi_${IMPI_2019_VERSION} | ||
sed -i -e 's/ACCEPT_EULA=decline/ACCEPT_EULA=accept/g' silent.cfg | ||
./install.sh --silent ./silent.cfg | ||
cd .. | ||
|
||
|
||
# Intel MPI 2018 (update 4) | ||
IMPI_VERSION="2018.4.274" | ||
wget http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13651/l_mpi_${IMPI_VERSION}.tgz | ||
tar -xvf l_mpi_${IMPI_VERSION}.tgz | ||
cd l_mpi_${IMPI_VERSION} | ||
sed -i -e 's/ACCEPT_EULA=decline/ACCEPT_EULA=accept/g' silent.cfg | ||
./install.sh --silent ./silent.cfg | ||
cd .. | ||
|
||
|
||
# Setup module files for MPIs | ||
mkdir -p /usr/share/Modules/modulefiles/mpi/ | ||
|
||
# HPC-X | ||
cat << EOF >> /usr/share/Modules/modulefiles/mpi/hpcx-${HPCX_VERSION} | ||
#%Module 1.0 | ||
# | ||
# HPCx | ||
# | ||
conflict mpi | ||
module load /opt/hpcx-v2.5.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.6-x86_64/modulefiles/hpcx | ||
EOF | ||
|
||
|
||
# MVAPICH2 | ||
cat << EOF >> /usr/share/Modules/modulefiles/mpi/mvapich2-${MV2_VERSION} | ||
#%Module 1.0 | ||
# | ||
# MVAPICH2 | ||
# | ||
conflict mpi | ||
prepend-path PATH /opt/mvapich2-${MV2_VERSION}/bin | ||
prepend-path LD_LIBRARY_PATH /opt/mvapich2-${MV2_VERSION}/lib | ||
prepend-path MANPATH /opt/mvapich2-${MV2_VERSION}/share/man | ||
setenv MPI_BIN /opt/mvapich2-${MV2_VERSION}/bin | ||
setenv MPI_INCLUDE /opt/mvapich2-${MV2_VERSION}/include | ||
setenv MPI_LIB /opt/mvapich2-${MV2_VERSION}/lib | ||
setenv MPI_MAN /opt/mvapich2-${MV2_VERSION}/share/man | ||
setenv MPI_HOME /opt/mvapich2-${MV2_VERSION} | ||
EOF | ||
|
||
# OpenMPI | ||
cat << EOF >> /usr/share/Modules/modulefiles/mpi/openmpi-${OMPI_VERSION} | ||
#%Module 1.0 | ||
# | ||
# OpenMPI | ||
# | ||
conflict mpi | ||
prepend-path PATH /opt/openmpi-${OMPI_VERSION}/bin | ||
prepend-path LD_LIBRARY_PATH /opt/openmpi-${OMPI_VERSION}/lib | ||
prepend-path MANPATH /opt/openmpi-${OMPI_VERSION}/share/man | ||
setenv MPI_BIN /opt/openmpi-${OMPI_VERSION}/bin | ||
setenv MPI_INCLUDE /opt/openmpi-${OMPI_VERSION}/include | ||
setenv MPI_LIB /opt/openmpi-${OMPI_VERSION}/lib | ||
setenv MPI_MAN /opt/openmpi-${OMPI_VERSION}/share/man | ||
setenv MPI_HOME /opt/openmpi-${OMPI_VERSION} | ||
EOF | ||
|
||
#IntelMPI-v2018 | ||
cat << EOF >> /usr/share/Modules/modulefiles/mpi/impi_${IMPI_VERSION} | ||
#%Module 1.0 | ||
# | ||
# Intel MPI | ||
# | ||
conflict mpi | ||
prepend-path PATH /opt/intel/impi/${IMPI_VERSION}/intel64/bin | ||
prepend-path LD_LIBRARY_PATH /opt/intel/impi/${IMPI_VERSION}/intel64/lib | ||
prepend-path MANPATH /opt/intel/impi/${IMPI_VERSION}/man | ||
setenv MPI_BIN /opt/intel/impi/${IMPI_VERSION}/intel64/bin | ||
setenv MPI_INCLUDE /opt/intel/impi/${IMPI_VERSION}/intel64/include | ||
setenv MPI_LIB /opt/intel/impi/${IMPI_VERSION}/intel64/lib | ||
setenv MPI_MAN /opt/intel/impi/${IMPI_VERSION}/man | ||
setenv MPI_HOME /opt/intel/impi/${IMPI_VERSION}/intel64 | ||
EOF | ||
|
||
#IntelMPI-v2019 | ||
cat << EOF >> /usr/share/Modules/modulefiles/mpi/impi_${IMPI_2019_VERSION} | ||
#%Module 1.0 | ||
# | ||
# Intel MPI | ||
# | ||
conflict mpi | ||
prepend-path PATH /opt/intel/impi/${IMPI_2019_VERSION}/intel64/bin | ||
prepend-path LD_LIBRARY_PATH /opt/intel/impi/${IMPI_2019_VERSION}/intel64/lib | ||
prepend-path MANPATH /opt/intel/impi/${IMPI_2019_VERSION}/man | ||
setenv MPI_BIN /opt/intel/impi/${IMPI_2019_VERSION}/intel64/bin | ||
setenv MPI_INCLUDE /opt/intel/impi/${IMPI_2019_VERSION}/intel64/include | ||
setenv MPI_LIB /opt/intel/impi/${IMPI_2019_VERSION}/intel64/lib | ||
setenv MPI_MAN /opt/intel/impi/${IMPI_2019_VERSION}/man | ||
setenv MPI_HOME /opt/intel/impi/${IMPI_2019_VERSION}/intel64 | ||
EOF | ||
|
||
# Create symlinks for modulefiles | ||
ln -s /usr/share/Modules/modulefiles/mpi/hpcx-${HPCX_VERSION} /usr/share/Modules/modulefiles/mpi/hpcx | ||
ln -s /usr/share/Modules/modulefiles/mpi/mvapich2-${MV2_VERSION} /usr/share/Modules/modulefiles/mpi/mvapich2 | ||
ln -s /usr/share/Modules/modulefiles/mpi/openmpi-${OMPI_VERSION} /usr/share/Modules/modulefiles/mpi/openmpi | ||
ln -s /usr/share/Modules/modulefiles/mpi/impi_${IMPI_2019_VERSION} /usr/share/Modules/modulefiles/mpi/impi-2019 | ||
ln -s /usr/share/Modules/modulefiles/mpi/impi_${IMPI_VERSION} /usr/share/Modules/modulefiles/mpi/impi | ||
|