The basicmod library 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, ...
The prerequisites are:
- The program make (for Windows it can be found as mingw32-make in the MinGW distribution).
- A Fortran 2003 compiler. At the present time, only the GNU Fortran compiler, gfortran, and the Intel Fortran compiler, ifort, are supported.
After install the prerequisites:
- Go to the basicmod webpage.
- Download the compressed file and uncompress it in the installation folder.
- Open a terminal in Linux or Mac OS X, or a Command Window in Windows, go to the installation folder and type:
make -f Makefile.<distribution>.<compiler>.<os>
where
- <distribution> can be static or dynamic.
- <compiler> can be gfortran or ifort.
- <os> can be linux, windows or osx. For Mac OS X, some Makefiles are provided, indicating which version they were tested for. Be aware that in Windows, MinGW distribution can use mingw32-make instead of make.
The library and the .mod files are automatically moved to folders lib/ and include/, respectively.
When compiling for several compilers, clean the object files:
make -f Makefile.<distribution>.<compiler>.<os> clean
To delete the library, the .mod and the object files, execute:
make -f Makefile.<distribution>.<compiler>.<os> cleanlib
Detailed help about thye basicmod library can be consulted in ./doc/index.html.
In order to test the library, follow these steps:
- Open a terminal in Linux or Mac OS X, or a Command Window in Windows, go to the folder test/ and type:
make -f Makefile.<distribution>.<compiler>.<os>
where <distribution>, <compiler> and <os> have the meaning given in the section above.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path-to-lib>
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 version 4.6.1 and below.
Copyright (C) 2010-2018 Universidade de Santiago de Compostela
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.