Skip to content

[mpdecimal] [package list]

mpdecimal/4.0.0-cpeAOCC-24.03 (mpdecimal-4.0.0-cpeAOCC-24.03.eb)

To access module help and find out for which stacks and partitions the module is installed, use module spider mpdecimal/4.0.0-cpeAOCC-24.03.

EasyConfig:

# This EasyConfig is mostly here for testing the installation procedure of mpdecimal/libmpdec.
# It is included in the baselibs from the 2020a edition onwards.
easyblock = 'ConfigureMake'

local_mpdecimal_version =    '4.0.0'         # https://www.bytereef.org/mpdecimal/

name =    'mpdecimal'
version = local_mpdecimal_version

homepage = 'https://www.bytereef.org/mpdecimal/'

whatis = [
    'Description: mpdecimal is a package for correctly-rounded arbitrary precision decimal floating point arithmetic..',
]

description = """
mpdecimal is a package for correctly-rounded arbitrary precision decimal
floating point arithmetic. Starting from version 2.4.0, mpdecimal includes
only the libmpdec library. Further mpdecimal development will focus
exclusively on libmpdec.

libmpdec is a complete implementation of the General Decimal Arithmetic
Specification. The specification, written by Mike Cowlishaw from IBM,
defines a general purpose arbitrary precision data type together with
rigorously specified functions and rounding behavior. As described in the
scope section of the specification, libmpdec will - with minor restrictions -
also conform to the IEEE 754-2008 Standard for Floating-Point Arithmetic,
provided that the appropriate context parameters are set.

libmpdec is written in C, but the header files are prepared for use with a
C++ compiler. It is intended to be cross platform and has been tested on
64/32-bit Linux, 64/32-bit FreeBSD and OpenBSD, 64/32-bit Windows,
64-bit AIX, 64/32-bit OpenSolaris and 32-bit Debian Mips.

Starting from Python-3.3, libmpdec is the basis for Python’s decimal module.
"""

docurls = [
    'Web-based documentation on https://www.bytereef.org/mpdecimal/doc/libmpdec/index.html'
]

software_license_urls = [
    'https://opensource.org/licenses/BSD-2-Clause',
]

toolchain = {'name': 'cpeAOCC', 'version': '24.03'}
toolchainopts = {'defaultprec': False}

# https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-2.5.1.tar.gz
source_urls = ['https://www.bytereef.org/software/mpdecimal/releases/']
sources =     [SOURCELOWER_TAR_GZ]
checksums =   ['942445c3245b22730fd41a67a7c5c231d11cb1b9936b9c0f76334fb7d0b4468c']

builddependencies = [ # Create a reproducible build environment.
    ('buildtools', '%(toolchain_version)s', '', True),
]

# Doesn't need MPI, ROCm or BLAS, and module unload never fails so this is safe.
preconfigopts = 'module unload cray-libsci cray-mpich rocm xpmem && '
prebuildopts = preconfigopts

# Some default options that we want for sure in case the defaults would change in
# future versions.
configopts = '--enable-shared --enable-cxx'

postinstallcmds = [
    'mkdir -p %(installdir)s/share/licenses/%(name)s',
    'cp CHANGELOG.txt COPYRIGHT.txt README.txt %(installdir)s/share/licenses/%(name)s',   
]

sanity_check_paths = {
    'files': ['lib/lib%s.%s' % (x, y) for x in [ 'mpdec', 'mpdec++'] for y in ['a', SHLIB_EXT]] +
             ['include/mpdecimal.h', 'include/decimal.hh', f'share/licenses/{name}/COPYRIGHT.txt'],
    'dirs':  ['share/doc/mpdecimal'],
}

sanity_check_commands = [
    'pkg-config --libs libmpdec',    
    'pkg-config --libs libmpdec++',    
]

moduleclass = 'math'

[mpdecimal] [package list]