summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMarko Kabic <mkmarkokabic@gmail.com>2022-02-04 18:02:32 +0100
committerGitHub <noreply@github.com>2022-02-04 10:02:32 -0700
commit7af48f4570bd3cdfec63bd89bcd2d44f89781dfb (patch)
tree86913b49969ad435ab0560e7b4f5754e277d82b1 /var
parentd0019d704908f790386d2463fb33d1b36e4187b7 (diff)
downloadspack-7af48f4570bd3cdfec63bd89bcd2d44f89781dfb.tar.gz
spack-7af48f4570bd3cdfec63bd89bcd2d44f89781dfb.tar.bz2
spack-7af48f4570bd3cdfec63bd89bcd2d44f89781dfb.tar.xz
spack-7af48f4570bd3cdfec63bd89bcd2d44f89781dfb.zip
Adding new package: COSTA (#28727)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/costa/package.py57
1 files changed, 57 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/costa/package.py b/var/spack/repos/builtin/packages/costa/package.py
new file mode 100644
index 0000000000..97f28808c1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/costa/package.py
@@ -0,0 +1,57 @@
+# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+from spack import *
+
+
+class Costa(CMakePackage):
+ """
+ Distributed Communication-Optimal Matrix Transpose and Reshuffle Library
+ Based on the paper: https://arxiv.org/abs/2106.06601
+ """
+
+ maintainers = ['haampie', 'kabicm']
+ homepage = 'https://github.com/eth-cscs/COSTA'
+ url = 'https://github.com/eth-cscs/COSTA/releases/download/v2.0/COSTA-v2.0.tar.gz'
+ git = 'https://github.com/eth-cscs/COSTA.git'
+
+ # note: The default archives produced with github do not have the archives
+ # of the submodules.
+ version('master', branch='master', submodules=True)
+ version('2.0', sha256='ef283b904b1b77b7d0de401cbdc3d7850c77368f2b57249c6eaee3017794c4b8')
+
+ variant('scalapack', default=False, description='Build with ScaLAPACK API')
+
+ depends_on('cmake@3.12:', type='build')
+ depends_on('mpi@3:')
+ depends_on('scalapack', when='+scalapack')
+
+ def url_for_version(self, version):
+ return 'https://github.com/eth-cscs/COSTA/releases/download/v{0}/COSTA-v{1}.tar.gz'.format(version, version)
+
+ def setup_build_environment(self, env):
+ return
+
+ def costa_scalapack_cmake_arg(self):
+ spec = self.spec
+
+ if '~scalapack' in spec:
+ return 'OFF'
+ elif '^intel-mkl' in spec or '^intel-oneapi-mkl' in spec:
+ return 'MKL'
+ elif '^cray-libsci' in spec:
+ return 'CRAY_LIBSCI'
+
+ return 'CUSTOM'
+
+ def cmake_args(self):
+ return [
+ self.define('COSTA_WITH_BENCHMARKS', 'OFF'),
+ self.define('COSTA_WITH_APPS', 'OFF'),
+ self.define('COSTA_WITH_TESTS', 'OFF'),
+ self.define('COSTA_WITH_PROFILING', 'OFF'),
+ self.define('COSTA_SCALAPACK', self.costa_scalapack_cmake_arg())
+ ]