Skip to content

Latest commit

 

History

History
101 lines (93 loc) · 2.04 KB

setup.md

File metadata and controls

101 lines (93 loc) · 2.04 KB

Install MPICH

  1. Login to acfs.

  2. 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
  3. Unpack the tar file:

    tar xfz mpich-3.4.2.tar.gz
  4. Choose/create an installation directory. MPICH will be installed to this directory:

    mkdir ~/.mpich
  5. Choose/create a build directory, which will be deleted after installation.

    mkdir ~/mpich-build
  6. 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
  7. Build MPICH (output to m.txt):

    make 2>&1 | m.txt
  8. Install MPICH Commands (output to mi.txt):

    make install 2>&1 | tee mi.txt 
  9. Add bin to PATH. In ~/.zshrc:

    export PATH="$HOME/.mpich/bin:$PATH"
  10. Remove mpich-3.4.2.tar.gz, mpich-3.4.2 and mpich-build.


Install h5py and mpi4py

  1. Create a virtual environment:
    cd ~
    mkdir envs
    cd envs
    python3.8 -m venv env_mpih5
  2. activate virtual env:
    cd ~
    source ~/envs/env_mpih5/bin/activate
  3. upgrade pip
    pip install --upgrade pip
  4. install h5py and mpi4py
    pip install h5py
    pip install mpi4py

Install hdf5 for c

  1. Download hdf5-1.12.1.tar.bz2 to $HOME
  2. Unzip
    tar xvjf hdf5-1.12.1.tar.bz2
  3. create build directory:
    mkdir ~/hdf5-build
  4. create install folder:
    mkdir ~/.hdf5
    
  5. configure:
    cd ~/hdf5-build
    CC=~/.mpich/bin/mpicc ../hdf5-1.12.1/configure --prefix=/homes/zhd1108/.hdf5  --enable-parallel
  6. make
    # cd ~/hdf5-build
    make
  7.  make check
     make install