install_MPI_mpich.sh 1.04 KB
Newer Older
incardon's avatar
incardon committed
1
2
3
4
5
6
7
8
#!/bin/bash

# check if the directory $1/MPI exist

if [ -d "$1/MPI" ]; then
  echo "MPI already installed"
  exit 0
fi
incardon's avatar
incardon committed
9
10
11
12
13
rm -rf mpich-3.4.2
rm mpich-3.4.2.tar.gz
wget http://ppmcore.mpi-cbg.de/upload/mpich-3.4.2.tar.gz
tar -xvf mpich-3.4.2.tar.gz
cd mpich-3.4.2
incardon's avatar
incardon committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#
#                  --disable-mca-dso \
#                 --disable-sysv-shmem \
#                 --enable-cxx-exceptions \
#                 --with-threads=posix \
#                 --without-cs-fs \
#                 --with-mpi-param_check=always \
#                 --enable-contrib-no-build=vt,libompitrace \
#
#--enable-mca-no-build=paffinity,installdirs-windows,timer-windows,shmem-sysv
#
#


if [ x"$6" == x"1" ]; then
   echo "Installing MPI with GPU support"
incardon's avatar
incardon committed
31
  ./configure --prefix=$1/MPI --enable-fortran CC=$3 CXX=$4 F77=$5 FC=$5 FFLAGS=-fallow-argument-mismatch
incardon's avatar
incardon committed
32
33
else
  echo "Installing MPI without GPU support"
incardon's avatar
incardon committed
34
  ./configure --prefix=$1/MPI --enable-fortran CC=$3 CXX=$4 F77=$5 FC=$5 FFLAGS=-fallow-argument-mismatch
incardon's avatar
incardon committed
35
36
37
38
39
40
41
fi
make -j $2
make install

# Mark the installation
echo 4 > $1/MPI/version