Difference between revisions of "Installation script for Z800"
From www.coria-cfd.fr
Line 13: | Line 13: | ||
CXX = /usr/bin/g++ | CXX = /usr/bin/g++ | ||
CPP = /usr/bin/cpp | CPP = /usr/bin/cpp | ||
− | + | CXXCPP = /usr/bin/cpp | |
all: structure sed fftw3 openmpi hdf5 lapack ParMetis scotch petsc | all: structure sed fftw3 openmpi hdf5 lapack ParMetis scotch petsc |
Revision as of 13:58, 18 January 2012
Copy and paste the following lines in .bash_profile:
alias l='ls -l' export PATH=$PATH:/home/admin/local/openmpi-1.4.4/bin export LD_LIBRARY_PATH="/home/admin/local/openmpi-1.4.4/lib:$LD_LIBRARY_PATH"
Copy and paste this in a file called Install.make:
INSTALL_DIR = /home/admin F77 = /usr/bin/gfortran FC = /usr/bin/gfortran CC = /usr/bin/gcc CXX = /usr/bin/g++ CPP = /usr/bin/cpp CXXCPP = /usr/bin/cpp all: structure sed fftw3 openmpi hdf5 lapack ParMetis scotch petsc packages: sudo add-apt-repository ppa:freenx-team sudo apt-get update sudo apt-get install -y freenx sudo apt-get install -y g++ sudo apt-get install -y rapidsvn sudo apt-get install -y cmake sudo apt-get install -y flex sudo apt-get install -y bison sudo apt-get install -y lib32z1-dev sudo apt-get install -y tkdiff structure: mkdir -p $(INSTALL_DIR)/Downloads mkdir -p $(INSTALL_DIR)/Builds mkdir -p $(INSTALL_DIR)/local sed: (cd $(INSTALL_DIR)/Downloads && wget http://ftp.gnu.org/gnu/sed/sed-4.2.tar.bz2) (cd $(INSTALL_DIR)/Builds && tar -jxvf $(INSTALL_DIR)/Downloads/sed-4.2.tar.bz2) (cd $(INSTALL_DIR)/Builds/sed-4.2 && ./configure --prefix=$(INSTALL_DIR)/local/sed-4.2 && make && make install) fftw3: (cd $(INSTALL_DIR)/Downloads && wget http://www.fftw.org/fftw-3.3.tar.gz) (cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/fftw-3.3.tar.gz) (cd $(INSTALL_DIR)/Builds/fftw-3.3 && ./configure --prefix=$(INSTALL_DIR)/local/fftw-3.3 && make && make install) openmpi: (cd $(INSTALL_DIR)/Downloads && wget http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.4.tar.bz2) (cd $(INSTALL_DIR)/Builds && tar -jxvf $(INSTALL_DIR)/Downloads/openmpi-1.4.4.tar.bz2) (cd $(INSTALL_DIR)/Builds/openmpi-1.4.4 && ./configure --prefix=$(INSTALL_DIR)/local/openmpi-1.4.4 --enable-mpi-f90 && make && make install) hdf5: (cd $(INSTALL_DIR)/Downloads && wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.8.tar.bz2) (cd $(INSTALL_DIR)/Builds && tar -jxvf $(INSTALL_DIR)/Downloads/hdf5-1.8.8.tar.bz2) (cd $(INSTALL_DIR)/Builds/hdf5-1.8.8 && ./configure --prefix=$(INSTALL_DIR)/local/hdf5-1.8.8 --enable-fortran --enable-cxx && make && make install) lapack: (cd $(INSTALL_DIR)/Downloads && wget http://www.netlib.org/lapack/lapack-3.4.0.tgz) (cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/lapack-3.4.0.tgz) (cd $(INSTALL_DIR)/Builds/lapack-3.4.0 && cp make.inc.example make.inc && make blaslib && make lapacklib) mkdir -p $(INSTALL_DIR)/local/blas/lib mkdir -p $(INSTALL_DIR)/local/lapack/lib ln -s $(INSTALL_DIR)/Builds/lapack-3.4.0/liblapack.a $(INSTALL_DIR)/local/lapack/lib/liblapack.a ln -s $(INSTALL_DIR)/Builds/lapack-3.4.0/librefblas.a $(INSTALL_DIR)/local/blas/lib/libblas.a ParMetis: (cd $(INSTALL_DIR)/Downloads && wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD/ParMetis-3.2.0.tar.gz) (cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/ParMetis-3.2.0.tar.gz) echo "CC = $(INSTALL_DIR)/local/openmpi-1.4.4/bin/mpicc" > $(INSTALL_DIR)/Builds/ParMetis-3.2.0/Makefile.in echo "OPTFLAGS = -O3" >> $(INSTALL_DIR)/Builds/ParMetis-3.2.0/Makefile.in echo "INCDIR =" >> $(INSTALL_DIR)/Builds/ParMetis-3.2.0/Makefile.in echo "COPTIONS = -DNDEBUG" >> $(INSTALL_DIR)/Builds/ParMetis-3.2.0/Makefile.in echo "LD = $(INSTALL_DIR)/local/openmpi-1.4.4/bin/mpicc" >> $(INSTALL_DIR)/Builds/ParMetis-3.2.0/Makefile.in echo "LIBDIR =" >> $(INSTALL_DIR)/Builds/ParMetis-3.2.0/Makefile.in echo "AR = ar rv" >> $(INSTALL_DIR)/Builds/ParMetis-3.2.0/Makefile.in echo "RANLIB = ar -ts" >> $(INSTALL_DIR)/Builds/ParMetis-3.2.0/Makefile.in echo "VERNUM = 3.2.0" >> $(INSTALL_DIR)/Builds/ParMetis-3.2.0/Makefile.in (cd $(INSTALL_DIR)/Builds/ParMetis-3.2.0 && make) mkdir -p $(INSTALL_DIR)/local/ParMetis-3.2.0/lib mkdir -p $(INSTALL_DIR)/local/ParMetis-3.2.0/include ln -s $(INSTALL_DIR)/Builds/ParMetis-3.2.0/*.a $(INSTALL_DIR)/local/ParMetis-3.2.0/lib/ ln -s $(INSTALL_DIR)/Builds/ParMetis-3.2.0/*.h $(INSTALL_DIR)/local/ParMetis-3.2.0/include/ scotch: (cd $(INSTALL_DIR)/Downloads && wget https://gforge.inria.fr/frs/download.php/28977/scotch_5.1.12b.tar.gz) (cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/scotch_5.1.12b.tar.gz) echo "EXE =" > $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "LIB = .a" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "OBJ = .o" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "MAKE = make" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "AR = ar" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "ARFLAGS = -ruv" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "CAT = cat" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "CCS = $(CC)" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "CCP = $(INSTALL_DIR)/local/openmpi-1.4.4/bin/mpicc" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "CCD = $(CC)" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER -DSCOTCH_PTHREAD -Drestrict=__restrict -DIDXSIZE64 -I$(INSTALL_DIR)/local/openmpi-1.4.4/include" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "CLIBFLAGS =" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "LDFLAGS = -lz -lm -lrt" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "CP = cp" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "LEX = flex -Pscotchyy -olex.yy.c" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "LN = ln" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "MKDIR = mkdir -p" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "MV = mv" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "RANLIB = ranlib" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "YACC = bison -pscotchyy -y -b y" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc echo "prefix = $(INSTALL_DIR)/local/scotch_5.1.12" >> $(INSTALL_DIR)/Builds/scotch_5.1.12/src/Makefile.inc (cd $(INSTALL_DIR)/Builds/scotch_5.1.12/src && make scotch && make ptscotch && make install) petsc: (cd $(INSTALL_DIR)/Downloads && wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.2-p6.tar.gz) (cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/petsc-lite-3.2-p6.tar.gz) (cd $(INSTALL_DIR)/Builds/petsc-3.2-p6 && ./configure --prefix=$(INSTALL_DIR)/local/petsc-3.2-p6 --with-mpi-dir=$(INSTALL_DIR)/local/openmpi-1.4.4 --with-blas-lib=$(INSTALL_DIR)/local/blas/lib/libblas.a --with-lapack-lib=$(INSTALL_DIR)/local/lapack/lib/liblapack.a && make PETSC_DIR=$(INSTALL_DIR)/Builds/petsc-3.2-p6 PETSC_ARCH=arch-linux2-c-debug all && make PETSC_DIR=$(INSTALL_DIR)/Builds/petsc-3.2-p6 PETSC_ARCH=arch-linux2-c-debug install) clean: echo