forked from LLNL/COGENT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
84 lines (54 loc) · 2.58 KB
/
INSTALL
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
71
72
73
74
75
76
77
78
79
80
81
82
Build hypre
-----------
A version of hypre is provided with the COGENT code. To build it:
1) Enter the hypre directory:
cd hypre-2.9.0b
2) Create a "doconfig" script to configure the hypre makefiles. You can base
it off of one of the nearby scripts. Name the new script something like
doconfig-MACHINE-CXX-F77-OPT, where CXX is the C++ compiler, F77 is the
fortran compiler, and OPT is either "dbg" or "opt".
3) Execute your new script:
./doconfig-MACHINE-CXX-F77-OPT
4) Build and install hypre:
./doinstall
5) Leave the hypre directory
cd ..
Build COGENT
------------
We assume that Chombo is already installed in a directory called "Chombo".
By default, it is assumed that Chombo is installed at the same level as
"COGENT-0.9". If this is not the case, modify the "CHOMBO_HOME" variable in
GNUMakefile, GNUMakefile.multidim, and GNUmakefile.regression to point to the
location of your Chombo installation.
1) Enter the build directory:
cd exec
2) Build COGENT:
gmake -j4
This should create an executable with a platform and compiler specific name,
e.g., cogent.Linux.mpicpc.ifort.OPT.MPI.ex.
Build COGENT with PETSc time integration interface
--------------------------------------------------
We assume PETSc is already installed, and the environment variables
PETSC_DIR (pointing to where PETSc is installed) and PETSC_ARCH (the
specific build) exist. For more details, see the PETSc installation
documentation (http://www.mcs.anl.gov/petsc/documentation/installation.html).
1) Enter the build directory:
cd exec
2) Open the file GNUmakefile.multidim
3) Locate the line USE_PETSC = ... and set it to TRUE (it should be set
to FALSE by default)
4) Specify the machine name (i.e. cab, cori, etc) in the line
MACHINE_NAME = ... (**)
5) Close the file and build COGENT:
gmake [-j all]
(**) Machine-specific linking flags need to be specified to compile with
PETSc. GNUmakefile.multidim should already have these defined for machines
commonly used (cab, cori, etc) (for example, PETSC_LIB_FLAGS_cab,
PETSC_LIB_FLAGS_cori). If this is not defined for the machine being used,
do the following:
1) Go to the PETSc installation.
2) Compile an example (eg. To compile $PETSC_DIR/src/ts/examples/tutorials/ex1.c, go to the folder
and type "make ex1").
3) Look at the linking command executed (eg. the line starting with something like:
"mpicc -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -o ex1 ex1.o ..."
Everything after "-lpetsc" needs to be copied and put in as PETSC_LIB_FLAGS_($MACHINE_NAME).