-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_mumps.sh
More file actions
executable file
·38 lines (31 loc) · 988 Bytes
/
Copy pathmake_mumps.sh
File metadata and controls
executable file
·38 lines (31 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
# Default values
: ${MUMPS_VERSION:=5.3.3}
: ${PREFIX:="${PWD}"}
: ${PROCS:=1}
# Download and unpack
mkdir -p src && cd src
wget -c -O MUMPS_${MUMPS_VERSION}.tar.gz https://graal.ens-lyon.fr/MUMPS/MUMPS_${MUMPS_VERSION}.tar.gz
tar -xzf MUMPS_${MUMPS_VERSION}.tar.gz
cd MUMPS_${MUMPS_VERSION}
# Build MUMPS static lib
cp ../../mumps/Makefile.inc .
make -j${PROCS} dexamples zexamples
# Test
cd examples
cp ../../../mumps/examples/check_test .
./dsimpletest < input_simpletest_real | ./check_test
./zsimpletest < input_simpletest_cmplx | ./check_test
cd ..
# Build MATLAB mex
cd MATLAB
cp Makefile Makefile.bak
cp ../../../mumps/MATLAB/Makefile .
make
# Install
mkdir -p "${PREFIX}/lib/matlab"
cp *.m *.mex* *.mat "${PREFIX}/lib/matlab"
# Test MATLAB
cd /tmp
MATLABPATH="${PREFIX}/lib/matlab:${MATLABPATH}" matlab -nojvm -batch 'simple_example; zsimple_example; schur_example; diagainv_example; multiplerhs_example; sparserhs_example; polyfit(1:10, sin(1:10), 2)'