Difference between revisions of "Installation script for Z800"

From www.coria-cfd.fr
Jump to: navigation, search
Line 46: Line 46:
 
   
 
   
 
  packages:
 
  packages:
 +
sudo apt-get install -y nvidia-current
 +
sudo apt-get install -y ubuntu-desktop
 
  sudo apt-get install -y tcsh
 
  sudo apt-get install -y tcsh
 
  sudo apt-get install -y ssh
 
  sudo apt-get install -y ssh
Line 61: Line 63:
 
  sudo apt-get install -y lib32z1-dev
 
  sudo apt-get install -y lib32z1-dev
 
  sudo apt-get install -y zlib1g-dev
 
  sudo apt-get install -y zlib1g-dev
  sudo apt-get install -y tkdiff
+
  sudo apt-get install -y tkcvs
 
  sudo apt-get install -y default-jre
 
  sudo apt-get install -y default-jre
 
  sudo apt-get install -y gparted
 
  sudo apt-get install -y gparted
Line 75: Line 77:
 
  sudo apt-get install -y xemacs21
 
  sudo apt-get install -y xemacs21
 
  sudo apt-get install -y meld
 
  sudo apt-get install -y meld
 +
sudo apt-get install -y hdfview
 +
sudo apt-get install -y vlc
 
   
 
   
 
  gambit:
 
  gambit:
Line 86: Line 90:
 
  mkdir -p $(INSTALL_DIR)/local
 
  mkdir -p $(INSTALL_DIR)/local
 
   
 
   
  sed:
+
  sed: structure
 
  (cd $(INSTALL_DIR)/Downloads && wget http://ftp.gnu.org/gnu/sed/sed-4.2.tar.bz2)
 
  (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 && 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)
 
  (cd $(INSTALL_DIR)/Builds/sed-4.2 && ./configure --prefix=$(INSTALL_DIR)/local/sed-4.2 && make && make install)
 
   
 
   
  fftw3:
+
  fftw3: structure
 
  (cd $(INSTALL_DIR)/Downloads && wget http://www.fftw.org/fftw-3.3.2.tar.gz)
 
  (cd $(INSTALL_DIR)/Downloads && wget http://www.fftw.org/fftw-3.3.2.tar.gz)
 
  (cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/fftw-3.3.2.tar.gz)
 
  (cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/fftw-3.3.2.tar.gz)
 
  (cd $(INSTALL_DIR)/Builds/fftw-3.3.2 && ./configure --prefix=$(INSTALL_DIR)/local/fftw-3.3.2 && make && make install)
 
  (cd $(INSTALL_DIR)/Builds/fftw-3.3.2 && ./configure --prefix=$(INSTALL_DIR)/local/fftw-3.3.2 && make && make install)
 
   
 
   
  openmpi:
+
  openmpi: structure
 
  (cd $(INSTALL_DIR)/Downloads && wget http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.tar.bz2)
 
  (cd $(INSTALL_DIR)/Downloads && wget http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.tar.bz2)
 
  (cd $(INSTALL_DIR)/Builds && tar -jxvf $(INSTALL_DIR)/Downloads/openmpi-1.6.tar.bz2)
 
  (cd $(INSTALL_DIR)/Builds && tar -jxvf $(INSTALL_DIR)/Downloads/openmpi-1.6.tar.bz2)
 
  (cd $(INSTALL_DIR)/Builds/openmpi-1.6 && ./configure --prefix=$(INSTALL_DIR)/local/openmpi-1.6 --enable-mpi-f90 && make && make install)
 
  (cd $(INSTALL_DIR)/Builds/openmpi-1.6 && ./configure --prefix=$(INSTALL_DIR)/local/openmpi-1.6 --enable-mpi-f90 && make && make install)
 
   
 
   
  hdf5:
+
  hdf5: structure
 
  (cd $(INSTALL_DIR)/Downloads && wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.9.tar.bz2)
 
  (cd $(INSTALL_DIR)/Downloads && wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.9.tar.bz2)
 
  (cd $(INSTALL_DIR)/Builds && tar -jxvf $(INSTALL_DIR)/Downloads/hdf5-1.8.9.tar.bz2)
 
  (cd $(INSTALL_DIR)/Builds && tar -jxvf $(INSTALL_DIR)/Downloads/hdf5-1.8.9.tar.bz2)
 
  (cd $(INSTALL_DIR)/Builds/hdf5-1.8.9 && ./configure --prefix=$(INSTALL_DIR)/local/hdf5-1.8.9 --enable-fortran --enable-cxx && make && make install)
 
  (cd $(INSTALL_DIR)/Builds/hdf5-1.8.9 && ./configure --prefix=$(INSTALL_DIR)/local/hdf5-1.8.9 --enable-fortran --enable-cxx && make && make install)
 
   
 
   
  lapack:
+
  lapack: structure
 
  (cd $(INSTALL_DIR)/Downloads && wget http://www.netlib.org/lapack/lapack-3.4.1.tgz)
 
  (cd $(INSTALL_DIR)/Downloads && wget http://www.netlib.org/lapack/lapack-3.4.1.tgz)
 
  (cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/lapack-3.4.1.tgz)
 
  (cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/lapack-3.4.1.tgz)
Line 115: Line 119:
 
  ln -s $(INSTALL_DIR)/Builds/lapack-3.4.1/librefblas.a $(INSTALL_DIR)/local/blas/lib/libblas.a
 
  ln -s $(INSTALL_DIR)/Builds/lapack-3.4.1/librefblas.a $(INSTALL_DIR)/local/blas/lib/libblas.a
 
   
 
   
  ParMetis:
+
  ParMetis: structure
 
  (cd $(INSTALL_DIR)/Downloads && wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD/ParMetis-3.2.0.tar.gz)
 
  (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)
 
  (cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/ParMetis-3.2.0.tar.gz)
Line 133: Line 137:
 
  ln -s $(INSTALL_DIR)/Builds/ParMetis-3.2.0/*.h $(INSTALL_DIR)/local/ParMetis-3.2.0/include/
 
  ln -s $(INSTALL_DIR)/Builds/ParMetis-3.2.0/*.h $(INSTALL_DIR)/local/ParMetis-3.2.0/include/
 
   
 
   
  scotch:
+
  scotch: structure
 
  (cd $(INSTALL_DIR)/Downloads && wget https://gforge.inria.fr/frs/download.php/28977/scotch_5.1.12b.tar.gz)
 
  (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)
 
  (cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/scotch_5.1.12b.tar.gz)
Line 159: Line 163:
 
  (cd $(INSTALL_DIR)/Builds/scotch_5.1.12/src && make scotch && make ptscotch && make install)
 
  (cd $(INSTALL_DIR)/Builds/scotch_5.1.12/src && make scotch && make ptscotch && make install)
 
   
 
   
  petsc:
+
  petsc: structure
 
  (cd $(INSTALL_DIR)/Downloads && wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.2-p6.tar.gz)
 
  (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 && tar -zxvf $(INSTALL_DIR)/Downloads/petsc-lite-3.2-p6.tar.gz)

Revision as of 07:35, 22 November 2012

Copy and paste the following lines in .bash_profile:

alias l='ls -l'
export PATH=$PATH:/local/openmpi-1.6/bin
export LD_LIBRARY_PATH="/local/openmpi-1.6/lib:$LD_LIBRARY_PATH"
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libc/memcpy-preload.so

Copy and paste this in a file called Install.make:

INSTALL_DIR = /

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

freenx-ocelot:
	sudo apt-get install libaudiofile0
	sudo add-apt-repository -y ppa:freenx-team
	sudo sed -i 's/oneiric/lucid/g' /etc/apt/sources.list.d/freenx-team-ppa-oneiric.list
	sudo apt-get update && sudo apt-get upgrade
	wget -P /tmp http://de.archive.ubuntu.com/ubuntu/pool/main/e/esound/esound-common_0.2.41-8_all.deb
	wget -P /tmp http://de.archive.ubuntu.com/ubuntu/pool/main/e/esound/libesd0_0.2.41-8_amd64.deb
	wget -P /tmp http://de.archive.ubuntu.com/ubuntu/pool/main/e/esound/esound-clients_0.2.41-8_amd64.deb
	sudo dpkg -i /tmp/esound-common_0.2.41-8_all.deb
	sudo dpkg -i /tmp/libesd0_0.2.41-8_amd64.deb
	sudo dpkg -i /tmp/esound-clients_0.2.41-8_amd64.deb
	sudo apt-get -f -y install
	sudo rm -f /tmp/esound-common_0.2.41-8_all.deb /tmp/libesd0_0.2.41-8_amd64.deb /tmp/esound-clients_0.2.41-8_amd64.deb
	sudo apt-get install -y freenx
	cd /tmp && wget https://bugs.launchpad.net/freenx-server/+bug/576359/+attachment/1378450/+files/nxsetup.tar.gz && tar zxvf nxsetup.tar.gz
	sudo cp /tmp/nxsetup /usr/lib/nx/nxsetup
	-sudo /usr/lib/nx/nxsetup --install --setup-nomachine-key
	sudo rm -f /tmp/nxsetup /tmp/nxsetup.tar.gz
	sudo touch /etc/apt/preferences
	sudo sh -c "echo Package: esound-common >> /etc/apt/preferences"
	sudo sh -c "echo Pin: version 0.2.41-8 >> /etc/apt/preferences"
	sudo sh -c "echo Pin-priority: 1001 >> /etc/apt/preferences"
	sudo sh -c "echo >> /etc/apt/preferences"
	sudo sh -c "echo Package: libesd0 >> /etc/apt/preferences"
	sudo sh -c "echo Pin: version 0.2.41-8 >> /etc/apt/preferences"
	sudo sh -c "echo Pin-priority: 1001 >> /etc/apt/preferences"

packages:
	sudo apt-get install -y nvidia-current
	sudo apt-get install -y ubuntu-desktop
	sudo apt-get install -y tcsh
	sudo apt-get install -y ssh
	sudo apt-get install -y g++
	sudo apt-get install -y gdb
	sudo apt-get install -y gfortran
	sudo apt-get install -y cmake
	sudo apt-get install -y flex
	sudo apt-get install -y bison
	sudo apt-get install -y git
	sudo apt-get install -y gitk
	sudo apt-get install -y subversion
	sudo apt-get install -y rapidsvn
	sudo apt-get install -y vim-gnome
	sudo apt-get install -y lib32z1-dev
	sudo apt-get install -y zlib1g-dev
	sudo apt-get install -y tkcvs
	sudo apt-get install -y default-jre
	sudo apt-get install -y gparted
	sudo apt-get install -y synaptic
	sudo apt-get install -y eclipse
	sudo apt-get install -y paraview
	sudo apt-get install -y browser-plugin-gnash
	sudo apt-get install -y grace
	sudo apt-get install -y gnuplot
	sudo apt-get install -y filezilla
	sudo apt-get install -y dselect
	sudo apt-get install -y emacs
	sudo apt-get install -y xemacs21
	sudo apt-get install -y meld
	sudo apt-get install -y hdfview
	sudo apt-get install -y vlc

gambit:
	wget -P /tmp http://ubuntu.mirror.cambrium.nl/ubuntu//pool/multiverse/o/openmotif/libmotif3_2.2.3-4_amd64.deb && sudo dpkg -i /tmp/libmotif3_2.2.3-4_amd64.deb
	sudo apt-get install libstdc++5 xfs xfstt xfonts-75dpi xfonts-100dpi
	rm /tmp/libmotif3_2.2.3-4_amd64.deb

structure:
	mkdir -p $(INSTALL_DIR)/Downloads
	mkdir -p $(INSTALL_DIR)/Builds
	mkdir -p $(INSTALL_DIR)/local

sed: structure
	(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: structure
	(cd $(INSTALL_DIR)/Downloads && wget http://www.fftw.org/fftw-3.3.2.tar.gz)
	(cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/fftw-3.3.2.tar.gz)
	(cd $(INSTALL_DIR)/Builds/fftw-3.3.2 && ./configure --prefix=$(INSTALL_DIR)/local/fftw-3.3.2 && make && make install)

openmpi: structure
	(cd $(INSTALL_DIR)/Downloads && wget http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.tar.bz2)
	(cd $(INSTALL_DIR)/Builds && tar -jxvf $(INSTALL_DIR)/Downloads/openmpi-1.6.tar.bz2)
	(cd $(INSTALL_DIR)/Builds/openmpi-1.6 && ./configure --prefix=$(INSTALL_DIR)/local/openmpi-1.6 --enable-mpi-f90 && make && make install)

hdf5: structure
	(cd $(INSTALL_DIR)/Downloads && wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.9.tar.bz2)
	(cd $(INSTALL_DIR)/Builds && tar -jxvf $(INSTALL_DIR)/Downloads/hdf5-1.8.9.tar.bz2)
	(cd $(INSTALL_DIR)/Builds/hdf5-1.8.9 && ./configure --prefix=$(INSTALL_DIR)/local/hdf5-1.8.9 --enable-fortran --enable-cxx && make && make install)

lapack: structure
	(cd $(INSTALL_DIR)/Downloads && wget http://www.netlib.org/lapack/lapack-3.4.1.tgz)
	(cd $(INSTALL_DIR)/Builds && tar -zxvf $(INSTALL_DIR)/Downloads/lapack-3.4.1.tgz)
	(cd $(INSTALL_DIR)/Builds/lapack-3.4.1 && 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.1/liblapack.a $(INSTALL_DIR)/local/lapack/lib/liblapack.a
	ln -s $(INSTALL_DIR)/Builds/lapack-3.4.1/librefblas.a $(INSTALL_DIR)/local/blas/lib/libblas.a

ParMetis: structure
	(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.6/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.6/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: structure
	(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.6/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_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER -Drestrict=__restrict -DIDXSIZE64 -I$(INSTALL_DIR)/local/openmpi-1.6/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: structure
	(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 --download-hypre=yes --with-mpi-dir=$(INSTALL_DIR)/local/openmpi-1.6 --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


WARNING: If you encounter any problem for installing freeNX, you should consider visiting this website...