ubuntu安装 mpich

源码下载:http://www.mpich.org/downloads/
http://www.mpich.org/static/downloads/3.2/mpich-3.2.tar.gz
安装指导文档:http://www.mpich.org/static/downloads/3.1.2/mpich-3.1.2-installguide.pdf

tar xfz mpich-3.1.2.tar.gz
mkdir /opt/mpich
cd /your/mpich-3.1.2
/your/mpich-3.1.2/configure -prefix=/opt/mpich
make
make install
添加到 /etc/profile 或 ~/.bashrc
PATH=/home/you/mpich-install/bin:$PATH
export PATH

验证
which mpicc
which mpif90

tee

同时输出到控制台和log

who > log  # 仅输出到log,控制台没显示
who | tee log #控制台和终端都有
cat log
pwd | tee -a loglog追加写

2>&1

2 stderr
1 stdout
0 stdin
2>&1 就是 将stderr 输出 加上stdout
一般我们安装会 make 2>&1 | tee make.log

你可能感兴趣的:(linux)