Skip to content
Chris Coutinho edited this page Oct 21, 2016 · 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, the library sources are placed inside src/lib. The most easy way to compile FOODIE is to use FoBiS.py within the provided fobos file. However, a legacy Makefile is also provided.

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:
  - "foodie-static-opencoarrays-gnu" Build FOODIE library in static release mode with OpenCoarrays-GNU gfortran
  - "foodie-static-opencoarrays-gnu-debug" Build FOODIE library in static release mode with OpenCoarrays-GNU gfortran
  - "foodie-static-gnu" Build FOODIE library in static release mode with GNU gfortran
  - "foodie-static-gnu-debug" Build FOODIE library in static debug mode with GNU gfortran
  - "foodie-shared-gnu" Build FOODIE library in shared release mode with GNU gfortran
  - "foodie-shared-gnu-debug" Build FOODIE library in shared debug mode with GNU gfortran
  - "foodie-static-intel" Build FOODIE library in static release mode with Intel Fortran
  - "foodie-static-intel-debug" Build FOODIE library in static debug mode with Intel Fortran
  - "foodie-shared-intel" Build FOODIE library in shared release mode with Intel Fortran
  - "foodie-shared-intel-debug" Build FOODIE library in shared debug mode with Intel Fortran
  - "foodie-static-gnu-coverage" Build FOODIE library in static release coverage mode with GNU gfortran
  - "foodie-static-gnu-pure" Build FOODIE library in static release mode with GNU gfortran
  - "foodie-static-gnu-debug-pure" Build FOODIE library in static debug mode with GNU gfortran
  - "foodie-static-gnu-coverage-pure" Build FOODIE library in static release coverage mode with GNU gfortran
  - "foodie-static-intel-pure" Build FOODIE library in static release mode with Intel Fortran
  - "foodie-static-intel-debug-pure" Build FOODIE library in static debug mode with Intel Fortran

The modes should be self-explanatory: shared, static and tests are the modes for building (in realese, optimized form) the shared and static versions of the library and the test programs, 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 tests

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

Release tests
FoBiS.py build -mode tests-gnu
Debug tests
FoBiS.py build -mode tests-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/burgers -s all
       Command => ./tests/euler-1D -s all
       Command => ./tests/lorenz -s all
       Command => ./tests/oscillation -s all
       Command => gcov -o tests/obj/ src/lib/foodie*.f90
  - "coverage-analysis" Rule for performing coverage analysis and saving reports in markdown
       Command => FoBiS.py clean -mode tests-gnu
       Command => FoBiS.py build -mode tests-gnu -coverage
       Command => ./tests/burgers -s all
       Command => ./tests/euler-1D -s all
       Command => ./tests/lorenz -s all
       Command => ./tests/oscillation -s all
       Command => gcov -o tests/obj/ src/lib/foodie*.f90
       Command => FoBiS.py rule -gcov_analyzer wiki/ Coverage-Analysis
       Command => rm -f *.gcov
  - "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 :-)

You can use the provide Makefile which defines the following rules:

  • foodie: build only the library;
  • all: alias for tests;
  • tests: build all test programs, thus also the library;
  • burgers: build Burgers test program;
  • lorenz: build Lorenz test program;
  • oscillation: build Oscillation test program;
  • clean: clean compiled objects;

Building the library

make foodie

Building the tests

make all
Clone this wiki locally