This repository has been archived by the owner on Aug 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
INSTALL
106 lines (70 loc) · 2.82 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
July, 2009:
------------
If you need pact on Mac:
Since I already built it (it requires byacc, which is a little of a
headache) I'll just send you the binaries I built. Unzip them into
/opt/hpc/pact.
Check out the code:
1) svn co svn+ssh://<username>@svn.nersc.gov/svn/bout/branches/bout++-petsc
2) cd bout++-petsc/BOUT++
Configure without petsc:
3) ./configure
Configure with petsc:
3a) ./configure --with-petsc --with-debug
Make:
4) make
Run an example:
5) cd examples/Advect1D
6) make
7) ./gas_compress
The bout++-petsc directory is updated to the latest revision. The
solution file will be u_petsc.sol (if configured with petsc) or
u_pvode.sol (if configured without petsc).
BOUT++ is written entirely in C++, and uses the PVODE and PACT libraries.
To compile you will need
1. A working copy of PACT, or at least the PDB part of the library
2. An MPI C++ compiler for compiling BOUT++
3. An MPI C compiler for PVODE. This is because PVODE will not compile
using MPI C++ compilers.
4. GNU Make. Other version of make might work, but not tested
BUILDING AND INSTALLING BOUT++
==============================
To do a basic install, run the following
./configure
gmake
This will search for various things like MPI compilers and PACT libraries,
complaining if it can't find something important. If this happens, you
can specify settings such as:
./configure MPICC=mpicc MPICXX=mpiCC PACT=/usr/local/pact/
Alternately these can be set as environment variables
For other options to configure, run
./configure --help
To compile the examples, run
gmake examples
and to clean the distribution:
gmake clean
USING BOUT++
============
To use BOUT++ you now have to set some environment variables
BOUT_TOP Set to the root directory of BOUT++
for the IDL analysis you need to set:
LD_LIBRARY_PATH should include the directory with pdb2idl.so
IDL_PATH include BOUT_TOP / idllib /
Once these are defined, the examples directories can be moved anywhere and the Makefiles
will still work.
Simulation examples
-------------------
There are several example directories which contain simulations for testing the BOUT++ code
TROUBLESHOOTING
===============
1. configure or make fails
-----------------------
First check that what it's complaining about, and make sure you've set the MPI compilers and PACT
path correctly. Make sure you're using GNU Make.
If these are ok then as a last resort you can set the configuration manually:
In the BOUT++ root directory:
cp make.config.in make.config
Now edit this file, setting the variables CFLAGS, CC (to the MPI C compiler), CXX (MPI C++ compiler),
RANLIB (usually just ranlib) and PACT (to path for PACT library). This is all the configure
script does. Now run make again. If this still fails then you're out of luck - contact one of
the BOUT++ maintainers or someone who knows Makefiles.