-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLammps
184 lines (175 loc) · 7.53 KB
/
Lammps
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
BootStrap: docker
From: nvidia/cuda:10.1-devel-ubuntu18.04
%post
. /.singularity.d/env/10-docker*.sh
# GNU compiler
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
g++-8 \
gcc-8 \
gfortran-8
rm -rf /var/lib/apt/lists/*
%post
cd /
update-alternatives --install /usr/bin/g++ g++ $(which g++-8) 30
update-alternatives --install /usr/bin/gcc gcc $(which gcc-8) 30
update-alternatives --install /usr/bin/gcov gcov $(which gcov-8) 30
update-alternatives --install /usr/bin/gfortran gfortran $(which gfortran-8) 30
# CMake version 3.16.3
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
make \
wget
rm -rf /var/lib/apt/lists/*
%post
cd /
mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.16/cmake-3.16.3-Linux-x86_64.sh
mkdir -p /usr/local
/bin/sh /var/tmp/cmake-3.16.3-Linux-x86_64.sh --prefix=/usr/local --skip-license
rm -rf /var/tmp/cmake-3.16.3-Linux-x86_64.sh
%environment
export PATH=/usr/local/bin:$PATH
%post
export PATH=/usr/local/bin:$PATH
# Mellanox OFED version 4.6-1.0.1.1
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
gnupg \
wget
rm -rf /var/lib/apt/lists/*
%post
wget -qO - https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox | apt-key add -
mkdir -p /etc/apt/sources.list.d && wget -q -nc --no-check-certificate -P /etc/apt/sources.list.d https://linux.mellanox.com/public/repo/mlnx_ofed/4.6-1.0.1.1/ubuntu18.04/mellanox_mlnx_ofed.list
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ibverbs-utils \
libibmad \
libibmad-devel \
libibumad \
libibumad-devel \
libibverbs-dev \
libibverbs1 \
libmlx4-1 \
libmlx4-dev \
libmlx5-1 \
libmlx5-dev \
librdmacm-dev \
librdmacm1
rm -rf /var/lib/apt/lists/*
# GDRCOPY version 1.3
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
make \
wget
rm -rf /var/lib/apt/lists/*
%post
cd /
mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/NVIDIA/gdrcopy/archive/v1.3.tar.gz
mkdir -p /var/tmp && tar -x -f /var/tmp/v1.3.tar.gz -C /var/tmp -z
cd /var/tmp/gdrcopy-1.3
mkdir -p /usr/local/gdrcopy/include /usr/local/gdrcopy/lib64
make PREFIX=/usr/local/gdrcopy lib lib_install
echo "/usr/local/gdrcopy/lib64" >> /etc/ld.so.conf.d/hpccm.conf && ldconfig
rm -rf /var/tmp/v1.3.tar.gz /var/tmp/gdrcopy-1.3
%environment
export CPATH=/usr/local/gdrcopy/include:$CPATH
export LIBRARY_PATH=/usr/local/gdrcopy/lib64:$LIBRARY_PATH
%post
export CPATH=/usr/local/gdrcopy/include:$CPATH
export LIBRARY_PATH=/usr/local/gdrcopy/lib64:$LIBRARY_PATH
# KNEM version 1.1.3
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
git
rm -rf /var/lib/apt/lists/*
%post
cd /
mkdir -p /var/tmp && cd /var/tmp && git clone --depth=1 --branch knem-1.1.3 https://gforge.inria.fr/git/knem/knem.git knem && cd -
mkdir -p /usr/local/knem/include
cp /var/tmp/knem/common/*.h /usr/local/knem/include
rm -rf /var/tmp/knem
%environment
export CPATH=/usr/local/knem/include:$CPATH
%post
export CPATH=/usr/local/knem/include:$CPATH
# UCX version 1.6.1
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
binutils-dev \
file \
libnuma-dev \
make \
wget
rm -rf /var/lib/apt/lists/*
%post
cd /
mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/openucx/ucx/releases/download/v1.6.1/ucx-1.6.1.tar.gz && \
mkdir -p /var/tmp && tar -x -f /var/tmp/ucx-1.6.1.tar.gz -C /var/tmp -z
cd /var/tmp/ucx-1.6.1 && ./configure --prefix=/usr/local/ucx --disable-assertions --disable-debug --disable-doxygen-doc --disable-logging --disable-params-check --enable-optimizations --with-cuda=/usr/local/cuda --with-knem=/usr/local/knem
make -j$(nproc)
make -j$(nproc) install
echo "/usr/local/ucx/lib" >> /etc/ld.so.conf.d/hpccm.conf && ldconfig
rm -rf /var/tmp/ucx-1.6.1.tar.gz /var/tmp/ucx-1.6.1
%environment
export PATH=/usr/local/ucx/bin:$PATH
%post
export PATH=/usr/local/ucx/bin:$PATH
# OpenMPI version 4.0.2
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
bzip2 \
file \
hwloc \
libnuma-dev \
make \
openssh-client \
perl \
tar \
wget
rm -rf /var/lib/apt/lists/*
%post
cd /
ln -sf /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1
mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-4.0.2.tar.bz2 && \
mkdir -p /var/tmp && tar -x -f /var/tmp/openmpi-4.0.2.tar.bz2 -C /var/tmp -j
cd /var/tmp/openmpi-4.0.2 && LD_LIBRARY_PATH="/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH" ./configure --prefix=/usr/local/openmpi --disable-getpwuid --enable-orterun-prefix-by-default --with-cuda --with-ucx=/usr/local/ucx --with-verbs
make -j$(nproc)
make -j$(nproc) install
echo "/usr/local/openmpi/lib" >> /etc/ld.so.conf.d/hpccm.conf && ldconfig
rm -rf /var/tmp/openmpi-4.0.2.tar.bz2 /var/tmp/openmpi-4.0.2
%environment
export PATH=/usr/local/openmpi/bin:$PATH
%post
export PATH=/usr/local/openmpi/bin:$PATH
# LAMMPS version patch_19Sep2019 for CUDA compute capability sm70
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
bc \
git \
libgomp1 \
libhwloc-dev \
make \
tar \
wget
rm -rf /var/lib/apt/lists/*
# https://github.com/lammps/lammps/archive/patch_19Sep2019.tar.gz
%post
cd /
mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/lammps/lammps/archive/patch_19Sep2019.tar.gz && \
mkdir -p /var/tmp && tar -x -f /var/tmp/patch_19Sep2019.tar.gz -C /var/tmp -z
cd /var/tmp/lammps-patch_19Sep2019/cmake
sed -i 's/^cuda_args=""/cuda_args="--cudart shared"/g' /var/tmp/lammps-patch_19Sep2019/lib/kokkos/bin/nvcc_wrapper
mkdir -p /var/tmp/lammps-patch_19Sep2019/build-Volta70 && cd /var/tmp/lammps-patch_19Sep2019/build-Volta70 && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/lammps-sm70 -D BUILD_SHARED_LIBS=ON -D CUDA_USE_STATIC_CUDA_RUNTIME=OFF -D KOKKOS_ARCH=Volta70 -D CMAKE_BUILD_TYPE=Release -D MPI_C_COMPILER=mpicc -D BUILD_MPI=yes -D PKG_MPIIO=on -D BUILD_OMP=yes -D BUILD_LIB=no -D CMAKE_CXX_COMPILER=/var/tmp/lammps-patch_19Sep2019/lib/kokkos/bin/nvcc_wrapper -D PKG_USER-REAXC=yes -D PKG_KSPACE=yes -D PKG_MOLECULE=yes -D PKG_REPLICA=yes -D PKG_RIGID=yes -D PKG_MISC=yes -D PKG_MANYBODY=yes -D PKG_ASPHERE=yes -D PKG_GPU=no -D PKG_KOKKOS=yes -D KOKKOS_ENABLE_CUDA=yes -D KOKKOS_ENABLE_HWLOC=yes /var/tmp/lammps-patch_19Sep2019/cmake
cmake --build /var/tmp/lammps-patch_19Sep2019/build-Volta70 --target all -- -j$(nproc)
cmake --build /var/tmp/lammps-patch_19Sep2019/build-Volta70 --target install -- -j$(nproc)
rm -rf /var/tmp/lammps-patch_19Sep2019/cmake /var/tmp/patch_19Sep2019.tar.gz /var/tmp/lammps-patch_19Sep2019/build-Volta70