This repository was archived by the owner on Apr 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtutorial.patch
More file actions
70 lines (61 loc) · 2.51 KB
/
tutorial.patch
File metadata and controls
70 lines (61 loc) · 2.51 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
diff --git a/laghos.cpp b/laghos.cpp
index 3d756ea..2ac8c04 100644
--- a/laghos.cpp
+++ b/laghos.cpp
@@ -84,7 +84,7 @@ static void Checks(const int dim, const int ti, const double norm, int &checks);
int main(int argc, char *argv[])
{
// Initialize MPI.
- MPI_Session mpi(argc, argv);
+ mfem::MPI_Session mpi(argc, argv);
const int myid = mpi.WorldRank();
// Print the banner.
diff --git a/makefile b/makefile
index a59f844..dbeba13 100644
--- a/makefile
+++ b/makefile
@@ -55,7 +55,7 @@ make style
endef
-NPROC = $(shell getconf _NPROCESSORS_ONLN)
+NPROC ?= $(shell getconf _NPROCESSORS_ONLN)
GOALS = help clean distclean style setup mfem metis hypre
# Default installation location
@@ -248,28 +248,28 @@ tests:
# Setup: download & install third party libraries: HYPRE, METIS & MFEM
-HYPRE_URL = https://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods
+HYPRE_URL = https://github.com/hypre-space/hypre
HYPRE_VER = 2.11.2
HYPRE_DIR = hypre
hypre:
@(if [[ ! -e ../$(HYPRE_DIR) ]]; then cd ..; \
- wget -nc $(HYPRE_URL)/download/hypre-$(HYPRE_VER).tar.gz &&\
- tar xzvf hypre-$(HYPRE_VER).tar.gz &&\
+ wget -nc $(HYPRE_URL)/archive/v$(HYPRE_VER).tar.gz &&\
+ tar xzvf v$(HYPRE_VER).tar.gz &&\
ln -s hypre-$(HYPRE_VER) $(HYPRE_DIR) &&\
cd $(HYPRE_DIR)/src &&\
- ./configure --disable-fortran --without-fei CC=mpicc CXX=mpic++ &&\
+ ./configure --disable-fortran --without-fei CC=${HPCTOOLKIT_MPI_CC} CXX=${HPCTOOLKIT_MPI_CXX} &&\
make -j $(NPROC); else echo "Using existing ../$(HYPRE_DIR)"; fi)
-METIS_URL = http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis
+METIS_URL = https://github.com/mfem/tpls/raw/gh-pages
METIS_VER = 4.0.3
METIS_DIR = metis-4.0
metis:
@(if [[ ! -e ../$(METIS_DIR) ]]; then cd ..; \
- wget -nc $(METIS_URL)/OLD/metis-$(METIS_VER).tar.gz &&\
+ wget -nc $(METIS_URL)/metis-$(METIS_VER).tar.gz &&\
tar zxvf metis-$(METIS_VER).tar.gz &&\
ln -s metis-$(METIS_VER) $(METIS_DIR) &&\
cd $(METIS_DIR) &&\
- make -j $(NPROC) OPTFLAGS="-O2";\
+ make -j $(NPROC) OPTFLAGS="-O2" COPTIONS="-std=c89";\
else echo "Using existing ../$(METIS_DIR)"; fi)
MFEM_GIT = https://github.com/mfem/mfem.git
@@ -279,6 +279,6 @@ mfem: hypre metis
@(if [[ ! -e ../mfem ]]; then cd ..; \
git clone --single-branch --branch master --depth 1 $(MFEM_GIT) &&\
cd mfem &&\
- make $(MFEM_BUILD) -j $(NPROC); else echo "Using existing ../mfem"; fi)
+ make $(MFEM_BUILD) -j $(NPROC) CC=${HPCTOOLKIT_LAGHOS_C_COMPILER}; else echo "Using existing ../mfem"; fi)
setup: mfem