Ubuntu network alias setup

First, setup a main (eth1 hereafter) IP address via

/etc/network/interfaces, such as

auto lo
iface lo inet loopback

auto eth1
iface eth1 inet static
address 192.168.99.2
netmask 255.255.255.0
gateway 192.168.99.1

And change /etc/resolv.conf, such as

nameserver 202.112.80.106

At last add alias to /etc/network/interfaces, such as

auto eth1:0
iface eth1:0 inet static
address 210.31.77.2
netmask 255.255.255.0
gateway 210.31.77.1

auto eth1:1
iface eth1:1 inet static
address 124.205.19.108
netmask 255.255.255.0
gateway 124.205.19.105

Petsc, Slepc安装

Petsc需要blas, lapack, mpi。blas和lapack可以用atlas+lapack整合的方式,mpi(mpich2或者openmpi)必须用源程序编译安装。

configure -prefix=/opt/mpich2 |& tee c.txt
make 2>&1 | tee m.txt

atlas+lapack的方法在ATLAS Installation Guide可以找到。

目前在Petsc上配置的软件包:
./configure –with-blas-lapack-dir=/opt/atlas/lib –with-mpi-dir=/opt/mpich2 –with-scalar-type=complex –with-clanguage=c –with-fortran-kernels=generic –download-scalapack=1 –download-mumps=1 –download-superlu=1 –download-plapack=1 –with-debugging=0 –download-fftw=1 –download-blacs=1 –download-parmetis=1 –download-blopex=1

目前FFTW包的路径与petsc中用的不相符,需要手动下载,然后以–download-fftw=/home/……/fftw-3.3.2.tar.gz参数告诉configure