source: ThirdParty/Mumps/trunk/get.Mumps

Last change on this file was 4045, checked in by stefan, 17 months ago

try to download mumps source from github first

  • may be more reliable than MUMPS server, which is still there as fallback
File size: 1.5 KB
RevLine 
[247]1#!/bin/sh
2
[360]3# Set the following to the latest MUMPS version.
4#  THERE MUST BE NO SPACE BEFORE AND AFTER THE EQUAL (=) OPERATOR.
[2210]5mumps_ver=4.10.0
[323]6
[389]7set -e
[360]8
[525]9wgetcmd=wget
[2138]10wgetcount=`which wget 2>/dev/null | wc -l`
11if test ! $wgetcount = 1; then
[247]12  echo "Utility wget not found in your PATH."
[525]13  if test `uname` = Darwin; then
[3813]14    wgetcmd="curl -L -O"
15    echo "Using curl instead."
[2561]16  elif test `uname` = FreeBSD; then
17    wgetcmd=fetch
[3813]18    echo "Using fetch instead."
[525]19  else
20    exit -1
21  fi
[247]22fi
23
24echo " "
25echo "Running script for downloading the source code for MUMPS"
26echo " "
27
28rm -f MUMPS*.tgz
29
[4045]30echo "Downloading the source code from coin-or-tools.github.io..."
31if $wgetcmd http://coin-or-tools.github.io/ThirdParty-Mumps/MUMPS_${mumps_ver}.tar.gz ;
32then
33  echo "Download finished."
34else
35  echo
36  echo "Downloading from GitHub failed, trying mumps.enseeiht.fr..."
37  if $wgetcmd http://mumps.enseeiht.fr/MUMPS_${mumps_ver}.tar.gz ;
38  then
39    echo "Download finished."
40  else
41    echo "Download failed...exiting"
42  fi
43fi
[247]44
45echo "Uncompressing the tarball..."
46gunzip -f MUMPS_${mumps_ver}.tar.gz
47
48echo "Unpacking the source code..."
49tar xf MUMPS_${mumps_ver}.tar
50
51echo "Deleting the tar file..."
52rm MUMPS_${mumps_ver}.tar
53
[957]54rm -rf MUMPS
[279]55mv MUMPS_${mumps_ver} MUMPS
56
[247]57echo " "
58echo "Done downloading the source code for MUMPS."
59echo " "
[2747]60echo "Apply a patch to work around a bug in MUMPS."
61echo " "
62
63patch -p0 < mumps.patch
[3703]64patch -p0 < mumps_mpi.patch
65mv MUMPS/libseq/mpi.h MUMPS/libseq/mumps_mpi.h
[2747]66
67echo " "
[323]68echo "Verify that there are no error message in the output above."
Note: See TracBrowser for help on using the repository browser.