此文件將引導同學從 Source Code 開始,依序 build OpenBLAS、OpenMPI 5.0.8 以及 HPL 2.3,並進行效能測試。
由於在台灣杉二號(Taiwania 2)上,請千萬不要在 Login Node 執行高負載運算或編譯,我們會指引同學使用 sbatch 將編譯與測試工作發到 Compute Node。並且將所有軟體編譯到對應的 opt 目錄,Source Code 放在 src 中。
請確認所有組員是否能夠進入隊長的 /work 目錄
/work/<captains-username>/<project-id>/work/alice/ACD123456<aside> <img src="/icons/report_yellow.svg" alt="/icons/report_yellow.svg" width="40px" />
填空
<project-id> 是同學組別的系統計劃代號
<captains-username> 是隊長的主機帳號
</aside>
文章後續皆稱隊長的 /work 目錄為「計畫根目錄(Project Root Directory)」
<project-root> 示意計劃根目錄請於計劃根目錄下建立 opt、src 目錄
請於 <project-root>/opt 下建立 openmpi-5.0.8、openblas-0.3.32 與 hpl-2.3 目錄
建議可以使用環境變數 PROJECT_ROOT=/work/<captains-username>/<project-id>
<aside> <img src="/icons/report_yellow.svg" alt="/icons/report_yellow.svg" width="40px" />
臨時環境變數
此種設定環境變數的方法僅限當下的 Shell 有用,若關閉或更換 Shell ,需重新設定此環境變數。若同學熟悉 bash/zsh,可自行於 .bashrc/.zshrc 中設定。
</aside>
首先,我們在登入節點將 OpenBLAS 與 OpenMPI 的原始碼下載並解壓縮準備好。
# Change working directory to src under project's root
PROJECT_ROOT=<project-root>
cd $PROJECT_ROOT/src
# Download and uncompress OpenBLAS source code
URL=https://...
wget $URL
tar -xzf <OpenBLAS-tarball-filename>
# Download and uncompress OpenMPI 5.0.8
URL=https://...
wget $URL
tar -xzf <OpenMPI-tarball-filename>