Skip to content

Commit 2b9b58a

Browse files
authored
Merge pull request #26 from BerkeleyLab/program-termination
doc: update FORD docs and the README.md
2 parents 7e930c4 + 7ee1c49 commit 2b9b58a

File tree

3 files changed

+87
-10
lines changed

3 files changed

+87
-10
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Caffeine is a parallel runtime library that aims to support Fortran compilers wi
2525
`"--.__ __.--"'
2626
`""-------------""'
2727
```
28-
(Art from [ascii.co.uk].)
28+
Art from [ascii.co.uk].
2929

3030
Prerequisites
3131
-------------
@@ -36,12 +36,11 @@ Caffeine leverages the following non-parallel features of Fortran to simplify th
3636
| The `iso_c_binding` module | Fortran 2003 |
3737
| The `contiguous` attribute [1] | Fortran 2008 |
3838
| `do concurrent` [2] | Fortran 2008 |
39-
| The ISO_Fortran_binding.h C header file | Fortran 2018 |
39+
| The `ISO_Fortran_binding.h` C header file | Fortran 2018 |
4040
| Assumed-type dummy arguments: `type(*)`, | Fortran 2018 |
4141
| Assumed-rank dummy arguments: `array(..)`,| Fortran 2018 |
4242

4343
[1] This requirement simplifies development but might be removed in a future release.
44-
4544
[2] This feature is used to support only `co_reduce` and might become optional in a future release.
4645

4746
Download, build, and run an example
@@ -60,16 +59,17 @@ Run tests
6059
./build/run-fpm.sh test
6160
```
6261

63-
Generate documentation
64-
----------------------
65-
Generate HTML documentation for Caffeine using [ford] as follows:
62+
Documentation
63+
-------------
64+
One of our continous integration (CI) scripts generates up-to-date Caffeine documentation using [ford]. The Ci script also deploys the generated documentation to [our GitHub Pages site].
65+
Alternatively, generate HTML documentation locally using [ford] as follows:
6666
```
6767
ford doc-generator.md
6868
```
6969
Open `doc/html/index.htmtl` in a web browser.
7070

71-
Support and Development
72-
-----------------------
71+
Funding
72+
-------
7373
The Computer Languages and Systems Software ([CLaSS]) Group at [Berkeley Lab] leads Caffeine development under funding from the Exascale Computing Project ([ECP]).
7474

7575
License
@@ -83,3 +83,4 @@ See [LICENSE.txt](LICENSE.txt) for usage terms and conditions.
8383
[ford]: https://github.com/Fortran-FOSS-Programmers/ford
8484
[MPI]: https://www.mpi-forum.org
8585
[ascii.co.uk]: https://ascii.co.uk/art/cup
86+
[site]: https://berkeleylab.github.io/caffeine

doc-generator.md

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
project: Caffeine library
3-
summary: A parallel runtime library supporting standard Fortran features.
2+
project: Caffeine
3+
summary: Library functions and derived types implementing the parallel features of Fortran 2018.
44
src_dir: src/
55
exclude_dir: doc
66
output_dir: doc/html
@@ -12,4 +12,69 @@ display: public
1212
private
1313
source: true
1414
graph: true
15+
css: ford-docs.css
1516
md_extensions: markdown.extensions.toc
17+
coloured_edges: true
18+
sort: permission-alpha
19+
extra_mods: iso_fortran_env:https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fFORTRAN_005fENV.html
20+
iso_c_binding:https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fC_005fBINDING.html#ISO_005fC_005fBINDING
21+
lower: true
22+
print_creation_date: true
23+
creation_date: %Y-%m-%d %H:%M %z
24+
project_github: https://go.lbl.gov/caffeine
25+
project_download: https://github.com/berkeleylab/caffeine/releases
26+
author: Lawrence Berkeley National Laboratory
27+
28+
author_description: A U.S. Department of Energy National Laboratory Managed by the University of California
29+
author_pic: https://avatars.githubusercontent.com/u/18706005?s=200&v=4
30+
github: https://github.com/berkeleylab
31+
website: https://go.lbl.gov/class
32+
33+
[TOC]
34+
35+
@warning Caffeine is early-stage developmental software with evolving interfaces and functionality.
36+
37+
Documentation
38+
=============
39+
40+
Welcome to the Caffeine documentation.
41+
[FORD] generates this documentation from inline comments, static analysis, and Markdown files.
42+
The target audience for Caffeine is Fortran compiler developers.
43+
With a fully Caffeinated compiler, Fortran programmers can produce parallel executable files from standard Fortran with no need to directly reference Caffeine or any lower-level communication software.
44+
45+
Philosophy and Motivations
46+
--------------------------
47+
* Write as much of Caffeine as possible in Fortran:
48+
- Writing the runtime library in the language of the users increases the likelihood of community contributions.
49+
- Writing the runtime library in Fortran obviates the need to directly manipulate compiler descriptors throughout much of Caffeine and allows Caffeine's underlying C layer to receive the Fortran-standard `CFI_cdesc_t` desriptor, which imwill make it easier to support multiple compilers.
50+
- Writing most of Caffeine in Fortran offers the potential exploiting Fortran's rich array syntax, concurrent loop iterations (`do concurrent`), `pure` procedures and related features. Currently, these play a role only in one place: C callbacks to user-provided, `pure` functions that can be invoked inside a `do concurrent` block during the execution of `co_reduce`.
51+
* Define an interface that remains agnostic about the back-end communication library:
52+
- Once multiple back ends are supported, Fortran developers would not have to rewrite or even recompile their programs in order to change back ends. Switching from GASNet-EX to MPI, for example, could become a link-time decision.
53+
54+
Organization
55+
------------
56+
The tree below depicts a skeletal overview of Caffeine's directory structure.
57+
```
58+
build/ - build directory created by running ./install.sh
59+
|-- run-fpm.sh - shell script for rebuilding Caffeine or running examples or tests
60+
|-- * - temporary build files
61+
example/
62+
|-- hello.f90 - a Caffeinated "Hello, world!" program
63+
|-- support-test/ - programs invoked by the test suite
64+
src/
65+
|-- caffeine_m.f90 - the Big Kahuna: one module that exports all Caffeine functionality
66+
|-- caffeine/
67+
   |-- *_m.f90 - modules containing procedure interface bodies
68+
   |-- *_s.f90 - submodules containing procedure definitions
69+
   |-- *.c - thin C functions wrapping networking middleware
70+
   |-- *.h - corresponding C header files
71+
   |-- *_h_m.f90 - a Fortran translation of a C header file
72+
   |-- collective_subroutines/
73+
      |-- co_*_s.f90 - submodules containing procedure definitions
74+
test/
75+
|-- main.f90 - test suite driver created by make_vegetable_driver
76+
|-- *_test.f90 - unit tests
77+
78+
```
79+
80+
[FORD]: https://github.com/Fortran-FOSS-Programmers/ford#readme

ford-docs.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
table {
2+
border-collapse: collapse;
3+
}
4+
5+
th, td {
6+
padding: 8px;
7+
}
8+
9+
tr:nth-child(even) {background-color: #f2f2f2;}
10+
11+
#responsive-image { width: 100%; height: auto; }

0 commit comments

Comments
 (0)