Compare commits
3 Commits
negated-ve
...
e4s-22.05
Author | SHA1 | Date | |
---|---|---|---|
![]() |
22d486aab5 | ||
![]() |
6040c82740 | ||
![]() |
19eb982d53 |
88
var/spack/repos/builtin/packages/bricks/package.py
Normal file
88
var/spack/repos/builtin/packages/bricks/package.py
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
# 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 Bricks(CMakePackage):
|
||||||
|
|
||||||
|
"""Bricks is a data layout and code generation framework,
|
||||||
|
enabling performance-portable stencil computations across
|
||||||
|
a multitude of architectures."""
|
||||||
|
|
||||||
|
# url for your package's homepage here.
|
||||||
|
homepage = "https://bricks.run/"
|
||||||
|
git = 'https://github.com/CtopCsUtahEdu/bricklib.git'
|
||||||
|
|
||||||
|
test_requires_compiler = True
|
||||||
|
|
||||||
|
# List of GitHub accounts to notify when the package is updated.
|
||||||
|
maintainers = ['ztuowen', 'drhansj']
|
||||||
|
|
||||||
|
version('r0.1', branch='r0.1')
|
||||||
|
|
||||||
|
variant('cuda', default=False, description='Build bricks with CUDA enabled')
|
||||||
|
|
||||||
|
# Building a variant of cmake without openssl is to match how the
|
||||||
|
# ECP E4S project builds cmake in their e4s-base-cuda Docker image
|
||||||
|
depends_on('cmake', type='build')
|
||||||
|
depends_on('autoconf', type='build')
|
||||||
|
depends_on('automake', type='build')
|
||||||
|
depends_on('libtool', type='build')
|
||||||
|
depends_on('opencl-clhpp', when='+cuda')
|
||||||
|
depends_on('cuda', when='+cuda')
|
||||||
|
depends_on('mpi')
|
||||||
|
|
||||||
|
def cmake_args(self):
|
||||||
|
"""CMake arguments for configure stage"""
|
||||||
|
args = []
|
||||||
|
|
||||||
|
return args
|
||||||
|
|
||||||
|
def flag_handler(self, name, flags):
|
||||||
|
"""Set build flags as needed"""
|
||||||
|
if name in ['cflags', 'cxxflags', 'cppflags']:
|
||||||
|
# There are many vector instrinsics used in this package. If
|
||||||
|
# the package is built on a native architecture, then it likely
|
||||||
|
# will not run (illegal instruction fault) on a less feature-
|
||||||
|
# rich architecture.
|
||||||
|
# If you intend to use this package in an architecturally-
|
||||||
|
# heterogeneous environment, then the package should be build
|
||||||
|
# with "target=x86_64". This will ensure that all Intel
|
||||||
|
# architectures can use the libraries and tests in this
|
||||||
|
# project by forceing the AVX2 flag in gcc.
|
||||||
|
if name == 'cxxflags' and self.spec.target == 'x86_64':
|
||||||
|
flags.append('-mavx2')
|
||||||
|
return (None, flags, None)
|
||||||
|
return(flags, None, None)
|
||||||
|
|
||||||
|
@run_after('install')
|
||||||
|
def copy_test_sources(self):
|
||||||
|
"""Files to copy into test cache"""
|
||||||
|
srcs = [join_path('examples', 'external', 'CMakeLists.txt'),
|
||||||
|
join_path('examples', 'external', 'main.cpp'),
|
||||||
|
join_path('examples', 'external', '7pt.py')]
|
||||||
|
self.cache_extra_test_sources(srcs)
|
||||||
|
|
||||||
|
def test(self):
|
||||||
|
"""Test bricklib package"""
|
||||||
|
# Test prebuilt binary
|
||||||
|
source_dir = join_path(self.test_suite.current_test_cache_dir,
|
||||||
|
'examples', 'external')
|
||||||
|
|
||||||
|
self.run_test(exe='cmake',
|
||||||
|
options=['.'],
|
||||||
|
purpose='Configure bricklib example',
|
||||||
|
work_dir=source_dir)
|
||||||
|
|
||||||
|
self.run_test(exe='cmake',
|
||||||
|
options=['--build', '.'],
|
||||||
|
purpose='Build bricklib example',
|
||||||
|
work_dir=source_dir)
|
||||||
|
|
||||||
|
self.run_test(exe=join_path(source_dir, 'example'),
|
||||||
|
options=[],
|
||||||
|
purpose='Execute bricklib example',
|
||||||
|
work_dir=source_dir)
|
@@ -28,6 +28,7 @@ class Tau(Package):
|
|||||||
tags = ['e4s']
|
tags = ['e4s']
|
||||||
|
|
||||||
version('master', branch='master')
|
version('master', branch='master')
|
||||||
|
version('2.31.1', sha256='bf445b9d4fe40a5672a7b175044d2133791c4dfb36a214c1a55a931aebc06b9d')
|
||||||
version('2.31', sha256='27e73c395dd2a42b91591ce4a76b88b1f67663ef13aa19ef4297c68f45d946c2')
|
version('2.31', sha256='27e73c395dd2a42b91591ce4a76b88b1f67663ef13aa19ef4297c68f45d946c2')
|
||||||
version('2.30.2', sha256='43f84a15b71a226f8a64d966f0cb46022bcfbaefb341295ecc6fa80bb82bbfb4')
|
version('2.30.2', sha256='43f84a15b71a226f8a64d966f0cb46022bcfbaefb341295ecc6fa80bb82bbfb4')
|
||||||
version('2.30.1', sha256='9c20ca1b4f4e80d885f24491cee598068871f0e9dd67906a5e47e4b4147d08fc')
|
version('2.30.1', sha256='9c20ca1b4f4e80d885f24491cee598068871f0e9dd67906a5e47e4b4147d08fc')
|
||||||
|
@@ -1,34 +0,0 @@
|
|||||||
From 9785e706229622626133c4b03c7abd004f62023f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Axel Huebl <axel.huebl@plasma.ninja>
|
|
||||||
Date: Sat, 4 Dec 2021 15:28:13 -0800
|
|
||||||
Subject: [PATCH] Fix: Installed Symlink LIB
|
|
||||||
|
|
||||||
The latest patch to these routines broke our library alias in installs.
|
|
||||||
|
|
||||||
By default, this variable is relative and needs the prefix appended.
|
|
||||||
In some cases, e.g., if externally set, it can already be absolute. In that
|
|
||||||
case, we skip adding the prefix.
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 7 ++++++-
|
|
||||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 04092ba962..a549546ab9 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -343,9 +343,14 @@ if(WarpX_LIB)
|
|
||||||
else()
|
|
||||||
set(mod_ext "so")
|
|
||||||
endif()
|
|
||||||
+ if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
|
|
||||||
+ set(ABS_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR})
|
|
||||||
+ else()
|
|
||||||
+ set(ABS_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
|
|
||||||
+ endif()
|
|
||||||
install(CODE "file(CREATE_LINK
|
|
||||||
$<TARGET_FILE_NAME:shared>
|
|
||||||
- ${CMAKE_INSTALL_LIBDIR}/libwarpx.${lib_suffix}.${mod_ext}
|
|
||||||
+ ${ABS_INSTALL_LIB_DIR}/libwarpx.${lib_suffix}.${mod_ext}
|
|
||||||
COPY_ON_ERROR SYMBOLIC)")
|
|
||||||
endif()
|
|
||||||
|
|
@@ -132,7 +132,22 @@ class Warpx(CMakePackage):
|
|||||||
# The symbolic aliases for our +lib target were missing in the install
|
# The symbolic aliases for our +lib target were missing in the install
|
||||||
# location
|
# location
|
||||||
# https://github.com/ECP-WarpX/WarpX/pull/2626
|
# https://github.com/ECP-WarpX/WarpX/pull/2626
|
||||||
patch('2626.patch', when='@21.12')
|
patch('https://github.com/ECP-WarpX/WarpX/pull/2626.patch?full_index=1',
|
||||||
|
sha256='a431d4664049d6dcb6454166d6a948d8069322a111816ca5ce01553800607544',
|
||||||
|
when='@21.12')
|
||||||
|
|
||||||
|
# Workaround for AMReX<=22.06 no-MPI Gather
|
||||||
|
# https://github.com/ECP-WarpX/WarpX/pull/3134
|
||||||
|
# https://github.com/AMReX-Codes/amrex/pull/2793
|
||||||
|
patch('https://github.com/ECP-WarpX/WarpX/pull/3134.patch?full_index=1',
|
||||||
|
sha256='b786ce64a3c2c2b96ff2e635f0ee48532e4ae7ad9637dbf03f11c0768c290690',
|
||||||
|
when='@22.02:22.05')
|
||||||
|
|
||||||
|
# Forgot to install ABLASTR library
|
||||||
|
# https://github.com/ECP-WarpX/WarpX/pull/3141
|
||||||
|
patch('https://github.com/ECP-WarpX/WarpX/pull/3141.patch?full_index=1',
|
||||||
|
sha256='dab6fb44556ee1fd466a4cb0e20f89bde1ce445c9a51a2c0f59d1740863b5e7d',
|
||||||
|
when='@22.04,22.05')
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
@@ -168,10 +183,15 @@ def cmake_args(self):
|
|||||||
def libs(self):
|
def libs(self):
|
||||||
libsuffix = {'1': '1d', '2': '2d', '3': '3d', 'rz': 'rz'}
|
libsuffix = {'1': '1d', '2': '2d', '3': '3d', 'rz': 'rz'}
|
||||||
dims = self.spec.variants['dims'].value
|
dims = self.spec.variants['dims'].value
|
||||||
return find_libraries(
|
libs = find_libraries(
|
||||||
['libwarpx.' + libsuffix[dims]], root=self.prefix, recursive=True,
|
['libwarpx.' + libsuffix[dims]], root=self.prefix, recursive=True,
|
||||||
shared=True
|
shared=True
|
||||||
)
|
)
|
||||||
|
libs += find_libraries(
|
||||||
|
['libablastr'], root=self.prefix, recursive=True,
|
||||||
|
shared=self.spec.variants['shared']
|
||||||
|
)
|
||||||
|
return libs
|
||||||
|
|
||||||
# WarpX has many examples to serve as a suitable smoke check. One
|
# WarpX has many examples to serve as a suitable smoke check. One
|
||||||
# that is typical was chosen here
|
# that is typical was chosen here
|
||||||
|
Reference in New Issue
Block a user