-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation #8
Draft
RMeli
wants to merge
45
commits into
eth-cscs:main
Choose a base branch
from
RMeli:docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
5ae4353
ignore docs
RMeli bb5766d
name change
RMeli 22371e7
github action
RMeli d365d22
test
RMeli d7708cb
test
RMeli 07f3255
update version
RMeli 5ad29a3
restrict deployment
RMeli ca53767
only main
RMeli 706cb33
update
RMeli 59b8539
docs as pacs poster
RMeli cfae644
optimal parameters
RMeli b37b49e
remove docs and change default
RMeli 78b441b
add license
RMeli fc145a9
remove optimal parameters section
RMeli 6ca3c19
fix typo
RMeli 27ca0cb
remove author
RMeli a95ff5f
ghpages action test
RMeli 074b85f
pr
RMeli 2ce9055
fix syntax error
RMeli c1a6732
test on fork
RMeli b4e29dd
remove if
RMeli 7aa424d
add checkout step
RMeli 9622db6
fuse steps
RMeli 1a9d343
rename action
RMeli 925fde7
add documentation file
RMeli 5bbef46
name change
RMeli b3df08b
restrict
RMeli fe949d9
add link
RMeli 7690a11
docs
RMeli bb32008
rm pr
RMeli bfc5e13
debug
RMeli b08eecb
test
RMeli 91b482e
add back build on prs
RMeli 953f1c6
Update DOCUMENTATION.md
RMeli 835344a
Update DOCUMENTATION.md
RMeli 923d052
add note instead of warning to parameter limitations
RMeli 47622d2
try to fix images
RMeli 73a7b69
additions
RMeli ef85f25
logo
RMeli 5cf4b1c
fix logos
RMeli f271986
add doc for factorized gen eig
RMeli 784e21f
differentiate doc in procedures page
RMeli 7a2a156
type
RMeli a92a779
latex
RMeli a8b92c6
latex eqs
RMeli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# | ||
# Distributed Linear Algebra with Future (DLAF) | ||
# | ||
# Copyright (c) 2018-2024, ETH Zurich | ||
# All rights reserved. | ||
# | ||
# Please, refer to the LICENSE file in the root directory. | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
|
||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- '**' # TODO: Remove when done testing! | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
# Pull requests to main trigger this workflow | ||
# However, the deployment is skipped (see check on github.ref) | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Configure | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install ford | ||
- name: Build (main) | ||
run: | | ||
python -m ford --output_dir ghpages DLA-Future-Fortran.md | ||
echo {{ github.repository }} | ||
- name: Publish (main) | ||
#if: "github.repository == 'eth-cscs/DLA-Future-Fortran' && github.ref == 'refs/heads/main'" | ||
if: "github.repository == 'RMeli/DLA-Future-Fortran'" | ||
Comment on lines
+41
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix before merging. |
||
run: | | ||
COMMIT_MSG=`git log -n 1 --pretty=format:%s` | ||
mv ghpages main | ||
git config user.name "Documentation CI Action" && git config user.email "[email protected]" | ||
git fetch --no-tags --depth=1 origin +refs/heads/docs-ghpages:refs/heads/docs-ghpages | ||
git symbolic-ref HEAD refs/heads/docs-ghpages && git reset | ||
git add main && git commit --allow-empty -m "Documentation: $COMMIT_MSG" && git push --set-upstream origin docs-ghpages | ||
- name: Publish (tag) | ||
if: "github.repository == 'eth-cscs/DLA-Future-Fortran' && startsWith(github.ref, 'refs/tags/v')" | ||
run: | | ||
TAG=${{ github.ref_name }} | ||
mv ghpages $TAG | ||
git config user.name "Documentation CI Action" && git config user.email "[email protected]" | ||
git fetch --no-tags --depth=1 origin +refs/heads/docs-ghpages:refs/heads/docs-ghpages | ||
git symbolic-ref HEAD refs/heads/docs-ghpages && git reset | ||
git add $TAG && git commit --allow-empty -m "Documentation: add doccumentation for $TAG" && git push --set-upstream origin docs-ghpages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,6 @@ build-* | |
*~ | ||
*.swp | ||
*.orig | ||
|
||
# Documentation | ||
documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
--- | ||
project: DLA-Future-Fortran | ||
summary: Fortan interface for DLA-Future | ||
project_github: https://github.com/eth-cscs/DLA-Future-Fortran | ||
project_download: https://github.com/eth-cscs/DLA-Future-Fortran/releases | ||
print_creation_date: true | ||
output_dir: documentation | ||
media_dir: docs | ||
doc_license: bsd | ||
--- | ||
|
||
[DLA-Future-Fortran] is a [Fortran] interface for [DLA-Future], a task-based linear algebra library providing GPU-enabled distributed eigensolver. [DLA-Future] is based on the [pika] library for concurrency and parallelism, and supports both [Nvidia] and [AMD] GPUs. | ||
|
||
## Usage | ||
|
||
### Initialization and finalization | ||
|
||
Before calling any [DLA-Future] routine, the library (and the underlying [pika] runtime) need to be initialized: | ||
|
||
```Fortran | ||
call dlaf_initialize() | ||
``` | ||
|
||
[DLA-Future] should be finalized when it is no longer needed: | ||
|
||
```Fortran | ||
call dlaf_finalize() | ||
``` | ||
|
||
## Grid initialization | ||
|
||
[DLA-Future] needs to know how a matrix is distributed. A [DLA-Future] grid can be created directly on top of a [BLACS] grid, using the corresponding [BLACS] context: | ||
|
||
```Fortran | ||
! blacs_context is an existing BLACS context | ||
call dlaf_create_grid_from_blacs(blacs_context) | ||
``` | ||
|
||
When a grid is no longer needed, it can be freed: | ||
|
||
```Fortran | ||
! blacs_context is an existing BLACS context | ||
call dlaf_free_grid(blacs_context) | ||
``` | ||
|
||
### ScaLAPACK drop-in | ||
|
||
[DLA-Future-Fortran] can be used as a [ScaLAPACK] drop-in. [DLA-Future] takes a subset of [ScaLAPACK] arguments. For example, workspaces are managed internally in [DLA-Future]. | ||
|
||
#### Example: Hermitian generalized eigensolver | ||
|
||
The following is an example of how a code using [ScaLAPACK]'s hermitian generalized eigensolver can be adapted to use [DLA-Future] instead: | ||
|
||
```diff | ||
call mpi_init_thread(...) | ||
+call dlaf_initialize() | ||
call blacs_get(0, 0, blacs_context) | ||
call blacs_gridinit(blacs_context, ...) | ||
+call dlaf_create_grid_from_blacs(blacs_context) | ||
|
||
! ... | ||
|
||
-! Workspaces setup (work, rwork, iwork) | ||
|
||
-call pzheevd('V', 'L', n, a, 1, 1, desca, w, z, 1, 1, descz, work, lwork, rwork, lrwork, iwork, liwork, info) | ||
+call call dlaf_pzheevd('L', n, a, 1, 1, desca, w, z, 1, 1, descz, info) | ||
|
||
-! Workspaces cleanup (work, rwork, iwork) | ||
|
||
! ... | ||
|
||
+call dlaf_free_grid(blacs_context) | ||
call blacs_gridexit(blacs_context) | ||
+call dlaf_finalize() | ||
call mpi_finalize(...) | ||
``` | ||
|
||
## Citation | ||
|
||
### DLA-Future Conference Paper | ||
|
||
If you are using [DLA-Future-Fortran], please cite the following conference paper in addition to the [DLA-Future-Fortran] and the [DLA-Future] repositories: | ||
|
||
``` | ||
@InProceedings{10.1007/978-3-031-61763-8_13, | ||
author="Solc{\`a}, Raffaele | ||
and Simberg, Mikael | ||
and Meli, Rocco | ||
and Invernizzi, Alberto | ||
and Reverdell, Auriane | ||
and Biddiscombe, John", | ||
editor="Diehl, Patrick | ||
and Schuchart, Joseph | ||
and Valero-Lara, Pedro | ||
and Bosilca, George", | ||
title="DLA-Future: A Task-Based Linear Algebra Library Which Provides a GPU-Enabled Distributed Eigensolver", | ||
booktitle="Asynchronous Many-Task Systems and Applications", | ||
year="2024", | ||
publisher="Springer Nature Switzerland", | ||
address="Cham", | ||
pages="135--141", | ||
isbn="978-3-031-61763-8" | ||
} | ||
``` | ||
|
||
## Acknowledgements | ||
|
||
The development of [DLA-Future-Fortran] is supported by the following organizations: | ||
|
||
* [CSCS]: Swiss National Supercomputing Center | ||
* [ETH Zurich]: Swiss Federal Institute of Technology Zurich | ||
* [PASC]: Platform for Advanced Scientific Computing | ||
|
||
![CSCS](|media|/images/logo-cscs.jpg){: style="text-align: center" height=75} | ||
![ETHZ](|media|/images/logo-eth.svg){: style="text-align: center" height=75} | ||
![PASC](|media|/images/logo-pasc.png){: style="text-align: center" height=75} | ||
|
||
[AMD]: https://www.amd.com/en.html | ||
[BLACS]: https://www.netlib.org/blacs/ | ||
[CSCS]: https://www.cscs.ch | ||
[DLA-Future-Fortran]: https://github.com/eth-cscs/DLA-Future-Fortran | ||
[DLA-Future]: https://github.com/eth-cscs/DLA-Future | ||
[ETH Zurich]: https://ethz.ch/en.html | ||
[Fortran]: https://github.com/eth-cscs/DLA-Future | ||
[Nvidia]: https://www.nvidia.com/en-us/ | ||
[PASC]: https://www.pasc-ch.org/ | ||
[pika]: https://github.com/pika-org/pika | ||
[ScaLAPACK]: https://www.netlib.org/scalapack/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# DLA-Future-Fortran Documentation | ||
|
||
## Documentation | ||
|
||
* [main](https://eth-cscs.github.io/DLA-Future-Fortran/main/) | ||
|
||
## How to generate the documentation | ||
|
||
The Fortran code is documented using [FORD] (FORtran Documenter), an automatic documentation generator for modern Fortran projects. | ||
|
||
```bash | ||
python -m ford --output_dir documentation DLA-Future-Fortran.md | ||
``` | ||
|
||
## Documentation on GitHub | ||
|
||
The documentation is hosted on [GitHub Pages]. Documentation is generated automatically by the [GitHub Action] `.github/workflows/docs.yaml` | ||
for each version (`v*` tag) and for the `main` branch. | ||
|
||
The documentation is pushed by the [GitHub Action] to the `docs-ghpages` branch. This branch was manually created as an orphan branch with | ||
|
||
```bash | ||
git checkout --orphan docs-ghpages | ||
mkdir main && touch main/index.html | ||
git rm --cached -r . && git add main/index.html && git commit -m "empty docs" | ||
git push --set-upstream origin docs-ghpages | ||
``` | ||
|
||
[GitHub Pages]: https://pages.github.com | ||
[FORD]: https://forddocs.readthedocs.io/en/latest/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be removed before merging.