-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 3805c70 🚀
- Loading branch information
Fortran
committed
Apr 7, 2024
0 parents
commit 3a82fef
Showing
1,843 changed files
with
570,943 additions
and
0 deletions.
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,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 9f8cccb6bf6618426dc588b623c93f3c | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
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 @@ | ||
fpm.fortran-lang.org |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,17 @@ | ||
(design)= | ||
|
||
# Design documents | ||
|
||
:::{note} | ||
This section contains the resources around the design of the Fortran Package Manager (fpm). | ||
::: | ||
|
||
Fortran Package Manager (fpm) is a package manager and build system for Fortran. | ||
Its key goal is to improve the user experience of Fortran programmers. | ||
It does so by making it easier to build your Fortran program or library, run the executables, tests, and examples, and distribute it as a dependency to other Fortran projects. | ||
Fpm's user interface is modeled after [Rust's Cargo](https://doc.rust-lang.org/cargo/). | ||
Its long term vision is to nurture and grow the ecosystem of modern Fortran applications and libraries. | ||
|
||
:::{toctree} | ||
logo | ||
::: |
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,50 @@ | ||
# The fpm logo | ||
|
||
:::{note} | ||
The fpm logo was developed by the Fortran community in [fpm#380](https://github.com/fortran-lang/fpm/discussions/380) and contributed by [@1984logo](https://github.com/1984logo). | ||
::: | ||
|
||
The logo for the Fortran package manager (fpm) represents a gift box with a bow forming the letter F. | ||
For the monochromatic version the color of the Fortran logo {bdg-primary-line}`#734f96` is used. | ||
The color version additionally uses lighter and darker variants of the base color. | ||
While both variants are supposed to be visible on dark background, the logo can be produced in light color or as outline to be better visible when used on dark or black backgrounds. | ||
|
||
:::::{grid} 2 | ||
:gutter: 3 | ||
|
||
::::{grid-item-card} | ||
:class-card: sd-rounded-0 | ||
:text-align: center | ||
:shadow: none | ||
```{image} ../_static/fpm-logo-color.svg | ||
:scale: 30% | ||
``` | ||
:::: | ||
|
||
::::{grid-item-card} | ||
:class-card: sd-rounded-0 | ||
:text-align: center | ||
:shadow: none | ||
```{image} ../_static/fpm-logo-mono.svg | ||
:scale: 30% | ||
``` | ||
:::: | ||
|
||
::::{grid-item-card} | ||
:class-card: sd-bg-info sd-rounded-0 | ||
:text-align: center | ||
:shadow: none | ||
```{image} ../_static/fpm-logo-light.svg | ||
:scale: 30% | ||
``` | ||
:::: | ||
|
||
::::{grid-item-card} | ||
:class-card: sd-bg-info sd-rounded-0 | ||
:text-align: center | ||
:shadow: none | ||
```{image} ../_static/fpm-logo-outline.svg | ||
:scale: 30% | ||
``` | ||
:::: | ||
::::: |
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,51 @@ | ||
# Computing PI with OpenMP | ||
|
||
This is a simple example of how to use OpenMP with fpm. | ||
It is an adapted version of the OpenMP example that can be found | ||
[here](https://github.com/gjbex/Fortran-MOOC/blob/master/source_code/computing_pi/compute_pi_omp.f90) under a | ||
[CC-BY-4.0](https://github.com/gjbex/Fortran-MOOC/blob/master/LICENSE) license. | ||
|
||
The code approximates the value of PI by performing parallelized numerical | ||
integration over a quarter of the unit circle. | ||
The code is structured as follows: | ||
|
||
```{literalinclude} ../../src/how-to/compute-pi-openmp/app/main.f90 | ||
:language: fortran | ||
:caption: app/main.f90 | ||
``` | ||
|
||
## Using OpenMP as a dependency | ||
|
||
To use OpenMP in your project, you need to add the `openmp` dependency to your `fpm.toml` file: | ||
|
||
```{literalinclude} ../../src/how-to/compute-pi-openmp/fpm.toml | ||
:language: toml | ||
:caption: fpm.toml | ||
:emphasize-lines: 4-5 | ||
``` | ||
|
||
OpenMP is a _built-in dependency_ (i.e. metapackage), which means the above | ||
syntax needs to be used. To find out more about metapackages, see [](../spec/metapackages). | ||
|
||
## Building and running the code | ||
|
||
To build and run the code, one can use the following commands: | ||
|
||
```{code-block} text | ||
❯ fpm run | ||
Project is up to date | ||
Iterations: 10000, PI: 3.141391477611324 | ||
Took: 0.092s, with absolute error: 2.0E-04 | ||
``` | ||
|
||
And increasing the number of iterations for the approximation while | ||
simultaneously enabling compiler optimizations with `--profile-release` | ||
|
||
```{code-block} text | ||
❯ fpm run --profile-release -- 1000000000 | ||
main.f90 done. | ||
compute-pi-openmp done. | ||
[100%] Project compiled successfully. | ||
Iterations: 1000000000, PI: 3.141592651589789 | ||
Took: 3.511s, with absolute error: 2.0E-09 | ||
``` |
Oops, something went wrong.