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
+38-8Lines changed: 38 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# UCL ARC Fortran Tooling Recommendations and Examples
2
2
3
-
This repository aims to improve Fortran best practices within UCL and the wider Fortran community by documenting a growing list of Fortran tools recommended by [UCL ARC](https://ucl.ac.uk/arc).
3
+
This repository aims to improve Fortran best practices within UCL and the wider Fortran community by documenting a growing list of Fortran tools recommended by [UCL ARC](https://ucl.ac.uk/arc).
4
4
5
5
## Topics covered
6
6
@@ -9,14 +9,14 @@ This repository aims to improve Fortran best practices within UCL and the wider
9
9
- compiling
10
10
-[debugging](./debugging)
11
11
- documentation
12
-
- formatting
12
+
-[formatting](./formatting)
13
13
- interfaces
14
14
- libraries
15
15
- package management
16
16
- profiling and tracing
17
17
-[testing](./testing)
18
18
19
-
## ARC Fortran projects
19
+
## ARC Fortran projects
20
20
21
21
| Name | Start | End | Repo | Opportunity | Tools | Lessons |
22
22
| --- | --- | --- | --- | --- | --- | --- |
@@ -25,41 +25,50 @@ This repository aims to improve Fortran best practices within UCL and the wider
25
25
| ALPS | Aug 2022 | Jul 2023 |[GitHub](https://github.com/danielver02/ALPS)|[#691](https://github.com/UCL-ARC/research-software-opportunities/issues/691)| Autotools, Ford ||
| Trove | Jan 2021 | Aug 2021 |[GitHub](https://github.com/Trovemaster/TROVE/tree/merge-develop-mpi)|[#404](https://github.com/UCL-ARC/research-software-opportunities/issues/404)| Make, pFUnit (see the [PR](https://github.com/Trovemaster/TROVE/pull/44/files#diff-beda42571c095172ab63437d050612a571d0d9ddd3ad4f2aecbce907a9b7e3d0)) ||
There are two src codes within this repository [mesh_generator](./src/mesh_generator/) and [poisson](./src/poisson/). These are designed to work together.
32
+
There are two src codes within this repository [mesh_generator](./src/mesh_generator/) and [poisson](./src/poisson/). These are designed to work together.
33
+
33
34
-`mesh_generator` generates a basic square 2D triangular mesh (see [mesh_generator.f90](./src/mesh_generator/mesh_generator.f90) for more details).
34
-
-`poisson` is a solver which finds the solution of the steady-state heat conduction equation represented by the Poisson equation over a 2D traingular mesh (see [poisson.f90](./src/poisson/poisson.f90) for more details).
35
+
-`poisson` is a solver which finds the solution of the steady-state heat conduction equation represented by the Poisson equation over a 2D triangular mesh (see [poisson.f90](./src/poisson/poisson.f90) for more details).
35
36
36
37
## Building
37
38
38
39
A bash script is provided for building ([build.sh](./build.sh)). However, there are some instructions below for building without this script.
39
40
40
41
### CMake
41
-
>Note: we have some [PFunit tests](./testing/pFUnit/) which require a local version of PFunit to be pre-built on your device. Once built, the path to the PFunit `installed` dir will need to be passed via `-DCMAKE_PREFIX_PATH`.
42
+
43
+
>Note: we have some [pFUnit tests](./testing/pFUnit/) which require a local version of pFUnit to be pre-built on your device. Once built, the path to the pFUnit `installed` dir will need to be passed via `-DCMAKE_PREFIX_PATH`.
42
44
43
45
One build system we are utilising is cmake (see [CMakeLists.txt](./CMakeLists.txt)). Therefore, to build this repository, please run the following
|[mdb](https://github.com/TomMelt/mdb)| A lightweight wrapper of [gdb](https://www.sourceware.org/gdb/) and [lldb](https://lldb.llvm.org/) intended to make debugging MPI a lot simpler. | <ul><li>Not compatible with Apple ARM.</li><li>Maintained by only one person</li></ul> |
10
-
| print statement | Great for small programs and simple problems but provides very limited information and requires recompiling to alter that information. We recomend spending the time to learn how to use a debugging tool such as the others in this list. | <ul></ul> |
9
+
|[mdb](https://github.com/TomMelt/mdb)| A lightweight wrapper of [gdb](https://www.sourceware.org/gdb/) and [lldb](https://lldb.llvm.org/) intended to make debugging MPI a lot simpler. | <ul><li>Not compatible with Apple ARM.</li><li>Maintained by only one person</li></ul> |
10
+
| print statement | Great for small programs and simple problems but provides very limited information and requires recompiling to alter that information. We recommend spending the time to learn how to use a debugging tool such as the others in this list. | <ul></ul> |
Copy file name to clipboardExpand all lines: debugging/mdb.md
+24-12Lines changed: 24 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,50 +7,60 @@ Python >= 3.10
7
7
## Installation
8
8
9
9
Clone the repository
10
-
```
10
+
11
+
```sh
11
12
git clone https://github.com/TomMelt/mdb.git
12
13
cd mdb
13
14
```
14
15
15
16
Create a virtual Python virtual environment
16
-
```
17
+
18
+
```sh
17
19
python3 -m venv $HOME/mdb-venv
18
20
```
19
21
20
22
Activate the virtual environement
21
-
```
23
+
24
+
```sh
22
25
source$HOME/mdb-venv/bin/activate
23
26
```
24
27
25
28
Install mdb and the optional dependency with pip3
26
-
```
29
+
30
+
```sh
27
31
pip3 install .
28
32
pip3 install termgraph
29
33
```
30
34
31
35
## Notes
32
36
33
37
As part of the CONQUEST project. I (Connor Aird) tried using mdb on the UCL cluster, Myriad. I installed mdb following the above guide within an interactive session with the following modules loaded.
To install fortitude we can utilise the provided `pyproject.toml` by following the instructions in [the pre-commit install instructions](../README.md#pre-commit). The [quickstart page](https://fortitude.readthedocs.io/en/stable/#quickstart) for Fortitude details multiple other ways of installing the tool.
10
+
11
+
## Usage in this repo
12
+
13
+
This repo has been formatted with Fortitude. To check this repo with Fortitude, simply run the following from the root of this repository
The config file, [fortitude.toml](./fortitude.toml), we have provided in the above command contains our rules which alter the [default fortitude rules](https://fortitude.readthedocs.io/en/stable/rules/).
20
+
21
+
### pre-commit
22
+
23
+
We have also integrated Fortitude with pre-commit. To set this up, follow the [instructions on the main README.md](../README.md#pre-commit).
24
+
Once this is set up, if you then try and commit a poorly formatted Fortran file...
0 commit comments