Skip to content

[zfp] [package list]

zfp/1.0.1-cpeGNU-26.03 (zfp-1.0.1-cpeGNU-26.03.eb)

Install with the EasyBuild-user module:

eb zfp-1.0.1-cpeGNU-26.03.eb -r
To access module help after installation and get reminded for which stacks and partitions the module is installed, use module spider zfp/1.0.1-cpeGNU-26.03.

EasyConfig:

# Based on a easyconfig by the Juelich Supercomputing Centre
# Adapted for LUMI by Orian Louant
#
#DOC Provides shared libraries only; building both static and shared libraries in
#DOC a single module fails.

easyblock = 'CMakeMake'

local_zfp_version =          '1.0.1'         # https://github.com/LLNL/zfp/releases

name =    'zfp'
version = local_zfp_version

homepage = "https://computing.llnl.gov/projects/zfp"

whatis = [
    'Description: zfp is a compressed format for representing multidimensional' 
    'floating-point and integer arrays'
]

description = """
zfp is a compressed format for representing multidimensional floating-point
and integer arrays. zfp provides compressed-array classes that support high
throughput read and write random access to individual array elements. zfp
also supports serial and parallel (OpenMP and CUDA) compression of whole
arrays, e.g., for applications that read and write large data sets to and
from disk.

zfp uses lossy but optionally error-bounded compression to achieve high
compression ratios. Bit-for-bit lossless compression is also possible through
one of zfp's compression modes. zfp works best for 2D, 3D, and 4D arrays that
exhibit spatial correlation, such as continuous fields from physics simulations,
natural images, regularly sampled terrain surfaces, etc. zfp compression of 1D
arrays is possible but generally discouraged.
"""

doc_urls = ['https://zfp.readthedocs.io/en/release1.0.1/']
software_license_urls = ['https://github.com/LLNL/zfp/blob/develop/LICENSE']

toolchain = {'name': 'cpeGNU', 'version': '26.03'}
toolchain_opts = {'pic': True}

source_urls = ['https://github.com/LLNL/zfp/archive']
sources =     ['%(version)s.tar.gz']
checksums =   ['4984db6a55bc919831966dd17ba5e47ca7ac58668f4fd278ebd98cd2200da66f']

build_deps = [
    ('buildtools',          '%(toolchain_version)s', '', True),
    ('craype-network-none', EXTERNAL_MODULE),
    ('craype-accel-host',   EXTERNAL_MODULE),
]

# Remove previous install: the reason is that when forcing rebuild (-f flag),
# the build failed if a previous install already exists at configure stage.
pre_configure_opts = '&& '.join([
    'rm -rf %(installdir)s/* && '
    'module unload rocm cray-libsci && '
])

pre_build_opts = pre_install_opts = 'module unload rocm cray-libsci && '

configure_opts = ' '.join([
    '-DBUILD_SHARED_LIBS:BOOL=ON',
    '-DBUILD_EXAMPLES:BOOL=OFF',  # Build zfp examples
    '-DBUILD_TESTING:BOOL=OFF',
    '-DZFP_WITH_OPENMP:BOOL=ON',
    '-DZFP_WITH_CUDA:BOOL=OFF',
    '-DBUILD_CFP:BOOL=ON',        # Build CFP arrays library
    '-DBUILD_ZFPY:BOOL=OFF',      # Don't build the Python interface
    '-DBUILD_ZFORP:BOOL=ON',      # Build Fortran library
    '-DBUILD_UTILITIES:BOOL=ON',  # Build zfp command line utilities
    '-DBUILD_SHARED_LIBS=ON'
])

# create pkgconfig file
post_install_cmds = [
    "mkdir -p %(installdir)s/lib/pkgconfig",
    """echo -e "prefix=%(installdir)s
libdir=\\${prefix}/lib64
includedir=\\${prefix}/include
Name: %(name)s
Description: %(name)s compression library
Version: %(version)s
Requires:
Libs: -L\\${libdir} -lzfp -lcfp
Cflags: -I\\${includedir}" > %(installdir)s/lib/pkgconfig/%(name)s.pc""",
    'mkdir -p %(installdir)s/share/licenses/%(name)s',
    'cd ../%(namelower)s-%(version)s && cp CHANGELOG.md CITATION.cff CONTRIBUTING.md LICENSE NOTICE README.md SUPPORT.md %(installdir)s/share/licenses/%(name)s',   
]

sanity_check_paths = {
    'files': [f'lib64/libzfp.{SHLIB_EXT}', f'lib64/libcfp.{SHLIB_EXT}', 
              'include/zfp.h', 'include/zfp.mod',
              'share/licenses/%(name)s/LICENSE'],
    'dirs':  ['lib/pkgconfig'],
}

# The zfp --help or zfp --version always returns 1 as the error code so not useable for a
# sanity check command to test if it finds all shared libraries.
sanity_check_cmds = [
    'pkg-config --validate zfp',
    f'pkg-config --exact-version={version} zfp'
]

env_mod_category = 'lib'

[zfp] [package list]