Skip to content

Commit

Permalink
Adding support for Intel's Integrated Performance Primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 committed Nov 9, 2015
1 parent 626c8e5 commit d2257b9
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,43 @@ Please thank the original authors of `igzip`: Jim Guilford, Vinodh Gopal, Sean G
Also thank Paolo Narvaez, Mishali Naik and Gil Wolrich for their contributions.
Finally, thank Intel for sponsoring the `igzip` work.

## Intel Integrated Performance Primitives (Intel IPP) Support

Intel's Integrated Performance Primitives (Intel IPP) can boost performance of compression (deflation) by 20-30%.
Currently, Intel IPP 9.0 is supported.

#### Enable IGZIP when configuring PBGZIP

Make sure to enable `ipp` when running configure:

```
./configure --enable-ipp
```

## Installing and Linking Intel IPP

1. Install Intel's IPP (see [Intel IPP](https://software.intel.com/en-us/intel-ipp)]).

2. Make sure that the path to the installed Intel IPP libraries is either (a)added to your relevant environment variables, or (b) or specified during the configure command.

(a) Add the following to your `.bashrc`. Please modify the path for your installation.

```
export LIBRARY_PATH=${LIBRARY_PATH}:/opt/intel/compilers_and_libraries_2016.0.083/mac/ipp/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/intel/compilers_and_libraries_2016.0.083/mac/ipp/lib
```

(b) Append the following to the arguments to `configure`. Please modify the path for your installation.

```
LDFLAGS=-L/opt/intel/compilers_and_libraries_2016.0.083/mac/ipp/lib CFLAGS=-I/opt/intel/compilers_and_libraries_2016.0.083/mac/ipp/include
```

## Current Issues

For developer issues, see: https://github.com/nh13/pbgzip/issues


#### Compression Limitations

Due to the requirement that we must fit a chunk of compressed data into a maximum size block, we may fail at compression when the data has sufficiently high entropy (is too random).
Expand Down
12 changes: 11 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ AC_GNU_SOURCE
# set CFLAGS
default_CFLAGS="-g -Wall -O2 -pthread";
extended_CFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -DHAVE_LIBPTHREAD" # #-DDISABLE_BZ2
AM_CPPFLAGS="-I. -Iigzip/c_code -Iigzip/include"

AC_MSG_CHECKING(whether the git revision is available)
gitrev="`git log 2>/dev/null | grep -m 1 commit | awk '{print $2}'`";
Expand All @@ -48,6 +47,17 @@ fi
AC_ARG_ENABLE(intel64, [ --enable-intel64 optimize for Intel64 CPU such as Xeon and Core2], [extended_CFLAGS="${extended_CFLAGS} -mtune=nocona"], [])
AC_ARG_ENABLE(bz2, [ --disable-bz2 use this option to disable bz2 support], [AC_DEFINE(DISABLE_BZ2,1,[Define 1 if we want to disable bz2 support])], [AC_CHECK_LIB([bz2], [BZ2_bzRead])])
AC_ARG_ENABLE(igzip, [ --enable-igzip use this option to enable igzip support], [AC_CHECK_LIB([igzip0c], [fast_lz])], [])
AC_ARG_ENABLE(ipp, [ --enable-ipp use this option to enable intel integrated performance primitives support (please set LDFLAGS and CFLAGS appropriately)],
[
AC_CHECK_LIB([ippdc], [ippdcGetLibVersion], [], [AC_MSG_ERROR(["--enable-ipp used but ippdc not found"])])
AC_CHECK_LIB([ippcc], [ippccGetLibVersion], [], [AC_MSG_ERROR(["--enable-ipp used but ippcc not found"])])
AC_CHECK_LIB([ippcv], [ippcvGetLibVersion], [], [AC_MSG_ERROR(["--enable-ipp used but ippcv not found"])])
AC_CHECK_LIB([ippch], [ippchGetLibVersion], [], [AC_MSG_ERROR(["--enable-ipp used but ippch not found"])])
AC_CHECK_LIB([ippvm], [ippvmGetLibVersion], [], [AC_MSG_ERROR(["--enable-ipp used but ippvm not found"])])
AC_CHECK_LIB([ippi], [ippiGetLibVersion], [], [AC_MSG_ERROR(["--enable-ipp used but ippi not found"])])
AC_CHECK_LIB([ipps], [ippsGetLibVersion], [], [AC_MSG_ERROR(["--enable-ipp used but ipps not found"])])
AC_CHECK_LIB([ippcore], [ippGetLibVersion], [], [AC_MSG_ERROR(["--enable-ipp used but ippcore not found"])])
], [])

CFLAGS="${CFLAGS} ${default_CFLAGS} ${extended_CFLAGS}";

Expand Down

0 comments on commit d2257b9

Please sign in to comment.