Skip to content

Latest commit

 

History

History
65 lines (41 loc) · 2.57 KB

README.md

File metadata and controls

65 lines (41 loc) · 2.57 KB

Build Status DOI (paper) DOI

Reduced Precision Emulator

An emulator for reduced-precision floating-point calculations in Fortran. Licensed under the Apache 2.0 license (http://www.apache.org/licenses/LICENSE-2.0.html).

Documentation

See the online documentation for a user guide, developer guide and API reference. The source code for the documentation is distributed along with rpe in the doc/ directory.

Citation

The emulator is described in a GMD paper. If you use the software for published research please cite this paper, as well as the DOI for the software repository itself.

Building the library

The library is built using GNU Make and a fortran compiler. The default action when invoking make is to build the static library lib/librpe.a and the Fortran module modules/rp_emulator.mod.

The code is tested with and set-up for building with GNU gfortran or Intel Fortran (ifort) compilers. Which compiler to use is determined by the value of the F90 environment variable. If this variable is not set the Makefile will use gfortran. The default build is a simple invocation of make:

make

It is also possible to build a shared library lib/librpe.so using the shared target of the Makefile:

make shared

You can optionally specify a compiler on the command line:

F90=ifort make

If you want to use a compiler other than gfortran or ifort you will need to specify both the appropriate F90 variable and the correct FFLAGS for your compiler, bearing in mind the source code contains some lines over 132 characters in length. Compiler flags are also used to ensure the module rp_emulator.mod is placed in the modules/ directory in the source tree.

Unified source

The source code for the emulator is split across several files, and makes use of the C preprocessor to combine them during the build process. If you want to generate a unified source file for ease of use you can use the source target of the Makefile:

make source

This will generate the file src/processed/rp_emulator.f90 which can be integrated into the source of other projects.