Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ofmla authored Apr 22, 2024
1 parent d4f0e09 commit 4da2470
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Fortran ZFP Example
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Fortran](https://img.shields.io/badge/Fortran-734f96?logo=fortran&style=flat)](https://fortran-lang.org)
![Build Status](https://github.com/ofmla/zfp_simple_example/actions/workflows/CI.yml/badge.svg)

This repository demonstrates how to integrate the Fortran bindings for the ZFP library into a simple example that illustrates compression and decompression of a double-precision 3D array.
This repository demonstrates how to integrate the [Fortran bindings for the ZFP library] (https://github.com/LLNL/zfp/blob/develop/fortran/zfp.f90) into a simple example that illustrates compression and decompression of a double-precision 3D array.

## Overview

[ZFP](https://github.com/LLNL/zfp) is an open-source library for compressed floating-point and integer arrays that support high throughput read and write random access. This repository focuses on integrating the Fortran bindings for ZFP into a Fortran project, showcasing its usage through a simple example.

The `zfp_example.f90` file contains the main program, which demonstrates the compression and decompression of a 3D array of 64-bit floats using the ZFP library. The `zfp_fct_wrapper.f90` file provides a Fortran module with functions for interacting with the ZFP library.
The `zfp_example.f90` file contains the main program, which demonstrates the compression and decompression of a 3D array of 64-bit floats using the ZFP library. It would be the equivalent of the [simple compressor example](https://github.com/LLNL/zfp/blob/develop/examples/simple.c). The `zfp_fct_wrapper.f90` file provides a Fortran module with functions for interacting with the ZFP library.


## Features
Expand All @@ -21,7 +22,7 @@ The `zfp_example.f90` file contains the main program, which demonstrates the com

Before building and running the example, ensure you have the following prerequisites installed:

- Fortran compiler (e.g., GNU Fortran, Intel Fortran)
- Fortran compiler which fully supports F2018 (e.g., GNU Fortran, Intel Fortran)
- CMake (version 3.16 or higher)

## Build the app
Expand Down Expand Up @@ -54,7 +55,7 @@ To decompress the compressed data and save it to `decompressed.zfp`, run the exe
```bash
./exe -d
```
Attempting to decompress data without first compressing it will result in an error, as the `compressed.zfp` file does not exist.
Attempting to decompress data without first compressing it will result in an error, as the `compressed.zfp` file does not exist. This example is built with double precision (real64) real values, but you can use `zfp_fct_wrapper.f90` in a project that uses real32 and explicitly specify the real kind with the preprocessor flag `-DREAL_KIND=REAL32`, i.e., `cmake -DREAL_KIND=REAL32 ..`.

## Contributing

Expand Down

0 comments on commit 4da2470

Please sign in to comment.