dsqss: new package at v2.0.3 (#20723)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
parent
c6f13cb20f
commit
506da6891a
2 changed files with 71 additions and 0 deletions
24
var/spack/repos/builtin/packages/dsqss/ctest.patch
Normal file
24
var/spack/repos/builtin/packages/dsqss/ctest.patch
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
diff -u -r -N a/test/dla/CMakeLists.txt b/test/dla/CMakeLists.txt
|
||||||
|
--- a/test/dla/CMakeLists.txt 2020-10-23 17:48:19.000000000 +0900
|
||||||
|
+++ b/test/dla/CMakeLists.txt 2020-10-23 17:49:46.000000000 +0900
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
configure_file(test.py ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
|
||||||
|
file(GLOB jsons "*.json")
|
||||||
|
set(BUILD_TOOL_DIR ${CMAKE_BINARY_DIR}/tool)
|
||||||
|
-set(PYTHONPATH "${BUILD_TOOL_DIR}:${pythonpath_build}")
|
||||||
|
+set(PYTHONPATH "${BUILD_TOOL_DIR}:${pythonpath_build}:$ENV{PYTHONPATH}")
|
||||||
|
foreach(json ${jsons})
|
||||||
|
configure_file(${json} ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
|
||||||
|
file(RELATIVE_PATH jsonfilename ${CMAKE_CURRENT_SOURCE_DIR} ${json})
|
||||||
|
diff -u -r -N a/test/pmwa/CMakeLists.txt b/test/pmwa/CMakeLists.txt
|
||||||
|
--- a/test/pmwa/CMakeLists.txt 2020-10-28 14:22:18.000000000 +0900
|
||||||
|
+++ b/test/pmwa/CMakeLists.txt 2020-10-28 14:22:57.000000000 +0900
|
||||||
|
@@ -10,7 +10,7 @@
|
||||||
|
file(RELATIVE_PATH jsonfilename ${CMAKE_CURRENT_SOURCE_DIR} ${json})
|
||||||
|
|
||||||
|
add_test(NAME "pmwa/${jsonfilename}"
|
||||||
|
- COMMAND env PYTHONPATH=${pythonpath_build} ${PYTHON_EXECUTABLE} test.py ${CMAKE_BINARY_DIR}/src/pmwa ${CMAKE_CURRENT_BINARY_DIR}/${jsonfilename}
|
||||||
|
+ COMMAND env PYTHONPATH=${pythonpath_build}:$ENV{PYTHONPATH} ${PYTHON_EXECUTABLE} test.py ${CMAKE_BINARY_DIR}/src/pmwa ${CMAKE_CURRENT_BINARY_DIR}/${jsonfilename}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
|
||||||
|
)
|
||||||
|
endforeach(json)
|
47
var/spack/repos/builtin/packages/dsqss/package.py
Normal file
47
var/spack/repos/builtin/packages/dsqss/package.py
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# Copyright 2013-2021 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 *
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
class Dsqss(CMakePackage):
|
||||||
|
"""DSQSS is a program package for solving quantum many-body
|
||||||
|
problems defined on lattices. It is based on the quantum Monte
|
||||||
|
Carlo method in Feynman's path integral representation. """
|
||||||
|
|
||||||
|
homepage = "https://www.pasums.issp.u-tokyo.ac.jp/dsqss/en/"
|
||||||
|
url = "https://github.com/issp-center-dev/dsqss/releases/download/v2.0.3/dsqss-v2.0.3.tar.gz"
|
||||||
|
|
||||||
|
version('2.0.3', sha256='11255dd1f1317fb4ac2d6ae95535f027d627d03f5470717cd277dd9ab94496e0')
|
||||||
|
|
||||||
|
variant("mpi", default=True, description="build mpi support")
|
||||||
|
|
||||||
|
depends_on('mpi', when='+mpi')
|
||||||
|
depends_on('python', type=('build', 'run'))
|
||||||
|
depends_on('py-numpy', type=('build', 'run'))
|
||||||
|
depends_on('py-scipy', type=('build', 'run'))
|
||||||
|
depends_on('py-toml', type=('build', 'run'))
|
||||||
|
|
||||||
|
patch('ctest.patch')
|
||||||
|
|
||||||
|
extends('python')
|
||||||
|
|
||||||
|
# Built-in tests are stored as JSON files.
|
||||||
|
# The archive contains "resource fork" files such as "._dimer_1.json".
|
||||||
|
# In Linux, the test system tried to test "._dimer_1.json" and failed.
|
||||||
|
@run_before('cmake')
|
||||||
|
def rm_macos(self):
|
||||||
|
if sys.platform != 'darwin':
|
||||||
|
for mfile in find('test', '._*.json', recursive=True):
|
||||||
|
force_remove(mfile)
|
||||||
|
|
||||||
|
def cmake_args(self):
|
||||||
|
args = [
|
||||||
|
self.define_from_variant('ENABLE_MPI', 'mpi')
|
||||||
|
]
|
||||||
|
|
||||||
|
return args
|
Loading…
Reference in a new issue