================================================================================
basicmod
================================================================================
Library basicmod contains Fortran modules to ease several programming tasks like:
error and warnings reports, work with sets, type conversions, array allocation,
shell calls, command argument management, XML and VTK input/output,...
REQUIREMENTS
--------------------------------------------------------------------------------
- A Fortran compiler: Intel ifort, gfortran (GNU/Linux, MinGW or Mingw-w64).
- GNU Make.
INSTALLATION
--------------------------------------------------------------------------------
Descompress file basicmod-<version>.tar.gz; the precompiled libraries are stored in the folders:
- "lib/", contains library basicmod for several OS and compilers in static and dynamic mode.
- "include/<compiler>.<os>/", contains *.mod files with the header of the library procedures for specific <compiler> and <os>.
USE
--------------------------------------------------------------------------------
To see examples for static and dynamic libraries, and depending on the <compiler> and <os>, see Makefiles
in folder test/.
COMPILATION
--------------------------------------------------------------------------------
If the precompiled libraries are not suitable for you, they can be compiled following these steps:
1. Choose the following parameters:
a. your operating system <os> (windows/linux, Mac OS ussually works as linux),
b. your <compiler> (ifort/gfortran/mingw/mingw-w64) and
c. the library <distribution> (static/dynamic).
2. Build the library file with the command:
In LINUX:
make -f Makefile.<distribution>.<compiler>.<os>
In WINDOWS with MinGW:
mingw32-make -f Makefile.<distribution>.<compiler>.<os>
The library file is automatically moved to lib/ and object/*.mod are moved to include/<compiler>.<os>/
TEST
--------------------------------------------------------------------------------
In order to test the library, follow these steps:
1. Go to test/
2. Choose the following parameters:
a. your operating system <os> (windows/linux, Mac OS ussually works as linux),
b. your <compiler> (ifort/gfortran/mingw/mingw-w64) and
c. the library <distribution> (static/dynamic).
3. Build the executable file:
In LINUX:
make -f Makefile.<distribution>.<compiler>.<os>
In WINDOWS with MinGW:
mingw32-make -f Makefile.<distribution>.<compiler>.<os>
4. When linking with dynamic libraries, include the path to folder lib/ in the variable LD_LIBRARY_PATH:
In LINUX:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path-to-lib>
In WINDOWS: with gfortran, add to environmental variable LD_LIBRARY_PATH the path <path-to-lib>;
specific instructions apply for ifort.
4. Execute the program test.
This code has been tested with the following configurations:
- Ubuntu 14.04, gfortran 4.8.4, make 3.81
- CentOS 6.5, ifort 14.0.3, make 3.81
- Windows 10, gfortran 5.3.0 (MinGW), make 3.82.90
- Windows 10, ifort 17.0.2, make 3.82.90
Errors have been reported with gfortran 4.6.1 and below.