#! /bin/bash

# This script install mpich2 /home/common/nfs/mpich2
# Prerequisite: ifort and icc must have already been intalled.
# Procedure: Run this script as an su.

mkdir /home/common/nfs/mpich2
cd /home/common/nfs/mpich2
wget http://www2.fizik.usm.my/configrepo/howto/mpich2/mpich2-1.4.1p1.tar
tar -xvf mpich2-1.4.1p1.tar
cd mpich2-1.4.1p1

./configure --prefix=/home/common/nfs/mpich2 FC=ifort CC=icc 2>&1 | tee c.txt

make 2>&1 | tee m.txt

make install 2>&1 | tee mi.txt

PATH=/home/common/nfs/mpich2/bin:$PATH ; export PATH
