Skip to content
Snippets Groups Projects
Unverified Commit badd11e7 authored by Mark Olesen's avatar Mark Olesen Committed by GitHub
Browse files

openfoam package updates, scotch version update (#17731)


* openfoam: use MPI 'headers' property (fixes #17730)

* openfoam: +spdp variant, usable for OpenFOAM 1906 and later

in contrast to +float32, which uses single-precision throughout, +spdp
uses the following:

- single-precision for most internals
- double-precision for linear solver

* openfoam: add m4 as build dependency

* scotch: update to 6.0.9 released Oct 2019

Co-authored-by: default avatarMark Olesen <Mark.Olesen@esi-group.com>
parent 42dec9eb
No related branches found
No related tags found
No related merge requests found
......@@ -214,11 +214,12 @@ def mplib_content(spec, pre=None):
"""The mpi settings (from spack) for the OpenFOAM wmake includes, which
allows later reuse within OpenFOAM.
Optional parameter 'pre' to provide alternative prefix
Optional parameter 'pre' to provide alternative prefix for
bin and lib directories.
"""
mpi_spec = spec['mpi']
bin = mpi_spec.prefix.bin
inc = mpi_spec.prefix.include
inc = mpi_spec.headers.directories[0] # Currently only need first one
lib = pkglib(mpi_spec)
libname = 'mpi'
......@@ -283,6 +284,8 @@ class Openfoam(Package):
variant('float32', default=False,
description='Use single-precision')
variant('spdp', default=False,
description='Use single/double mixed precision')
variant('int64', default=False,
description='With 64-bit labels')
variant('knl', default=False,
......@@ -317,6 +320,7 @@ class Openfoam(Package):
# introduced by the restriction within scotch!
depends_on('flex@:2.6.1,2.6.4:')
depends_on('cmake', type='build')
depends_on('m4', type='build')
# Require scotch with ptscotch - corresponds to standard OpenFOAM setup
depends_on('scotch~metis+mpi~int64', when='+scotch~int64')
......@@ -848,7 +852,7 @@ def __init__(self, spec, **kwargs):
self.compiler = None # <- %compiler
self.arch_option = '' # Eg, -march=knl
self.label_size = None # <- +int64
self.precision_option = 'DP' # <- +float32
self.precision_option = 'DP' # <- +float32 | +spdp
self.compile_option = kwargs.get('compile-option', '-spack')
self.arch = None
self.options = None
......@@ -860,12 +864,11 @@ def __init__(self, spec, **kwargs):
elif kwargs.get('label-size', True):
self.label_size = '32'
if '+float32' in spec:
if '+spdp' in spec:
self.precision_option = 'SPDP'
elif '+float32' in spec:
self.precision_option = 'SP'
# TDB: mixed precision?
# self.precision_option = 'SPDP'
# Processor/architecture-specific optimizations
if '+knl' in spec:
self.arch_option = '-march=knl'
......
......@@ -14,6 +14,7 @@ class Scotch(Package):
url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.4.tar.gz"
list_url = "http://gforge.inria.fr/frs/?group_id=248"
version('6.0.9', sha256='622b4143cf01c480bb15708b3651b29c25e4aeb00c8c6447ff196aca2eca5c93')
version('6.0.8', sha256='0ba3f145026174304f910c8770a3cbb034f213c91d939573751cfbb4fd46d45e')
version('6.0.6', sha256='686f0cad88d033fe71c8b781735ff742b73a1d82a65b8b1586526d69729ac4cf')
version('6.0.5a', sha256='5b21b95e33acd5409d682fa7253cefbdffa8db82875549476c006d8cbe7c556f')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment