Skip to content

Commit 074d129

Browse files
Update README.md
Additions to the README.md file to cover a number of pitfalls uncovered by users.
1 parent 2ef830f commit 074d129

File tree

1 file changed

+46
-10
lines changed

1 file changed

+46
-10
lines changed

README.md

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,36 @@ This directory contains four files: BingClaw5.6.1_singlesource.tar setrun.py Pal
2626

2727
Here we outline the steps required to perform a simulation of the Storegga slide using BingClaw on a Linux system.
2828

29-
We will need clawpack (version 5.6.1), python3, LAPACK and BLAS.
29+
We will need clawpack (version 5.6.1), gfortran, python3, LAPACK and BLAS.
3030

3131
If you do not have LAPACK and BLAS, the code can be obtained from https://github.com/Reference-LAPACK/lapack Follow the instructions for compilation and you should end up with libraries liblapack.a and librefblas.a. You will need to modify a Makefile to point to these files.
3232
You will also need HDF5. If you have superuser rights, then LAPACK, BLAS, and HDF5 are all installed using
3333

34+
```
3435
sudo apt-get install libblas-dev liblapack-dev
35-
sudo apt-get install libhdf5-serial-dev
36-
36+
sudo apt-get install libhdf5-serial-dev
37+
```
38+
If you get a message of the form *E: Unable to locate package libhdf5-dev* then you will most likely have to update apt-get, e.g.
39+
```
40+
sudo apt-get update -y
41+
sudo apt-get install -y libhdf5-dev
42+
```
43+
Should gfortran be lacking from your system, this is installed using
44+
```
45+
sudo apt install gfortran
46+
```
3747

3848
If you do not have python3 and do not have superuser rights to your Linux, you can type
3949

50+
```
4051
wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
52+
```
4153

4254
followed by
4355

56+
```
4457
bash Anaconda3-2020.11-Linux-x86_64.sh
58+
```
4559

4660
and follow the instructions.
4761

@@ -51,52 +65,72 @@ Choose a directory in which to place it: e.g. ${HOME}/clawpack_src
5165

5266
Obtain the tar file *clawpack-v5.6.1.tar.gz* using
5367

68+
```
5469
wget https://github.com/clawpack/clawpack/files/3781620/clawpack-v5.6.1.tar.gz
70+
```
5571

5672
then do
5773

58-
tar xvf clawpack-v5.6.1.tar.gz
74+
```
75+
tar xvf clawpack-v5.6.1.tar.gz
76+
```
5977

6078
then
6179

80+
```
6281
cd clawpack-v5.6.1
63-
pwd
82+
pwd
83+
```
6484

6585
Then, add the following lines to ${HOME}/.bashrc file (or equivalent)
6686

67-
export CLAW=$HOME/clawpack_src/clawpack-v5.6.1
87+
```
88+
export CLAW=$HOME/clawpack_src/clawpack-v5.6.1
89+
```
6890

6991
(setting this variable to what is shown on typing "pwd")
7092

71-
export PYTHONPATH=$CLAW:$PYTHONPATH
93+
```
94+
export PYTHONPATH=$CLAW:$PYTHONPATH
95+
```
7296

7397
We then need to compile BingClaw. If you then do
7498

99+
```
75100
tar xvf BingClaw5.6.1_singlesource.tar
76-
cd BingClaw5.6.1_singlesource
101+
cd BingClaw5.6.1_singlesource
102+
```
77103

78104
you need to alter the files src/Makefile* such that the variables LAPACK and BLAS point to the correct places:
79105

80106
e.g.
81107

108+
```
82109
LAPACK=/usr/lib/x86_64-linux-gnu/lapack/liblapack.a
83-
BLAS=/usr/lib/x86_64-linux-gnu/blas/libblas.a
110+
BLAS=/usr/lib/x86_64-linux-gnu/blas/libblas.a
111+
```
84112

85113
and with the correct path for the HDF5 library, e.g.:
86114

115+
```
87116
-I/usr/include/hdf5/serial
117+
```
88118

89119
You should then be able to compile BingClaw5.6.1 using the following sequence:
90120

91-
sh compile_src.sh
121+
```
122+
sh compile_src.sh
123+
```
92124

93125
This generates the executable *bin/BingClaw5.6.1*
94126

95127
Finally, create a directory in which you want to run BingClaw Save the file setrun.py in it and make sure that the lines with "PaleoNorthAtlantic.tt3" and "storegga_ini.tt3" point to the correct location. (You will have to (g)unzip the file PaleoNorthAtlantic.tt3.gz before running the program.)
96128

97129
Execute the setrun.py file using
98130

131+
```
99132
python setrun.py
133+
```
100134

101135
We then execute the BingClaw program you have just compiled, and this should be generate the required output.
102136

@@ -110,6 +144,8 @@ In the directory *BingClaw_fortfile_display_example* we present a simple solutio
110144
The file Makefile.nonmodules requires the following line to allow it to compile in situations described on this page:
111145
https://forum.mmm.ucar.edu/threads/how-to-fix-error-rank-mismatch-between-actual-argument-at-1-and-actual-argument-at-2.11998/#post-27521
112146

147+
```
113148
OPTIM= -O3 -cpp -fallow-argument-mismatch
149+
```
114150

115151

0 commit comments

Comments
 (0)