README.md 4.94 KB
Newer Older
1 2 3 4
# README #

### What is this repository for? ###

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
5 6
Mostly Fortran implementation of https://link.springer.com/chapter/10.1007/978-3-642-40395-8_12 and
https://link.springer.com/chapter/10.1007/978-3-319-14612-6_7 as well as related algorithms.
7

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
8
### Dependencies and Requirements ###
9

10 11
* Necessary Tools

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
12
- A fortran compiler whith support for the 2018 standard.
13

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
14 15 16
  Development is done with [gfortran](https://gcc.gnu.org/wiki/GFortran) (usually the latest stable
  release). Compilation is done with Fortran 2018 standard flag. Fortran 2008 is probably enough,
  though.
17 18 19

- fypp <https://github.com/aradi/fypp> :

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
20 21
  [fypp](https://github.com/aradi/fypp) is a preprocessor for Fortran files. It is used to generate
  the code for various types of precisions. It can easily be installed through python pip.
22

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
23 24 25
  ```
  pip install fypp
  ```
26 27 28

  Version 2.1 should work

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
29 30 31
- cmake <https://cmake.org/> :

  [cmake](https://cmake.org/) is used to build the software.
32 33 34

  Version 3.15 should work.

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
35
- vcpkg <https://vcpkg.readthedocs.io/en/latest/>
36 37

  The code has several external dependencies which can easily be installed
Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
38 39 40
  with [vcpkg](https://github.com/microsoft/vcpkg). Using other package managers might work as well
  if [cmake](https://cmake.org/) can find the dependencies. Development is done with the latest
  available package versions from [vcpkg](https://github.com/microsoft/vcpkg).
41 42 43

- ford <https://github.com/cmacmackin/ford> :

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
44 45
  The documentation is automatically extracted from the Fortran source code files with
  [ford](https://github.com/cmacmackin/ford). It can be installed with (python) pip.
46

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
47 48 49
  ```
  pip install ford
  ```
50 51 52

  Version 6.0.0 should work

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
53 54
* Optional Tools

55 56 57 58
- gcovr <http://gcovr.com/> :

  Code coverage

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
59
- fortls <https://github.com/hansec/fortran-language-server> :
60

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
61 62 63 64
  [fortls](https://github.com/hansec/fortran-language-server) is a Fortran language server. Not
  really needed for compiling the code but very helpful for working with the code.
  [fortls](https://github.com/hansec/fortran-language-server) can be used e.g. in conjunction with
  [emacs](https://www.gnu.org/software/emacs/) and [VS Code](https://code.visualstudio.com/).
65 66 67

* Dependencies

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
68
- [fruit](https://sourceforge.net/projects/fortranxunit/)
69

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
70 71 72
  For unit testing. [fruit](https://sourceforge.net/projects/fortranxunit/) v.3.4.3 is integrated
  into the repository. fruit is released under a
  [BSD 3 clause License](https://opensource.org/licenses/BSD-3-Clause)
73

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
74
- [OpenGL](https://www.opengl.org/)/[freeGLUT](http://freeglut.sourceforge.net/)
75

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
76 77 78
  For showing the results. Some functions from [freeGLUT](http://freeglut.sourceforge.net/) are
  used, too. [freeGLUT](http://freeglut.sourceforge.net/) is released under the X-Consortium
  license.
79

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
80 81 82
- [OpenBLAS](https://www.openblas.net/) (or any other
  [BLAS](https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) and
  [LAPACK](https://en.wikipedia.org/wiki/LAPACK) library)
83 84 85 86

- f03gl <http://www-stone.ch.cam.ac.uk/pub/f03gl/index.xhtml> or
  <https://www.12000.org/my_notes/faq/fortran/index.htm>

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
87 88
  Code is included in libs/f03gl. [f03gl](http://www-stone.ch.cam.ac.uk/pub/f03gl/index.xhtml)
  is licensed [GPLv3](https://opensource.org/licenses/GPL-3.0). Requires freeglut or openglut
89 90 91

- libpixfiles <https://sourceforge.net/projects/libpixfiles/files/libpixfiles/libpixfiles-1.1.0b/> :

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
92 93 94 95
  The software can currently only read/write pnm (pbm, pgm, and ppm) files by using
  [pixfiles](https://sourceforge.net/projects/libpixfiles/files/libpixfiles/libpixfiles-1.1.0b/).
  Code is included in libs/pixfiles. Downloaded version 1.1.0b on 2017-07-13. Licensed
  [LGPLv3](https://opensource.org/licenses/lgpl-license)
96 97 98

- suitesparse <http://faculty.cse.tamu.edu/davis/suitesparse.html> :

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
99
  UMFPACK is used to solve the occurring linear systems. Any recent version should work.
100

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
101 102
  Licensed [BSD 3 clause License](https://opensource.org/licenses/BSD-3-Clause),
  [(L)GPLv2.1 or later](https://opensource.org/licenses/lgpl-license)
103 104 105

- option_parser <http://users.telenet.be/tuinbels/fortran/m_option_parser.html>

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
106 107 108 109
  option_parser is integrated into the repository in libs/m_option_parser. It is used to parse the
  command line parameters for the command line programs.

  Licensed under [BSD 3 clause License](https://opensource.org/licenses/BSD-3-Clause).
110

111
* Summary of set up
112

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
113 114 115 116 117
- install vcpkg
- install all dependencies with vcpkg (openBLAS, suitesparse, freeGLUT). freeGLUT might require
  additional packages on your system that you should install as well.
- install fypp and ford. This step requires python and pip installed on your system.
- checkout code from [gitlab](https://gitlab.com/hoeltgman/fortran-next).
118 119
- go to root folder of repository and enter

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
120 121 122 123 124
```
mkdir build
cmake ../ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=DEBUG
cmake --build .
```
125

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
126
- The unit tests can be run from bin/tests/ with
127

Laurent Hoeltgen's avatar
Laurent Hoeltgen committed
128 129 130
```
ctest --progress -VV -C Debug
```
131 132 133

### Who do I talk to? ###

134
* Laurent Hoeltgen <contact@laurenthoeltgen.name>