---
# System prepended metadata

title: 裝機

---

裝機
===

BMC存取
---
1. 載Docker
2. 去作業選一個VPN放到Wire guard
3. 
```
git clone https://github.com/NTHU-LSALAB/megarac-aster-ikvm.git
cd megarac-aster-ikvm
sh start.sh [BMC IP] root root
```
4. 前往 http://localhost:5800/
5. 前往[BMC IP]->remote control->power on->狂按F12

openmpi
--
```
./configure --prefix=/opt/openmpi/5.0.7 --with-libfabric --enable-mpi-thread-multiple
make -j
sudo make -j install
```

mpich
--
```
./configure --prefix=/opt/mpich/4.3.0 --with-device=ch4:ofi --with-ofi --enable-mpi-thread-multiple
make -j
sudo make -j install
```

Code Saturne
==

gui套件
--
```
sudo apt-get install python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebkit qttools5-dev
sudo apt-get install pyqt5-dev pyqt5-dev-tools
```
run
--
```
code_saturne run --initialize
```
NO HT
--
```
export OMP_NUM_THREADS=1
mpirun -np 24 -host head:12,work:12 ./cs_solver
mpirun -np 24 -host head:12,work:12 --bind-to core --cpu-set 0,1,2,3,4,5,6,7,8,9,10,11 ./cs_solver
```
with HT
--
```
export OMP_NUM_THREADS=2
mpirun -np 12 -host head:6,work:6 \
  --bind-to hwthread --map-by socket \
  ./cs_solver
```

FAMIL
==

dependency
--

zlib
--
```
cd /mnt/hdd/downloads/
git clone https://github.com/madler/zlib.git
cd zlib
./configure --prefix=/opt/zlib
make -j
sudo make -j install
```
libpsl
--
```
cd /mnt/hdd/downloads/
git clone https://github.com/rockdaboot/libpsl.git
cd libpsl
./autogen.sh
./configure --prefix=/opt/libpsl
make -j
sudo make -j install
```
openssl
--
```
wget https://www.openssl.org/source/openssl-3.2.0.tar.gz
tar -xzf openssl-3.2.0.tar.gz
cd openssl-3.2.0
./Configure --prefix=/opt/openssl --openssldir=/opt/openssl
make -j
sudo make install
```
curl
--
```
cd /mnt/hdd/downloads/
wget https://curl.se/download/curl-8.13.0.tar.gz
tar -xzvf curl-8.13.0.tar.gz 
cd curl-8.13.0/
./configure --prefix=/opt/curl/8.13.0 --with-openssl=/opt/openssl
make -j
sudo make -j install
```
hdf5
--
```
wget https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.6/hdf5-1.14.6.tar.gz
tar -zxvf hdf5-1.14.6.tar.gz
cd hdf5-hdf5_1.14.6
mkdir build && cd build
CC=mpiicx FC=mpiifx ../configure --prefix=/opt/hdf5 --enable-parallel --with-zlib=/opt/zlib/ --enable-fortran
make -j
make -j install
```
pnetcdf
--
```
wget https://parallel-netcdf.github.io/Release/pnetcdf-1.14.0.tar.gz
tar -xzvf pnetcdf-1.14.0.tar.gz
cd pnetcdf-1.14.0/
module load mpich
CC=mpicc FC=mpifort ./configure --prefix=/opt/pnetcdf --enable-shared --enable-relax-coord-bound --with-mpi=/opt/mpich/4.3.0
make -j$(nproc)
sudo make -j$(nproc) install
```
netcdf-c
--
```
sudo apt-get install libxml2-dev
wget https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.9.3.tar.gz
tar -xzvf v4.9.3.tar.gz
cd netcdf-c-4.9.3
mkdir build && cd build
CC=mpiicx CPPFLAGS='-I$/opt/hdf5/include -I/opt/pnetcdf/include -I/opt/openssl/include' LDFLAGS='-L/opt/hdf5/lib -L/opt/pnetcdf/lib -L/opt/openssl/lib64' ../configure --prefix=/opt/netcdf --enable-pnetcdf
make -j
make -j install
```
netcdf-fortran
--
```
wget https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v4.6.2.tar.gz
tar -xvzf v4.6.2.tar.gz
cd netcdf-fortran-4.6.2/
export LD_LIBRARY_PATH=/opt/netcdf/lib:$LD_LIBRARY_PATH
mkdir build && cd build
CC=mpiicx FC=mpiifx CPPFLAGS='-I/opt/netcdf/include' LDFLAGS='-L/opt/netcdf/lib' ../configure --prefix=/opt/netcdf
make -j
make -j install
```
nco
--
```
wget https://github.com/nco/nco/archive/5.3.3.tar.gz
tar -zxvf 5.3.3.tar.gz 
cd nco-5.3.3/
./autogen.sh
sudo apt update
sudo apt install flex
sudo apt install bison
sudo apt-get install libudunits2-dev
mkdir build && cd build
CC=mpiicx FC=mpiifx CPPFLAGS='-I/opt/netcdf/include' LDFLAGS='-L/opt/netcdf/lib' ../configure --prefix=/opt/nco
make -j
make -j install
```
gsl
--
```
wget https://mirror.ibcp.fr/pub/gnu/gsl/gsl-latest.tar.gz
tar -xvzf gsl-latest.tar.gz
cd gsl-2.8/
mkdir build && cd build
CC=mpiicx FC=mpiifx ../configure --prefix=/opt/gsl
make -j
make -j install
```
run
--
```
./f_create_earth -case [casename] -plat ifc -res C48 -np 24
```
in f_run
```
mpirun --host head:12,work:12 -np $NP bash -lc "ulimit -s unlimited && \
export LD_LIBRARY_PATH=/opt/openssl/lib64:\$LD_LIBRARY_PATH && \
export LD_PRELOAD='/opt/openssl/lib64/libssl.so.3:/opt/openssl/lib64/libcrypto.so.3' && \
exec $WORKDIR/famil.x"
```
in terminal
```
./f_run > /home/team17/FAMIL_v1/run/[casename]/work/f_run.log 2>&1
```
profile
--
in f_run
```
set timestamp = `date +%F-%H%M`
set vtune_dir = /home/team17/vtune-res/vtune_result_$timestamp

mpirun --host head:12,work:12 -np $NP bash -lc "ulimit -s unlimited && \
LD_LIBRARY_PATH=/opt/openssl/lib64:\$LD_LIBRARY_PATH \
LD_PRELOAD='/opt/openssl/lib64/libssl.so.3 /opt/openssl/lib64/libcrypto.so.3' \
exec vtune -collect=hotspots -trace-mpi -r=$vtune_dir -- $WORKDIR/famil.x"
```
in terminal
```
./f_run > /home/team17/FAMIL_v1/run/profile/work/f_run.log 2>&1
```

GROMACS
==
```
wget https://ftp.gromacs.org/gromacs/gromacs-2025.1.tar.gz
tar -xvzf gromacs-2025.1.tar.gz
cd gromacs-2025.1
mkdir build
cd build

cmake .. \
    -DCMAKE_INSTALL_PREFIX=$HOME/gromacs-2025.1-mpi \
    -DGMX_FFT_LIBRARY=mkl \
    -DGMX_CPU_ACCELERATION=ON \
    -DGMX_SIMD=SSE4.1 \
    -DGMX_MPI=ON \
    -DGMX_OPENMP=ON \
    -DCMAKE_C_COMPILER=mpiicx \
    -DCMAKE_CXX_COMPILER=mpiicpx \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_C_FLAGS="-O3" \
    -DCMAKE_CXX_FLAGS="-O3"


make -j$(nproc)
make install
source /home/team17/gromacs-2025.1-mpi/bin/GMXRC
```
82K
--
tune pme
```
gmx_mpi tune_pme -s benchMEM.tpr -np 24 -ntomp 2 -r 5 -mdrun "gmx_mpi mdrun"
```
```
mpirun -np 24 -ppn 12 --host head,work gmx_mpi mdrun -s benchMEM.tpr -npme 6 -ntomp_pme 1
gmx_mpi editconf -f confout.gro -o 82k.pdb
```
profile
```
timestamp=$(date +%F-%H%M)
vtune_dir=/home/team17/vtune-res/vtune_result_$timestamp
mpirun -np 24 -ppn 12 --host head,work vtune -collect=hotspots -r=$vtune_dir -- bash -c "gmx_mpi mdrun -s benchMEM.tpr"
```
2M
--
```
mpirun -np 24 --host head:12,work:12 gmx_mpi mdrun -s benchRIB.tpr -nsteps 1000
gmx_mpi editconf -f confout.gro -o 2m.pdb
```
AlphaFold vs PDB Structural Analysis Work Flow
--
1. 到 https://www.rcsb.org/#Category-analyze 找一條蛋白質
2. 複製FASTA sequence 下載實驗結果並命名為 exp.icf
3. 貼到 https://alphafoldserver.com/
4. 下載預測結果 並命名為pred.icf
5. 
```
load exp.cif, exp
load pred.cif, pred
align pred, exp
```