Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,19 @@ jobs:
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- uses: actions/setup-python@v6
with:
python-version: '3.13'
python-version: '3.13'
cache: 'pip'
- name: Generate Ford docs
run: pip install -r requirements.txt; sudo apt install graphviz; ford ford-home.md
run: |
pip install -r requirements.txt
sudo apt install graphviz
ford ford-home.md
- name: Install Doxygen
run: |
sudo apt-get update
sudo apt-get install -y doxygen
- name: Run Doxygen to generate documentation
run: doxygen ./documentation/doxygen/Doxyfile
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
46 changes: 30 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
---
title: How to use this Repo
title: Developer Docs
---

# Fortran Tooling
<!-- Doxygen config
@page developer-docs Developer Docs
-->


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).

## src code
# src code

There are two src codes within this repository [mesh_generator](./src/mesh_generator/) and [poisson](./src/poisson/). These are designed to work together.

- `mesh_generator` generates a basic square 2D triangular mesh (see [mesh_generator.f90](./src/mesh_generator/mesh_generator.f90) for more details).
- `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).

## Building
# Building

A bash [build.sh](./build.sh) script is provided for building all the source code and tests found in this repository.
Optionally, the script can also install the project dependacies.
Expand All @@ -24,7 +27,7 @@ Note that using the CMake backend requires a local installation of pFUnit (see m
Alternatively, instructions for building the project without the script are provided below.
Instructions for installing pFUnit using the script are also provided.

### CMake
## CMake

>Note: the CMake contains some [pFUnit tests](./testing/pFUnit/) which require a local version of pFUnit to be built on your device.
It can be installed either via the provided build.sh script or by following the installation instruction in the [pFUnit repo](https://github.com/Goddard-Fortran-Ecosystem/pFUnit).
Expand All @@ -42,15 +45,15 @@ cmake --build build-cmake

This will produce executables for the two src codes, `fortran-tooling-mesh-generator` and `fortran-tooling-poisson`.

### FPM
## FPM

To build the project using FPM, from the root of the repo, run

```sh
fpm build
```

### pFUnit
## Building pFUnit

The [build.sh](./build.sh) scripts provides a wrapper for simplifying the installation of pFUint. To run the installer, execute

Expand All @@ -59,9 +62,9 @@ The [build.sh](./build.sh) scripts provides a wrapper for simplifying the instal
```
where `<PATH_TO_PFUNIT>` is the **absolute** path to the local where pFUnit will be installed. Optionally, adding the flag `--test-pfunit` will test the pFUnit installation.

## Running the src
# Running the src

### Mesh generator
## Mesh generator

If you have built using CMake, you can run the mesh generator by directly calling the executable

Expand All @@ -74,7 +77,7 @@ If you have built using FPM, you can also run the mesh generator via FPM
fpm run mesh_generator -- <box_size> <edge_size>
```

### Poisson solver
## Poisson solver
If you have built using CMake, you can also run the poisson solver by directly calling the executable
```sh
./build/fortran-tooling-poisson <path_to_mesh_file>
Expand All @@ -85,7 +88,7 @@ If you have built using FPM, you can also run the mesh generator via FPM
fpm run poisson -- <path_to_mesh_file>
```

## Running the tests
# Running the tests

If you have built using CMake, you can run the tests by running the following from within the `build-cmake` directory.

Expand All @@ -99,7 +102,7 @@ If you have built using FPM, you can run the tests by running the following from
fpm test
```

## pre-commit
# pre-commit

[pre-commit](https://pre-commit.com/) is utilised within this repo. pre-commit is a tool to help enforce formatting standards as early as possible.
pre-commit works by running a provided set of checks every time a `git commit` is attempted.
Expand All @@ -117,9 +120,9 @@ Then, from the root of the repo, you start using pre-commit by running
pre-commit install
```

## Documentation
# Generating documentation

### Ford
## Ford docs

To generate the Ford documentation locally run the command

Expand All @@ -132,5 +135,16 @@ This will create a folder `docs/ford-docs` within the root of the repo. Within `
information about how Ford is set up within this repo is provided in the generated
documentation at `Tools->Documentation->Ford`.

> Note: the name of the output directory for our docs, `ford-docs`, is defined in [ford-home.md](./ford-home.md) as the value
> for `output_dir`

## Doxygen docs

To generate the Doxygen documentation locally run the command

```sh
doxygen documentation/doxygen/Doxyfile
```

This will create a folder `docs/doxygen-docs` within the root of the repo. Within `docs/doxygen-docs` there will
be an `index.html` file. Open this file in a browser to view the generated dociumentation. Further information
about how Doxygen is set up within this repo is provided in the generated documentation at
`Tools->documentaion->Doxygen`.
17 changes: 12 additions & 5 deletions debugging/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@
title: Debugging
---

# Fortran debugging
<!-- Doxygen config
@page debugging Debugging
-->

## Candidate Tools

# Candidate Tools

| tool | description | Known issues |
| ---- | ----------- | ------------ |
| [GDB](https://www.sourceware.org/gdb/) | | <ul></ul> |
| [linaro DDT](https://www.linaroforge.com/linaroDdt/) | | <ul></ul> |
| [GDB](https://www.sourceware.org/gdb/) | | |
| [linaro DDT](https://www.linaroforge.com/linaroDdt/) | | |
| [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> |
| 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> |
| 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. | |

<!-- Doxygen config
**Subpages:** @subpage mdb
-->
7 changes: 6 additions & 1 deletion debugging/mdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
title: mdb
---

# [mdb](https://github.com/TomMelt/mdb)
<!-- Doxygen config
@page mdb mdb
@ingroup debugging
-->

[mdb](https://github.com/TomMelt/mdb) is a parallel debugger developed by [Thomas Meltzer](https://github.com/TomMelt)

## Prerequisite

Expand Down
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ _site
.jekyll-cache
.jekyll-metadata
vendor
ford-docs
doxygen-docs
Loading