#! /bin/bash # This script install mpich2 version 3.1.4 in the frontend of a Rocks Linux cluster in /share/apps/mpich2/3.1.4/intel # Mandatory requirements: # FC=/share/apps/intel/impi/4.1.0.024/bin64/mpiifort # CC=/share/apps/intel/impi/4.1.0.024/bin64/mpiicc # intel ifort compilers are installed in /share/apps/intel/Compiler/11.1/072/bin/intel64/ # intel icc compilers are installed in /share/apps/intel/Compiler/11.0/081/bin/intel64/ cd /share/apps/configrepo #wget http://www2.fizik.usm.my/configrepo/howto/mpich2/mpich-3.1.4.tar.gz mkdir mpich-3.1.4_intel cd mpich-3.1.4_intel cp ../mpich-3.1.4.tar.gz . tar -zxvf mpich-3.1.4.tar.gz cd mpich-3.1.4 ## worked ### ./configure --prefix=/share/apps/mpich2/3.1.4/intel --enable-threads=funneled --enable-shared --enable-static FC=/share/apps/intel/impi/4.1.0.024/bin64/mpiifort CC=/share/apps/intel/impi/4.1.0.024/bin64/mpicc F77=ifort FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' LDFLAGS=-L/share/apps/intel/impi/4.1.0.024/intel64/lib CFLAGS='-O3 -m64' --disable-cxx --with-thread-package=posix --enable-romio --with-pm=hydra --enable-static --enable-threads=funneled ## worked ### #./configure --prefix=/share/apps/mpich2/3.1.4/intel --enable-threads=funneled --enable-shared --enable-static FC=/share/apps/intel/impi/4.1.0.024/bin64/mpiifort CC=/share/apps/intel/impi/4.1.0.024/bin64/mpicc F77=ifort FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' LDFLAGS=-L/share/apps/intel/impi/4.1.0.024/intel64/lib CFLAGS='-O3 -m64' --disable-cxx --with-thread-package=posix --enable-romio --with-pm=hydra --enable-static --enable-threads=funneled #./configure --prefix=/share/apps/mpich2/3.1.4/intel --enable-threads=funneled FC=ifort CC=icc CXX='icc -E' F77=ifort FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' --enable-cxx --enable-fortran=all --enable-threads=multiple --with-thread-package=posix --enable-romio --with-pm=hydra --disable-shared --enable-static #./configure --prefix=/share/apps/mpich2/3.1.4/intel FC=/share/apps/intel/impi/4.1.0.024/bin64/mpiifort CC=/share/apps/intel/impi/4.1.0.024/bin64/mpicc F77=ifort FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64' LDFLAGS=-L/share/apps/intel/impi/4.1.0.024/intel64/lib CFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64' --enable-fortran=all --enable-threads=multiple --with-thread-package=posix --enable-romio --with-pm=hydra --enable-static --enable-threads=funneled --disable-shared #CXX='/share/apps/intel/impi/4.1.0.024/bin64/mpiicpc -E' --disable-cxx ## worked ### #./configure --prefix=/share/apps/mpich2/3.1.4/intel --enable-threads=funneled --enable-shared --enable-static --disable-cxx CC=/share/apps/openmpi-1.8.5/intel/bin/mpicc CXX=icpc CPP='icc -E' CXXCPP='icpc -E' F77=ifort FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' FC=ifort FCFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' LDFLAGS='-L/share/apps/openmpi-1.8.5/intel/lib -L/share/apps/intel/impi/4.1.0.024/lib64' ###worked ### # ./configure --prefix=/share/apps/mpich2/3.1.4/intel CC='/share/apps/intel/impi/4.1.0.024/bin64/mpiicc' CXX='/share/apps/openmpi-1.8.5/intel/bin/mpicxx -E' CPP='/share/apps/openmpi-1.8.5/intel/bin/mpic++ -E' CXXCPP='/share/apps/openmpi-1.8.5/intel/bin/mpic++ -E' FC=/share/apps/intel/impi/4.1.0.024/bin64/mpiifort F77=/share/apps/intel/impi/4.1.0.024/bin64/mpif77 FCFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' --enable-static --enable-threads=funneled --enable-shared LDFLAGS='-L/share/apps/intel/impi/4.1.0.024/lib64' --disable-f77 --disable-fortran #./configure --prefix=/share/apps/mpich2/3.1.4/intel --enable-static --enable-threads=funneled --enable-shared CC=icc CPP='icpc -E' FC=ifort F77=ifort CXXFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' CPPFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' CXXFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' CXX='icpc -E' #CXX='icpc -E' CXXCPP='icpc -E' #LDFLAGS='-L/share/apps/intel/impi/4.1.0.024/lib64 -I/share/apps/intel/impi/4.1.0.024/include64' #CCLFAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' #FCFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' #CPPFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' #CPP='/share/apps/intel/impi/4.1.0.024/bin64/mpiicpc -E' CXX='/share/apps/intel/impi/4.1.0.024/bin64/mpicxx -E' CXXCPP='/share/apps/intel/impi/4.1.0.024/bin64/mpiicpc -E' #CPP='icpc -E' CXX='icpc -E' CXXCPP='icpc -E' #CXX='/share/apps/openmpi-1.8.5/intel/bin/mpicc' #CXX='/share/apps/intel/impi/4.1.0.024/bin64/mpicxx -E' #CPP='/share/apps/intel/impi/4.1.0.024/bin64/mpicxx -E' CXXCPP='/share/apps/intel/impi/4.1.0.024/bin64/mpicxx -E' # -L/share/apps/openmpi-1.8.5/intel/lib # FC=/share/apps/openmpi-1.8.5/intel/bin/mpifort #CXX='/share/apps/openmpi-1.8.5/intel/bin/mpicxx -E' CPP='/share/apps/openmpi-1.8.5/intel/bin/mpicxx -E' #CXXCPP='/share/apps/openmpi-1.8.5/intel/bin/mpicxx -E' # CC='/share/apps/openmpi-1.8.5/intel/bin/mpicc' #F77=/share/apps/intel/impi/4.1.0.024/bin64/mpif77 #F77=/share/apps/openmpi-1.8.5/intel/bin/mpif77 #./configure --prefix=/share/apps/mpich2/3.1.4/intel FC=ifort CC=/share/apps/openmpi-1.8.5/intel/bin/mpicc LDFLAGS=-L/share/apps/openmpi-1.8.5./ # configure --prefix=/share/apps/mpich2/3.1.4/intel FC=ifort CC=/share/apps/intel/impi/4.1.0.024/bin64/mpicc LDFLAGS=-L/share/apps/intel/impi/4.1.0.024/intel64/lib LIBS=-lmpi -disable-cxx 2>&1 | tee c.txt/intel/lib LIBS=-lmpi --disable-cxx 2>&1 | tee c.txt #./configure --prefix=/share/apps/mpich2/3.1.4/intel FC=ifort CC=/share/apps/openmpi-1.8.5/intel/bin/mpicc LDFLAGS=-L/share/apps/openmpi-1.8.5/intel/lib LIBS=-lmpi --disable-cxx 2>&1 | tee c.txt #FC=ifort CC=/share/apps/openmpi-1.8.5/intel/bin/mpicc #./configure --prefix=/share/apps/mpich2/3.1.4/intel FC=/share/apps/openmpi-1.8.5/intel/bin/mpiifort CC=/share/apps/openmpi-1.8.5/intel/bin/mpicc -disable-cxx LDFLAGS=-L/share/apps/intel/impi/4.1.0.024/intel64/lib LIBS=-lmpi 2>&1 | tee c.txt #CPPFLAGS=-I/share/apps/intel/impi/4.1.0.024/intel64/include #CC=/share/apps/intel/impi/4.1.0.024/bin64/mpicc #./configure --prefix=/share/apps/mpich2/3.1.4/intel FC=/share/apps/intel/impi/4.1.0.024/bin64/mpiifort CC=/share/apps/intel/impi/4.1.0.024/bin64/mpicc -disable-cxx LDFLAGS=-L/share/apps/intel/impi/4.1.0.024/intel64/lib LIBS=-lmpi CPPFLAGS=-I/share/apps/intel/impi/4.1.0.024/intel64/include 2>&1 | tee c.txt #./configure --prefix=/share/apps/mpich2/3.1.4/intel FC=/share/apps/openmpi-1.8.5/intel/bin/mpifort CC=/share/apps/openmpi-1.8.5/intel/bin/mpicc -disable-cxx LDFLAGS=-L/share/apps/openmpi-1.8.5/intel/lib/ LIBS=-lmpi 2>&1 | tee c.txt #./configure --prefix=/share/apps/mpich2/3.1.4/intel FC=ifort CC=icc --disable-cxx 2>&1 | tee c.txt #./configure --prefix=/share/apps/mpich2/3.1.4/intel FC=ifort CC=icpc --disable-cxx 2>&1 | tee c.txt #./configure --prefix=/share/apps/mpich2/3.1.4/intel FC=ifort CC=icpc --disable-cxx LDFLAGS=-L/share/apps/intel/impi/4.1.0.024/intel64/lib CPPFLAGS=-I/share/apps/intel/impi/4.1.0.024/intel64/include 2>&1 | tee c.txt #./configure --prefix=/share/apps/mpich2/3.1.4/intel FC=ifort CC=icc --disable-cxx LDFLAGS=-L/share/apps/intel/impi/4.1.0.024/intel64/lib CPPFLAGS=-I/share/apps/intel/impi/4.1.0.024/intel64/include 2>&1 | tee c.txt 2>&1 | tee c.txt #./configure --prefix=/share/apps/mpich2/3.1.4/intel --enable-threads=funneled --enable-shared --enable-static --enable-fortran=all --enable-cxx CC=icc CFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_CFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' CXX=icpc CXXFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_CXXFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' CPP='icc -E' CXXCPP='icpc -E' F77=ifort FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_FFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' FC=ifort FCFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_FCFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' #./configure --prefix=/share/apps/mpich2/3.1.4/intel --enable-threads=funneled --enable-shared --enable-static --enable-fortran=all --disable-cxx CC=icc CFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_CFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' CXX=icpc CXXFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_CXXFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' CPP='icc -E' CXXCPP='icpc -E' F77=ifort FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_FFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' FC=ifort FCFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_FCFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' #./configure --prefix=/share/apps/mpich2/3.1.4/intel --enable-shared --enable-static CC=icc CFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_CFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' CPP='icc -E' F77=ifort FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_FFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' FC=ifort FCFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_FCFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' LDFLAGS=-L/share/apps/intel/Compiler/11.1/072/lib/intel64 #./configure --prefix=/share/apps/mpich2/3.1.4/intel --enable-threads=funneled --enable-shared --enable-static --disable-cxx CC=icc CXX=icpc CPP='icc -E' CXXCPP='icpc -E' F77=ifort FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' FC=ifort FCFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' # ./configure --prefix=/share/apps/mpich2/3.1.4/intel FC=ifort CC=/share/apps/openmpi-1.8.5/intel/bin/mpicc LDFLAGS=-L/share/apps/openmpi-1.8.5/intel/lib LIBS=-lmpi --disable-cxx CPP='icpc -E' CXX='icpc -E' --enable-fortran=all MPICHLIB_CFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' MPICHLIB_CXXFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' F77=ifort FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_FFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' FC=ifort FCFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' MPICHLIB_FCFLAGS='-O3 -xSSE4.2 -ip -m64 -shared-intel' #./configure --prefix=/share/apps/mpich2/3.1.4/intel --enable-threads=funneled --enable-shared --enable-static --disable-cxx CC=/share/apps/openmpi-1.8.5/intel/bin/mpicc CXX=icpc CPP='icc -E' CXXCPP='icpc -E' F77=ifort FFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' FC=ifort FCFLAGS='-O3 -xSSE4.2 -ip -mp1 -m64 -shared-intel' LDFLAGS='-L/share/apps/openmpi-1.8.5/intel/lib -L/share/apps/intel/impi/4.1.0.024/lib64' #Refer to http://dipc.ehu.es/mediawiki/index.php/Intel_compiling_guide #aclocal #automake make make install