Skip to content

Commit

Permalink
Deploying to gh-pages from @ 3805c70 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Fortran committed Apr 7, 2024
0 parents commit 3a82fef
Show file tree
Hide file tree
Showing 1,843 changed files with 570,943 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
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 added .doctrees/design/index.doctree
Binary file not shown.
Binary file added .doctrees/design/logo.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/how-to/compute-pi-openmp.doctree
Binary file not shown.
Binary file added .doctrees/how-to/index.doctree
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/install/index.doctree
Binary file not shown.
Binary file added .doctrees/news.doctree
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 added .doctrees/registry/index.doctree
Binary file not shown.
Binary file added .doctrees/registry/naming.doctree
Binary file not shown.
Binary file added .doctrees/registry/publish.doctree
Binary file not shown.
Binary file added .doctrees/registry/settings.doctree
Binary file not shown.
Binary file added .doctrees/spec/index.doctree
Binary file not shown.
Binary file added .doctrees/spec/manifest.doctree
Binary file not shown.
Binary file added .doctrees/spec/metapackages.doctree
Binary file not shown.
Binary file added .doctrees/tutorial/dependencies.doctree
Binary file not shown.
Binary file added .doctrees/tutorial/hello-fpm.doctree
Binary file not shown.
Binary file added .doctrees/tutorial/index.doctree
Binary file not shown.
Binary file added .doctrees/tutorial/plugins.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fpm.fortran-lang.org
65 changes: 65 additions & 0 deletions _images/fpm-logo-color.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions _images/fpm-logo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions _images/fpm-logo-mono.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions _images/fpm-logo-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions _sources/design/index.md.txt
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
:::
50 changes: 50 additions & 0 deletions _sources/design/logo.md.txt
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%
```
::::
:::::
51 changes: 51 additions & 0 deletions _sources/how-to/compute-pi-openmp.md.txt
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
```
Loading

0 comments on commit 3a82fef

Please sign in to comment.