• R/O
  • SSH

aotus: Resumen Repositorio

Repository for the aotus library is now located at https://github.com/apes-suite/aotus


Recent Commits RSS

Rev. Tiempo Autor Mensaje
6e1aee72017f 2023-06-21 00:57:46 Harald Klimach tip Updated include path for change Lua directory (5.4.6)
77e354c87dbf 2023-06-21 00:55:20 Harald Klimach Updated Lua from 5.4.4 to 5.4.6.
496a6434f1d3 2023-02-01 00:15:33 Harald Klimach Updated Lua to incorporate patches up to bug 9 for Lua 5.4.4
f1d4a8743773 2022-11-18 21:24:50 Harald Klimach Added support for the Fujitsu FRPTX compiler for ARM64FX
d4cc734f7d53 2022-08-31 16:37:29 Harald Klimach Applied patch 5 for Lua 5.4.4. https://github.com/lua/lu...
a31931ecf1d2 2022-08-31 16:20:35 Harald Klimach Applied patch 4 for Lua 5.4.4. https://github.com/lua/lu...
39d8be88b1bb 2022-08-31 16:14:39 Harald Klimach Applied Patch 3 for Lua 5.4.4 https://github.com/lua/lua...
eeceb4ecd81b 2022-06-09 19:34:19 Harald Klimach Moved references from geb.sts.nt.uni-siegen to geb.inf.tu...
82420628d4ad 2022-05-02 18:33:24 Harald Klimach Applied patch 2 for Lua 5.4.4 Lua can generate wrong cod...
85dac2955524 2022-05-02 18:28:20 Harald Klimach Applied patch 1 for Lua 5.4.4 lua.c assumes that argv ha...

Recently edited Tags

Nombre Rev. Tiempo Autor
v0_interface bfb6dafab79a 2012-04-26 03:31:49 Harald Klimach
tip 6e1aee72017f 2023-06-21 00:57:46 Harald Klimach

Branches

Nombre Rev. Tiempo Autor Mensaje
default 6e1aee72017f 2023-06-21 00:57:46 Harald Klimach Updated include path for ch...
sepenv adfb48c096f0 2016-01-22 17:14:04 Harald Klimach Finished the separation of ...
set-userdata f91631b6b245 2019-04-25 18:15:24 Nick Papior enh: enabled getting user-d...

README.md

Advanced Options and Tables in Universal Scripting

The AOTUS library provides a Fortran wrapper around the C-API of the Lua scripting language, allowing a convenient usage of Lua scripts as configuration files in Fortran applications.

Please visit the FORD generated documentation for more information on its usage and details.

This library is released under a simplified MIT licence, please have a look into the COPYRIGHT file for details.

How To Build

Waf is used as build system, but alternatively you may also use a Makefile, see below.

Run:

./waf configure build

to build the Aotus library. If you want to select a specific Fortran compiler, set the environment variable FC. And for a specific C compiler, set the environment variable CC. The Fortran compiler flags are set with the help of fcopts, which provide a set of compiler flag combinations for various compilers. They are found in the fortran_compiler.py file in the root directory of the project.

By running:

./waf --help

you get a list of available options to the waf script.

Generating a Makefile

If you do not want to use waf for the actual compilation of the project, you can generate a Makefile with waf by running the dump command. To resemble more closely the usual auto-tool steps, there is a configure script to run the configuration phase of waf and the generation of the Makefile. This will create a Makefile in the build subdirectory, so you can compile aotus with:

./configure
cd build
make

You can get a list of available options by running

./configure --help

Build with the smeka system

The aotus library can also built by using the provided Makefile.smeka, which utilizes the smeka build system.

This build system requires the compilation in a subdirectory. A minimal compilation (defaulting to the GNU compiler suite, gfortran/gcc) is achieved by running:

mkdir build
cd build
{
echo 'TOP_DIR = ..'
echo 'include $(TOP_DIR)/Makefile.smeka'
} > Makefile
make

and the resulting libaotus.a will be put in that directory.
To control the compiler flags you may create a file setup.make, which can define the usual FC, FFLAGS, CC, CFLAGS, INCLUDES and LIBS variables which are used for compilation, and linking. For instance, to compile with just the -g flag, you can use:

{
echo FFLAGS = -g
echo CFLAGS = -g
} > setup.make

Note that the default compiler is still the GNU suite.

Aotus may be built with two variations of extended precisions. They may individually be turned on by setting these variables:

EXTDOUBLE = 1 # defaults to 0 == do not build with extended double
QUADRUPLE = 1 # defaults to 0 == do not build with quadruple double

To install the library together with the modules in a given directory, you can run:

make install PREFIX=$HOME/aotus

This will create bin/, include/ and lib/ directories within the PREFIX path with the typical libraries and modules.

NOTE: Currently liblua.a is not added to the archive, this may easily be achieved by performing this shell command (after having run make)

rm libaotus.a
ar -ru libaotus.a *.o
ranlib libaotus.a

What is Built

For your convenience the Lua library is included in version 5.4.4 (released 2022-01-26). Its objects are completely gathered into the final libaotus library, so you only need to link against this single static library to gain the configuration features of Aotus in your Fortran application. Due to the compiler specific module information required by any application using libaotus, the suggested approach to incorporate libaotus is to include its building in the build process of the final application. This is straight forward if waf is used for the complete project. But also in other build environments it should not be too hard to make use of the generated build directory. Yet, if you would rather install the libaotus.a and the module files into a $PREFIX directory, you can make use of:

./waf install

The default build process will also create some unit test executables and execute them to ensure functionality of the various parts in the library.

The documentation can be built with FORD by running:

ford aot_mainpage.md

This will build a docu directory with the resulting documentation. Note that this requires FORD to be installed beforehand. This documentation is also available online at our server.

Example

There is an example program built, called aotus_sample, which you will find in the build directory. It can be used with the provided config.lua in the sample directory, where also the source of this small program is found.

Getting Started

The central module in this library is the aotus_module. Its documentation and the Aotus overview would be good starting points.

Related Projects

Some projects with similar goals or related information:

License

Aotus is licensed under the terms of the MIT license reproduced below. This means that Aotus is free software and can be used for both academic and commercial purposes at absolutely no cost. You are free to do with the code whatever you want. The only requirement is that some credit to the authors is given by putting this copyright notice somewhere in your project. The MIT license is chosen for full compatibility with Lua.

For the license of the underlying Lua library have a look at http://www.lua.org/license.html.


Copyright (C) 2011-2013 German Research School for Simulation Sciences GmbH, Aachen and others. 2014-2018 University of Siegen.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Show on old repository browser