Skip to content
Stefano Zaghi edited this page Aug 13, 2015 · 4 revisions

FOODiE has been developed on GNU/Linux architecture. Other OS are not supported (and in general there is no best alternative to GNU/Linux :-).

Compiler Support

Compiler

Compiler

Compiler

Compiler

Compiler

Compiler

FOODiE is based on many Fortran modules, all the sources placed inside src/lib. The most easy way to compile FOODiE is to use FoBiS.py within the provided fobos file.

Consequently, it is strongly encouraged to install FoBiS.py.

Compiling by means of FoBiS.py

FoBiS.py is a KISS tool for automatic building of modern Fortran projects. Providing very few options, FoBiS.py is able to build almost automatically complex Fortran projects with cumbersome inter-modules dependency. This removes the necessity to write complex makefile. Moreover, providing a very simple options file (in the FoBiS.py nomenclature indicated as fobos file) FoBiS.py can substitute the (ab)use of makefile for other project stuffs (build documentations, make project archive, etc...). FOODiE is shipped with a fobos file that can build the library in both static and shared forms and also build the Test_Driver program. The provided fobos file has several building modes.

Listing fobos building modes

Typing:

FoBiS.py build -lmodes

the following message should be printed:

The fobos file defines the following modes:
 - "shared-gnu"
  - "static-gnu"
  - "test-driver-gnu"
  - "shared-gnu-debug"
  - "static-gnu-debug"
  - "test-driver-gnu-debug"
  - "shared-intel"
  - "static-intel"
  - "test-driver-intel"
  - "shared-intel-debug"
  - "static-intel-debug"
  - "test-driver-intel-debug"

The modes should be self-explicative: shared, static and test-driver are the modes for building (in realese, optimized form) the shared and static versions of the library and the Test Driver program, respectively. The other 3 modes are the same, but in debug form instead of release one. -gnu use the GNU gfortran compiler while -intel the Intel one.

Building the library

The shared or static directories are created accordingly to the form of the library built. The compiled objects and mod files are placed inside this directory, as well as the linked library.

Release shared library
FoBiS.py build -mode shared-gnu
Release static library
FoBiS.py build -mode static-gnu
Debug shared library
FoBiS.py build -mode shared-gnu-debug
Debug static library
FoBiS.py build -mode static-gnu-debug

Building the Test Driver program

The Test_Driver directory is created. The compiled objects and mod files are placed inside this directory, as well as the linked program.

Release test driver program
FoBiS.py build -mode test-driver-gnu
Debug test driver program
FoBiS.py build -mode test-driver-gnu-debug

Listing fobos rules

Typing:

FoBiS.py rule -ls

the following message should be printed:

The fobos file defines the following rules:
  - "makedoc" Rule for building documentation from source files
       Command => rm -rf doc/html/*
       Command => ford doc/main_page.md
       Command => cp -r doc/html/publish/* doc/html/
  - "makecoverage" Rule for performing coverage analysis
       Command => FoBiS.py clean -mode tests-gnu
       Command => FoBiS.py build -mode tests-gnu -coverage
       Command => ./tests/lorenz
       Command => gcov -o tests/obj/ src/lib/foodie*.f90
  - "deldoc" Rule for deleting documentation
       Command => rm -rf doc/html/*
  - "maketar" Rule for making tar archive of the project
       Command => tar -czf FOODiE.tar.gz *

The rules should be self-explicative.

Compiling without FoBiS.py

Bad choice :-)

Clone this wiki locally