-
Login to
acfs
. -
Download source codes from the official website. Or equivalently I use:
cd ~ wget http://www.mpich.org/static/downloads/3.4.2/mpich-3.4.2.tar.gz
-
Unpack the tar file:
tar xfz mpich-3.4.2.tar.gz
-
Choose/create an installation directory. MPICH will be installed to this directory:
mkdir ~/.mpich
-
Choose/create a build directory, which will be deleted after installation.
mkdir ~/mpich-build
-
Enter the build directory and run configuration. (Output to
c.txt
.)cd ~/mpich-build /homes/zhd1108/mpich-3.4.2/configure \ -prefix=/homes/zhd1108/.mpich \ --with-device=ch4:ofi 2>&1 | tee c.txt
-
Build MPICH (output to
m.txt
):make 2>&1 | m.txt
-
Install MPICH Commands (output to
mi.txt
):make install 2>&1 | tee mi.txt
-
Add
bin
toPATH
. In~/.zshrc
:export PATH="$HOME/.mpich/bin:$PATH"
-
Remove
mpich-3.4.2.tar.gz
,mpich-3.4.2
andmpich-build
.
- Create a virtual environment:
cd ~ mkdir envs cd envs python3.8 -m venv env_mpih5
- activate virtual env:
cd ~ source ~/envs/env_mpih5/bin/activate
- upgrade pip
pip install --upgrade pip
- install h5py and mpi4py
pip install h5py pip install mpi4py
- Download hdf5-1.12.1.tar.bz2 to $HOME
- Unzip
tar xvjf hdf5-1.12.1.tar.bz2
- create build directory:
mkdir ~/hdf5-build
- create install folder:
mkdir ~/.hdf5
- configure:
cd ~/hdf5-build CC=~/.mpich/bin/mpicc ../hdf5-1.12.1/configure --prefix=/homes/zhd1108/.hdf5 --enable-parallel
- make
# cd ~/hdf5-build make
-
make check make install