install_MPI.sh 838 Bytes
Newer Older
1
#!/bin/bash
incardon's avatar
incardon committed
2

incardon's avatar
incardon committed
3
# check if the directory $1/MPI exist
incardon's avatar
incardon committed
4

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

#
#                  --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
#
#

28
29

./configure --with-cuda --prefix=$1/MPI --enable-mpi-fortran=yes CC=$3 CXX=$4 F77=$5 FC=$5
incardon's avatar
incardon committed
30
make -j $2
incardon's avatar
incardon committed
31
make install
Pietro Incardona's avatar
Pietro Incardona committed
32
33

# Mark the installation
incardon's avatar
incardon committed
34
echo 3 > $1/MPI/version
Pietro Incardona's avatar
Pietro Incardona committed
35