Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
217 changes: 115 additions & 102 deletions _data/learning.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,115 @@
# Categories group mini-books on the 'Learn' landing page
#
# 'fa-icon' refers to the font-awesome icon to display
# next to the category on the landing page
#
categories:
- name: Getting started
fa-icon: fas fa-cubes
# - name: Advanced programming methods
# fa-icon: fas fa-laptop-code



# Mini-books are single-page or multi-page tutorials
#
# 'link' refers to the 'permalink' field of the corresponding page
#
books:
- title: Quickstart Fortran Tutorial
description: An introduction to the Fortran syntax and its capabilities
category: Getting started
link: /learn/quickstart
pages:
- link: /learn/quickstart/hello_world
- link: /learn/quickstart/variables
- link: /learn/quickstart/arrays_strings
- link: /learn/quickstart/operators_control_flow
- link: /learn/quickstart/organising_code



# Web links listed at the bottom of the 'Learn' landing page
#
reference-links:
- name: Fortran wiki
url: http://fortranwiki.org/
description: A rich collection of Fortran articles and resources in an editable wiki format

- name: "Fortran 2018 Standard Interpretation Document"
url: https://j3-fortran.org/doc/year/18/18-007r1.pdf
description: "J3/18-007r1 F2018, specification of the base Fortran 2018 language"

- name: "J3 Fortran Proposals"
url: https://github.com/j3-fortran/fortran_proposals
description: a repository for community collaboration on proposals for the Fortran Standards Committee

- name: "J3: US Fortran Standards Committee"
url: https://j3-fortran.org/
description: J3 is the US National Body for the international Fortran standards committee

- name: "WG5: International Fortran Standards Committe"
url: https://wg5-fortran.org/
description:

- name: "Scivision Fortran 2018 Examples"
url: https://github.com/scivision/fortran2018-examples
description: A github repository containing code samples for various Fortran 2018 features




# Print books listed at the bottom of the 'Learn' landing page
#
reference-books:
- author: Metcalf, M., Reid, J. and Cohen M.
year: 2018
title: Modern Fortran Explained
url: https://global.oup.com/academic/product/modern-fortran-explained-9780198811893
edition: 5th ed
location: Oxford, UK
publisher: Oxford Universtiy Press

- author: Curcic, M.
year: 2020
title: "Modern Fortran: Building Efficient Parallel Applications"
url: https://www.manning.com/books/modern-fortran
edition: 1st ed
location: Shelter Island, NY
publisher: Manning Publications

- author: Markus, A.
year: 2012
title: "Modern Fortran in Practice"
url: https://www.cambridge.org/core/books/modern-fortran-in-practice/BC5BD23B2E478B4D457C5D6265BA9363
edition: 1st ed
location: Cambridge, UK
publisher: Cambridge University Press

- author: Chivers, I. and Sleightholme, J.
year: 2018
title: Introduction to Programming with Fortran
url: https://doi.org/10.1007/978-3-319-75502-1
edition: 4th ed
publisher: Springer International Publishing

- author: Chapman S. J.
year: 2018
title: Fortran for Scientists and Engineers
url: https://www.mheducation.com/highered/product/fortran-scientists-engineers-chapman/M9780073385891.html
edition: 4th ed
location: New York
publisher: McGraw-Hill Education
# Categories group mini-books on the 'Learn' landing page
#
# 'fa-icon' refers to the font-awesome icon to display
# next to the category on the landing page
#
categories:
- name: Getting started
fa-icon: fas fa-cubes
# - name: Advanced programming methods
# fa-icon: fas fa-laptop-code



# Mini-books are single-page or multi-page tutorials
#
# 'link' refers to the 'permalink' field of the corresponding page
#
books:
- title: Quickstart Fortran Tutorial
description: An introduction to the Fortran syntax and its capabilities
category: Getting started
link: /learn/quickstart
pages:
- link: /learn/quickstart/hello_world
- link: /learn/quickstart/variables
- link: /learn/quickstart/arrays_strings
- link: /learn/quickstart/operators_control_flow
- link: /learn/quickstart/organising_code

- title: Building programs
description: How to use the compiler to build an executable program
category: Getting started
link: /learn/building_programs
pages:
- link: /learn/building_programs/compiling_source
- link: /learn/building_programs/linking_pieces
- link: /learn/building_programs/runtime_libraries
- link: /learn/building_programs/include_files
- link: /learn/building_programs/managing_libraries
- link: /learn/building_programs/build_tools
- link: /learn/building_programs/distributing



# Web links listed at the bottom of the 'Learn' landing page
#
reference-links:
- name: Fortran wiki
url: http://fortranwiki.org/
description: A rich collection of Fortran articles and resources in an editable wiki format

- name: "Fortran 2018 Standard Interpretation Document"
url: https://j3-fortran.org/doc/year/18/18-007r1.pdf
description: "J3/18-007r1 F2018, specification of the base Fortran 2018 language"

- name: "J3 Fortran Proposals"
url: https://github.com/j3-fortran/fortran_proposals
description: a repository for community collaboration on proposals for the Fortran Standards Committee

- name: "J3: US Fortran Standards Committee"
url: https://j3-fortran.org/
description: J3 is the US National Body for the international Fortran standards committee

- name: "WG5: International Fortran Standards Committe"
url: https://wg5-fortran.org/
description:

- name: "Scivision Fortran 2018 Examples"
url: https://github.com/scivision/fortran2018-examples
description: A github repository containing code samples for various Fortran 2018 features




# Print books listed at the bottom of the 'Learn' landing page
#
reference-books:
- author: Metcalf, M., Reid, J. and Cohen M.
year: 2018
title: Modern Fortran Explained
url: https://global.oup.com/academic/product/modern-fortran-explained-9780198811893
edition: 5th ed
location: Oxford, UK
publisher: Oxford Universtiy Press

- author: Curcic, M.
year: 2020
title: "Modern Fortran: Building Efficient Parallel Applications"
url: https://www.manning.com/books/modern-fortran
edition: 1st ed
location: Shelter Island, NY
publisher: Manning Publications

- author: Markus, A.
year: 2012
title: "Modern Fortran in Practice"
url: https://www.cambridge.org/core/books/modern-fortran-in-practice/BC5BD23B2E478B4D457C5D6265BA9363
edition: 1st ed
location: Cambridge, UK
publisher: Cambridge University Press

- author: Chivers, I. and Sleightholme, J.
year: 2018
title: Introduction to Programming with Fortran
url: https://doi.org/10.1007/978-3-319-75502-1
edition: 4th ed
publisher: Springer International Publishing

- author: Chapman S. J.
year: 2018
title: Fortran for Scientists and Engineers
url: https://www.mheducation.com/highered/product/fortran-scientists-engineers-chapman/M9780073385891.html
edition: 4th ed
location: New York
publisher: McGraw-Hill Education
78 changes: 78 additions & 0 deletions learn/building_programs/build_tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
layout: book
title: Build tools
permalink: /learn/building_programs/build_tools
---

If this seems complicated, well, you are right and we are only
scratching the surface here. The complications arise because of
differences between platforms, differences between compilers/linkers and
because of differences in the way programs are set up. Fortunately,
there are many tools to help configure and maintain the build steps.
We will not try and catalogue them, but give instead a very limited
list of tools that you typically encounter:

* The `make` utility is a classical tool that uses instructions about
how the various components of a program depend on each other to
efficiently compile and link the program (or programs). It takes a
so-called `Makefile` that contains the dependencies.

Simply put:

If a program file is older than any of the libraries and object files
it depends on, the make utility knows it has to rebuild it and goes on
to look at the libraries and object files - are any out of date?

If an object file is older than the corresponding source file, the
make utility knows it has to compile the source file.

* Integrated development tools take care of many of the above details. A
popular tool on Windows is MicroSoft's Visual Studio, but others exist,
such as Eclipse (Photran) and Code::Blocks. They offer a graphical
user-interface, but are often very specific for the compiler and
platform.

* Maintenance tools like autotools and CMake can generate makefiles or
Visual Studio project files via a high-level description. They abstract
away from the compiler and platform specifics.

Here is a very simple example of a `Makefile` as used by the `make` utility,
just to give you an impression:

# Collect the macros at the beginning - easier to customise
FC = gfortran
LD = gfortran
FCOPTS = -c
LDOPTS = "-o "

EXE = .exe
OBJ = .o

all: tabulate$(EXE)

tabulate$(EXE) : tabulate$(OBJ) function$(OBJ)
{tab}$(LD) $(LDOPTS)tabulate$(EXE) tabulate.f90 function$(OBJ)

tabulate$(OBJ) : tabulate.f90 function.mod
{tab}$(FC) $(FCOPTS) tabulate.f90

function$(OBJ) : function.f90
{tab}$(FC) $(FCOPTS) function.f90

(A peculiarity of `make` is that in the input file, tab characters are used
in several places - here indicated as "{tab}" - as significant whitespace.)

When stored in a file "Makefile" and "{tab}" replaced by a tab character,
you can run it like:

```shell
$ make
```

(the name `Makefile` is the default, otherwise use the option `-f` to specify
a different file name). Now only change the file "tabulate.f90" and run it
again. You will see that only that file gets compiled again and then the
program is built. The file "function.f90" was not changed, so the object
file and the module intermediate file would remain unchanged, so there
is no need to recompile it.

Loading