-
Notifications
You must be signed in to change notification settings - Fork 30
Compile
FOODiE has been developed on GNU/Linux architecture. Other OS are not supported (and in general there is no best alternative to GNU/Linux :-).
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.
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.
Typing:
FoBiS.py build -lmodesthe 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.
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.
FoBiS.py build -mode shared-gnuFoBiS.py build -mode static-gnuFoBiS.py build -mode shared-gnu-debugFoBiS.py build -mode static-gnu-debugThe Test_Driver directory is created. The compiled objects and mod files are placed inside this directory, as well as the linked program.
FoBiS.py build -mode test-driver-gnuFoBiS.py build -mode test-driver-gnu-debugTyping:
FoBiS.py rule -lsthe 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.
Bad choice :-)