Skip to content
Snippets Groups Projects
Commit 1687c336 authored by Quang tru HUYNH's avatar Quang tru HUYNH
Browse files

fix $ expansion

parent aa922be7
No related branches found
No related tags found
No related merge requests found
Pipeline #152876 passed with stage
in 43 minutes and 30 seconds
......@@ -10,7 +10,7 @@ V=2024.5
CMAKE=cmake
## GROMACS
cd /opt
wget -q -O - https://ftp.gromacs.org/gromacs/gromacs-${V}.tar.gz | tar xzvf -
wget -q -O - https://ftp.gromacs.org/gromacs/gromacs-\${V}.tar.gz | tar xzvf -
cd gromacs-2024.5
mkdir build
cd build
......@@ -26,42 +26,42 @@ cmake ../ -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.8 -DGMX_GPU=CUDA \
make -j24 CXXFLAGS="-O3"
make install
D=/usr/local/gromacs/${V}-openmpi-cuda-12.8.0_570.86.10
D=/usr/local/gromacs/\${V}-openmpi-cuda-12.8.0_570.86.10
_build_serial() {
if [ $# -eq 1 ]; then
if [ \$# -eq 1 ]; then
OPT=$1
else
exit 1
fi
mkdir serial-single-precision-${OPT} || :
(cd serial-single-precision-${OPT} && \
mkdir serial-single-precision-\${OPT} || :
(cd serial-single-precision-\${OPT} && \
dpkg -l > dpkg-l
printenv > printenv
${CMAKE} .. \
\${CMAKE} .. \
-DGMX_BUILD_OWN_FFTW=ON \
-DREGRESSIONTEST_DOWNLOAD=ON \
-DGMX_SIMD=${OPT} \
-DCMAKE_INSTALL_PREFIX=${D}/serial/single-precision-${OPT}
-DGMX_SIMD=\${OPT} \
-DCMAKE_INSTALL_PREFIX=\${D}/serial/single-precision-\${OPT}
nice make -j 16
make check || :
make install
) 2>&1 | tee -a serial-single-precision-${OPT}.`date '+%Y-%m-%d_%H%M'`
) 2>&1 | tee -a serial-single-precision-\${OPT}.`date '+%Y-%m-%d_%H%M'`
}
_build_mdrun() {
if [ $# -eq 1 ]; then
OPT=$1
if [ \$# -eq 1 ]; then
OPT=\$1
else
exit 1
fi
mkdir mdrun-only-single-precision-openmpi-cuda-12.8.0_570.86.10-${OPT} || :
(cd mdrun-only-single-precision-openmpi-cuda-12.8.0_570.86.10-${OPT} && \
mkdir mdrun-only-single-precision-openmpi-cuda-12.8.0_570.86.10-\${OPT} || :
(cd mdrun-only-single-precision-openmpi-cuda-12.8.0_570.86.10-\${OPT} && \
export CUDACXX=/usr/local/cuda-12.8/bin/nvcc
dpkg -l > dpkg-l
printenv > printenv
${CMAKE} .. \
\${CMAKE} .. \
-DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_C_COMPILER=mpicc \
-DGMX_OPENMP=ON -DGMX_MPI=ON -DGMX_THREAD_MPI=OFF \
-DBUILD_SHARED_LIBS=ON \
......@@ -69,20 +69,20 @@ ${CMAKE} .. \
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.8 \
-DGMX_BUILD_MDRUN_ONLY=ON \
-DGMX_GPU=CUDA \
-DGMX_SIMD=${OPT} \
-DCMAKE_INSTALL_PREFIX=${D}/mdrun-only/single-precision-openmpi-cuda-12.8.0_570.86.10-${OPT}
-DGMX_SIMD=\${OPT} \
-DCMAKE_INSTALL_PREFIX=\${D}/mdrun-only/single-precision-openmpi-cuda-12.8.0_570.86.10-\${OPT}
nice make -j 16 && \
make install
) 2>&1 | tee -a single-precision-openmpi-cuda-12.8.0_570.86.10-${OPT}.`date '+%Y-%m-%d_%H%M'`
) 2>&1 | tee -a single-precision-openmpi-cuda-12.8.0_570.86.10-\${OPT}.`date '+%Y-%m-%d_%H%M'`
}
_default_build() {
for i in SSE4.1 AVX_256 AVX2_256 AVX_512
do
_build_serial $i
_build_mdrun $i
_build_serial \$i
_build_mdrun \$i
done
}
......@@ -101,20 +101,20 @@ apt-get clean
# echo first argument must be one of
# echo native
# echo or
# (cd /usr/local/gromacs/${V}-openmpi-cuda-12.8.0_570.86.10/ && /bin/ls -1d */*)
# (cd /usr/local/gromacs/\${V}-openmpi-cuda-12.8.0_570.86.10/ && /bin/ls -1d */*)
# exit 1
# }
# if [ $# -ge 1 ]; then
# if [ "$1" = "native" ]; then
# if [ \$# -ge 1 ]; then
# if [ "\$1" = "native" ]; then
# . /usr/local/gromacs-2024.5-openmpi-cuda12.8-native/bin/GMXRC.bash
# else
# if [ ! -d /usr/local/gromacs/${V}-openmpi-cuda-12.8.0_570.86.10/$1 ] ; then
# if [ ! -d /usr/local/gromacs/\${V}-openmpi-cuda-12.8.0_570.86.10/\$1 ] ; then
# _usage
# fi
# ls -l /usr/local/gromacs/${V}-openmpi-cuda-12.8.0_570.86.10/$1/bin/GMXRC.bash
# . /usr/local/gromacs/${V}-openmpi-cuda-12.8.0_570.86.10/$1/bin/GMXRC.bash
# ls -l /usr/local/gromacs/\${V}-openmpi-cuda-12.8.0_570.86.10/\$1/bin/GMXRC.bash
# . /usr/local/gromacs/\${V}-openmpi-cuda-12.8.0_570.86.10/\$1/bin/GMXRC.bash
# fi
# shift
# eval "$@"
# eval "\$@"
# fi
EOF
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment