You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,13 @@ This repository hosts the setup for executing a single point model of the [Happy
4
4
5
5
## The structure of this repository is as follows:
6
6
### data
7
-
Contains all the necessary data to run tRIBS at Happy Jack and includes Snotel and SWANN data as a calibration/validation set.
7
+
Contains all the necessary data to run tRIBS at Happy Jack and includes Snotel and SWANN data as a calibration/validation set.
8
8
### doc
9
-
Contains relevant documentation to running this specific benchmark case and other information regarding working with this repository, including requirements.
9
+
Contains relevant documentation for running this specific benchmark case and other information regarding working with this repository, including requirements and instructions for building tRIBS.
10
10
### src
11
-
Contains two shell scripts: one (*runall.sh*) to execute the model and generate a log of the relevant model runs and the other(*summarize.sh*)a script that summarizes the results from the model run. This directory also contains two sub-directories: [inFile](/src/inFile) whic holds the .in files used to execute tRIBS and another, [scripts](/src/scripts) that contains subroutines for (*runall.sh*) and (*summarize.sh*).
11
+
Is designed to contain source code for for the tRIBS executable, which can be obtained [here](https://github.com/tribshms/tribs_sub2020).
12
12
### bin
13
-
Directory for the tRIBS executable, which can be obtained and built from [here](https://github.com/tribshms/tribs_sub2020).
13
+
Directory for building and storing tRIBS executable, with instructions [here](doc/CMake.md).
14
14
### results
15
15
Directory for results from the Happy Jack point tRIBS simulation.
## instructions for compiling tRIBS on your machine using CMake
4
+
5
+
Note: these instructions are for using CMake via terminal, there is additional documentation [here](https://cmake.org/cmake/help/latest/guide/user-interaction/index.html#guide:User%20Interaction%20Guide) for using the CMake gui.
6
+
7
+
1) Use [Homebrew](https://formulae.brew.sh/formula/cmake)to install CMake, alternatively you can download [CMake](https://cmake.org/download/), but Homebrew is preferred as it will catch additional dependencies.
8
+
9
+
2) You can check to see if CMake is on your path, by typing cmake into the command line. If it says its not found then you will need to set cmake to your path. For example if you downloaded CMake and its now in your application folder you can use:
3) Next obtain the tRIBS source code from [here](https://github.com/tribshms/tribs_sub2020) and store in src.
15
+
16
+
4) Then execute the following code in the terminal, assuming you are in the root directory of HJ_Benchmark
17
+
18
+
```bash
19
+
cmake -S src/tribs_sub2020 . -B bin/build
20
+
cmake --build bin/build --target all
21
+
```
22
+
The first command tells CMake to generate the make files for tribs in a folder called build in bin. Followed by the second line which effectively compiles the code.
23
+
24
+
5) After you can check to see that the executable was made by using.
25
+
```bash
26
+
ls bin/build/
27
+
```
28
+
The executable will have a name specifed in the CMakeList.txt file. Currently it is set to tRIBS.
29
+
30
+
## Content of CMakeFile.txt
31
+
32
+
In some instance you may want to modify the CMakeFile.txt, for example if you want to change the name of the executable, or change compilation parallel mode to serial, or add additional compiler flags. This section will be updated with more detail to demonstrate how this is possible here, but the CMakeFile.txt is documented with where these changes can be made.
0 commit comments