Commit e5bba30f authored by one's avatar one
Browse files

Initial commit

parents
# -*- conf -*-
# This is the only flake8 rule Spack violates somewhat flagrantly
# - E731: do not assign a lambda expression, use a def
#
# This is the only flake8 exception needed when using Black.
# - E203: white space around slice operators can be required, ignore : warn
#
# We still allow these in packages
# - F403: from/import * used; unable to detect undefined names
# - F405: undefined name or from *
# - F821: undefined name (needed with from/import *)
#
[flake8]
extend-ignore = E731,E203
max-line-length = 99
per-file-ignores =
*/package.py:F403,F405,F821
format = spack
[flake8:local-plugins]
report =
spack = flake8_formatter:SpackFormatter
paths =
./spack-core/share/spack/qa/
\ No newline at end of file
/spack-core
/pyrightconfig.json
###########################
# Python-specific ignores #
###########################
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
#lib/
#lib64/
parts/
sdist/
#var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
########################
# Vim-specific ignores #
########################
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
Sessionx.vim
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
##########################
# Emacs-specific ignores #
##########################
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# zsh byte-compiled files
*.zwc
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# Flycheck
flycheck_*.el
# server auth directory
/server/
# projectiles files
.projectile
# directory configuration
.dir-locals.el
# network security
/network-security.data
############################
# Eclipse-specific ignores #
############################
.metadata
#bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# CDT- autotools
.autotools
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# sbteclipse plugin
.target
# Tern plugin
.tern-project
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/
# Annotation Processing
.apt_generated/
.apt_generated_test/
# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
# Uncomment this line if you wish to ignore the project description file.
# Typically, this file would be tracked if it contains build/dependency configurations:
#.project
##################################
# Visual Studio-specific ignores #
##################################
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
#################################
# Sublime Text-specific ignores #
#################################
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# Workspace files are user-specific
*.sublime-workspace
# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# *.sublime-project
# SFTP configuration file
sftp-config.json
sftp-config-alt*.json
# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache
# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings
##############################
# JetBrains-specific ignores #
##############################
# Ignore the entire folder since it may conatin more files than
# just the ones listed below
.idea/
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
##########################
# macOS-specific ignores #
##########################
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
##########################
# Linux-specific ignores #
##########################
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
############################
# Windows-specific ignores #
############################
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
\ No newline at end of file
diff -Naru a/src/qs_kpp1_env_methods.F b/src/qs_kpp1_env_methods.F
--- a/src/qs_kpp1_env_methods.F 2022-10-03 01:14:25.720416300 +0530
+++ b/src/qs_kpp1_env_methods.F 2023-06-14 02:33:05.205287205 +0530
@@ -214,7 +214,6 @@
output_unit
LOGICAL :: gapw, gapw_xc, lsd, my_calc_forces
REAL(KIND=dp) :: alpha, energy_hartree, energy_hartree_1c
- REAL(KIND=dp), DIMENSION(:, :, :, :), POINTER :: vxg
TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
TYPE(cp_logger_type), POINTER :: logger
TYPE(cp_para_env_type), POINTER :: para_env
@@ -373,7 +372,8 @@
CALL xc_calc_2nd_deriv(v_xc, v_xc_tau, p_env%kpp1_env%deriv_set, p_env%kpp1_env%rho_set, &
rho1_r_pw, rho1_g_pw, tau1_r_pw, auxbas_pw_pool, xc_section, .FALSE., &
- NULL(vxg), lsd_singlets, do_excitations, do_triplet, do_tddft, &
+ lsd_singlets=lsd_singlets, do_excitations=do_excitations, &
+ do_triplet=do_triplet, do_tddft=do_tddft, &
compute_virial=calc_virial, virial_xc=virial)
DO ispin = 1, nspins
diff -Naru a/src/qs_kpp1_env_methods.F b/src/qs_kpp1_env_methods.F
--- a/src/qs_kpp1_env_methods.F 2021-11-20 14:35:36.103103400 +0530
+++ b/src/qs_kpp1_env_methods.F 2023-06-14 12:00:52.350584708 +0530
@@ -220,7 +220,6 @@
output_unit
LOGICAL :: gapw, gapw_xc, lsd, my_calc_forces
REAL(KIND=dp) :: alpha, energy_hartree, energy_hartree_1c
- REAL(KIND=dp), DIMENSION(:, :, :, :), POINTER :: vxg
TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
TYPE(cp_logger_type), POINTER :: logger
TYPE(cp_para_env_type), POINTER :: para_env
@@ -361,7 +360,8 @@
CALL xc_calc_2nd_deriv(v_xc, p_env%kpp1_env%deriv_set, p_env%kpp1_env%rho_set, &
rho1_r_pw, rho1_g_pw, auxbas_pw_pool, xc_section, .FALSE., &
- NULL(vxg), lsd_singlets, do_excitations, do_triplet, do_tddft, &
+ lsd_singlets=lsd_singlets, do_excitations=do_excitations, &
+ do_triplet=do_triplet, do_tddft=do_tddft, &
compute_virial=calc_virial, virial_xc=virial)
DO ispin = 1, nspins
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4526160ad..8218a7a3d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,6 +63,18 @@ string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
string(REPLACE "-DNDEBUG" "" CMAKE_Fortran_FLAGS_RELEASE
${CMAKE_Fortran_FLAGS_RELEASE})
+string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO
+ ${CMAKE_C_FLAGS_RELWITHDEBINFO})
+string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO
+ ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
+string(REPLACE "-DNDEBUG" "" CMAKE_Fortran_FLAGS_RELWITHDEBINFO
+ ${CMAKE_Fortran_FLAGS_RELWITHDEBINFO})
+string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_MINSIZEREL
+ ${CMAKE_C_FLAGS_MINSIZEREL})
+string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_MINSIZEREL
+ ${CMAKE_CXX_FLAGS_MINSIZEREL})
+string(REPLACE "-DNDEBUG" "" CMAKE_Fortran_FLAGS_MINSIZEREL
+ ${CMAKE_Fortran_FLAGS_MINSIZEREL})
find_package(PkgConfig)
diff --git a/src/qs_dispersion_d4.F b/src/qs_dispersion_d4.F
index 74df989b4..e513ed435 100644
--- a/src/qs_dispersion_d4.F
+++ b/src/qs_dispersion_d4.F
@@ -26,6 +26,7 @@ MODULE qs_dispersion_d4
#endif
USE kinds, ONLY: dp
USE particle_types, ONLY: particle_type
+ USE periodic_table, ONLY: get_ptable_info, ptable
USE qs_dispersion_types, ONLY: qs_dispersion_type
USE qs_force_types, ONLY: qs_force_type
USE message_passing, ONLY: mp_para_env_type
@@ -76,7 +77,8 @@ CONTAINS
TYPE(structure_type) :: mol
TYPE(realspace_cutoff) :: cutoff
- INTEGER :: iatom, natom, ind_atom
+ LOGICAL :: found
+ INTEGER :: iatom, natom, ind_atom, zatom
INTEGER, ALLOCATABLE, DIMENSION(:) :: el_num
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:, :) :: gradient, xyz
REAL(KIND=dp), DIMENSION(3, 3) :: stress
@@ -94,7 +96,9 @@ CONTAINS
DO iatom = 1, natom
xyz(:, iatom) = particle_set(iatom)%r(:)
CALL get_atomic_kind(particle_set(iatom)%atomic_kind, kind_number=ikind)
- el_num(iatom) = ikind
+ CALL get_ptable_info(particle_set(iatom)%atomic_kind%element_symbol, &
+ ielement=zatom, found=found)
+ el_num(iatom) = zatom
END DO
!get information about cell / lattice
@@ -125,7 +129,7 @@ CONTAINS
IF (para_env%num_pe > 1 .AND. para_env%mepos > 0) virial = 0.00_dp
END IF
DO iatom = 1, natom
- ikind = el_num(iatom)
+ CALL get_atomic_kind(particle_set(iatom)%atomic_kind, kind_number=ikind)
ind_atom = atom_of_kind(iatom)
force(ikind)%dispersion(:, ind_atom) = force(ikind)%dispersion(:, ind_atom) + gradient(:, iatom)
END DO
diff --git a/tests/QS/regtest-dft-vdw-corr-4/TEST_FILES b/tests/QS/regtest-dft-vdw-corr-4/TEST_FILES
index 047421204..c817677df 100644
--- a/tests/QS/regtest-dft-vdw-corr-4/TEST_FILES
+++ b/tests/QS/regtest-dft-vdw-corr-4/TEST_FILES
@@ -3,7 +3,7 @@
# e.g. 0 means do not compare anything, running is enough
# 1 compares the last total energy in the file
# for details see cp2k/tools/do_regtest
-pbe_dftd4.inp 33 1.0E-14 -0.00141644869634
+pbe_dftd4.inp 33 1.0E-14 -0.00283102230260
pbe_dftd4_force.inp 72 1.0E-07 0.00007217
-pbe_dftd4_stress.inp 31 1.0E-07 -5.16289312880E-03
+pbe_dftd4_stress.inp 31 1.0E-07 -2.14003785359E-02
#EOF
This diff is collapsed.
--- a/src/sockets.c 2019-12-24 01:41:57.000000000 +0530
+++ b/src/sockets.c 2023-05-15 18:35:33.941236292 +0530
@@ -35,6 +35,7 @@
*/
#ifndef __NO_IPI_DRIVER
+#define _POSIX_C_SOURCE 200112L
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b9e660fbfd2..06ccb802a9b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -692,7 +692,7 @@ endif()
# SIRIUS
if(CP2K_USE_SIRIUS)
- find_package(sirius REQUIRED)
+ find_package(sirius 7.7.0 REQUIRED)
endif()
if(CP2K_USE_PLUMED)
diff --git a/src/sirius_interface.F b/src/sirius_interface.F
index f6dc257c5d4..a84223d2433 100644
--- a/src/sirius_interface.F
+++ b/src/sirius_interface.F
@@ -145,7 +145,7 @@ SUBROUTINE cp_sirius_create_env(pwdft_env)
magnetization, mass, pf, rl, zeff, alpha_u, beta_u, &
J0_u, J_u, U_u, occ_u, u_minus_J
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:) :: beta, corden, ef, fe, locpot, rc, rp
- REAL(KIND=dp), DIMENSION(3) :: vr, vs
+ REAL(KIND=dp), DIMENSION(3) :: vr, vs, j_t
REAL(KIND=dp), DIMENSION(:), POINTER :: density
REAL(KIND=dp), DIMENSION(:, :), POINTER :: wavefunction, wfninfo
TYPE(atom_gthpot_type), POINTER :: gth_atompot
@@ -464,12 +464,14 @@ SUBROUTINE cp_sirius_create_env(pwdft_env)
CPABORT("CP2K/SIRIUS (hubbard): the occupation number can not be negative.")
END IF
+ j_t(:) = 0.0
IF (ABS(u_minus_j) < 1e-8) THEN
+ j_t(1) = J_u
CALL sirius_set_atom_type_hubbard(sctx, label, lu, nu, &
- occ_u, U_u, J_u, alpha_u, beta_u, J0_u)
+ occ_u, U_u, j_t, alpha_u, beta_u, J0_u)
ELSE
CALL sirius_set_atom_type_hubbard(sctx, label, lu, nu, &
- occ_u, u_minus_j, 0.0_dp, alpha_u, beta_u, J0_u)
+ occ_u, u_minus_j, j_t, alpha_u, beta_u, J0_u)
END IF
END IF
--- a/cmake/gmxDetectCpu.cmake
+++ b/cmake/gmxDetectCpu.cmake
@@ -83,7 +83,7 @@ function(gmx_run_cpu_detection TYPE)
set(GCC_INLINE_ASM_DEFINE "-DGMX_X86_GCC_INLINE_ASM=0")
endif()
- set(_compile_definitions "${GCC_INLINE_ASM_DEFINE} -I${PROJECT_SOURCE_DIR}/src -DGMX_CPUINFO_STANDALONE ${GMX_STDLIB_CXX_FLAGS} -DGMX_TARGET_X86=${GMX_TARGET_X86_VALUE}")
+ set(_compile_definitions ${GCC_INLINE_ASM_DEFINE} -I${PROJECT_SOURCE_DIR}/src -DGMX_CPUINFO_STANDALONE ${GMX_STDLIB_CXX_FLAGS} -DGMX_TARGET_X86=${GMX_TARGET_X86_VALUE})
set(LINK_LIBRARIES "${GMX_STDLIB_LIBRARIES}")
try_compile(CPU_DETECTION_COMPILED
"${PROJECT_BINARY_DIR}"
--- a/cmake/gmxDetectSimd.cmake
+++ b/cmake/gmxDetectSimd.cmake
@@ -77,7 +77,7 @@ function(gmx_suggest_simd _suggested_simd)
else()
set(GMX_TARGET_X86_VALUE 0)
endif()
- set(_compile_definitions "${GCC_INLINE_ASM_DEFINE} -I${CMAKE_SOURCE_DIR}/src -DGMX_CPUINFO_STANDALONE ${GMX_STDLIB_CXX_FLAGS} -DGMX_TARGET_X86=${GMX_TARGET_X86_VALUE}")
+ set(_compile_definitions ${GCC_INLINE_ASM_DEFINE} -I${CMAKE_SOURCE_DIR}/src -DGMX_CPUINFO_STANDALONE ${GMX_STDLIB_CXX_FLAGS} -DGMX_TARGET_X86=${GMX_TARGET_X86_VALUE})
# Prepare a default suggestion
set(OUTPUT_SIMD "None")
This diff is collapsed.
diff --git a/src/gromacs/domdec/ga2la.cpp b/src/gromacs/domdec/ga2la.cpp
index f8de0a23f92f0bf50afbd996e4c062e9909b74e8..32999842220b671fc6e93ce9418f938f083666cd 100644
--- a/src/gromacs/domdec/ga2la.cpp
+++ b/src/gromacs/domdec/ga2la.cpp
@@ -80,8 +80,9 @@ gmx_ga2la_t::gmx_ga2la_t(int numAtomsTotal, int numAtomsLocal) :
}
else
{
- new (&(data_.hashed))
- gmx::HashedMap<Entry>(numAtomsLocal, gmx_omp_nthreads_get(ModuleMultiThread::Domdec));
+ // We would like to be able to use more than 1 thread for clearing the hashed map,
+ // but the gmx_omp_nthreads might not be initialized at this point. See #5289
+ new (&(data_.hashed)) gmx::HashedMap<Entry>(numAtomsLocal);
}
}
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import json
import os
from spack_repo.builtin.build_systems.cmake import CMakePackage
from spack_repo.builtin.build_systems.rocm import ROCmPackage
from spack.package import *
class Hipsycl(CMakePackage, ROCmPackage):
"""hipSYCL is an implementation of the SYCL standard programming model
over NVIDIA CUDA/AMD HIP"""
homepage = "https://github.com/AdaptiveCpp/AdaptiveCpp"
url = "https://github.com/AdaptiveCpp/AdaptiveCpp/archive/v0.8.0.tar.gz"
git = "https://github.com/AdaptiveCpp/AdaptiveCpp.git"
provides("sycl")
license("BSD-2-Clause")
version("stable", branch="stable", submodules=True)
version("25.10.0", commit="9f842c701a599107cc6d117d3539f971036363a1", submodules=True)
version("25.02.0", commit="883b0e11b11fc59f37fa69e40c18446fcad03c50", submodules=True)
version("24.10.0", commit="7677cf6eefd8ab46d66168cd07ab042109448124", submodules=True)
version("24.06.0", commit="fc51dae9006d6858fc9c33148cc5f935bb56b075", submodules=True)
version("24.02.0", commit="974adc33ea5a35dd8b5be68c7a744b37482b8b64", submodules=True)
version("23.10.0", commit="3952b468c9da89edad9dff953cdcab0a3c3bf78c", submodules=True)
version("0.9.4", commit="99d9e24d462b35e815e0e59c1b611936c70464ae", submodules=True)
version("0.9.3", commit="51507bad524c33afe8b124804091b10fa25618dc", submodules=True)
version("0.9.2", commit="49fd02499841ae884c61c738610e58c27ab51fdb", submodules=True)
version("0.9.1", commit="fe8465cd5399a932f7221343c07c9942b0fe644c", submodules=True)
version("0.8.0", commit="2daf8407e49dd32ebd1c266e8e944e390d28b22a", submodules=True)
version("develop", branch="develop", submodules=True)
variant("cuda", default=False, description="Enable CUDA backend for SYCL kernels")
variant("rocm", default=False, description="Enable ROCM backend for SYCL kernels")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("cmake@3.5:", type="build")
depends_on("boost +filesystem", when="@:0.8")
depends_on("boost@1.67.0:1.69.0 +filesystem +fiber +context cxxstd=17", when="@0.9.1:")
depends_on("python@3:")
depends_on("llvm@8: +clang", when="~cuda")
depends_on("llvm@9: +clang", when="+cuda")
# hipSYCL 0.8.0 supported only LLVM 8-10:
# (https://github.com/AdaptiveCpp/AdaptiveCpp/blob/v0.8.0/CMakeLists.txt#L29-L37)
# recent versions support only up to llvm18
# https://github.com/spack/spack/issues/46681
# https://github.com/spack/spack/issues/49506
# The following list was made based on the version tested in adaptivecpp github
depends_on("llvm@14:18", when="@develop")
depends_on("llvm@14:18", when="@stable")
depends_on("llvm@14:18", when="@24.10.0")
depends_on("llvm@14:18", when="@24.06.0")
depends_on("llvm@13:17", when="@24.02.0")
depends_on("llvm@13:17", when="@23.10.0")
depends_on("llvm@11:15", when="@0.9.4")
depends_on("llvm@11:14", when="@0.9.3")
depends_on("llvm@11:13", when="@0.9.2")
depends_on("llvm@11", when="@0.9.1")
# depends_on("llvm@10:11", when="@0.9.0") # missing in releases
depends_on("llvm@8:10", when="@0.8.0")
# https://github.com/spack/spack/issues/45029 and https://github.com/spack/spack/issues/43142
conflicts("^gcc@12", when="@23.10.0")
# https://github.com/OpenSYCL/OpenSYCL/pull/918 was introduced after 0.9.4
conflicts("^gcc@12.2.0", when="@:0.9.4")
# LLVM PTX backend requires cuda7:10.1 (https://tinyurl.com/v82k5qq)
depends_on("cuda@9:10.1", when="@0.8.1: +cuda ^llvm@9")
depends_on("cuda@9:", when="@0.8.1: +cuda ^llvm@10:")
# hipSYCL@:0.8.0 requires cuda@9:10.0 due to a known bug
depends_on("cuda@9:10.0", when="@:0.8.0 +cuda")
conflicts(
"%gcc@:4",
when="@:0.9.0",
msg="hipSYCL needs proper C++14 support to be built, %gcc is too old",
)
conflicts(
"%gcc@:8",
when="@0.9.1:",
msg="hipSYCL needs proper C++17 support to be built, %gcc is too old",
)
conflicts(
"^llvm build_type=Debug",
when="+cuda",
msg="LLVM debug builds don't work with hipSYCL CUDA backend; for "
"further info please refer to: "
"https://github.com/illuhad/hipSYCL/blob/master/doc/install-cuda.md",
)
def cmake_args(self):
spec = self.spec
args = [
"-DWITH_CPU_BACKEND:Bool=TRUE",
"-DWITH_ROCM_BACKEND:Bool={0}".format("TRUE" if spec.satisfies("+rocm") else "FALSE"),
"-DWITH_CUDA_BACKEND:Bool={0}".format("TRUE" if spec.satisfies("+cuda") else "FALSE"),
# prevent hipSYCL's cmake to look for other LLVM installations
# if the specified one isn't compatible
"-DDISABLE_LLVM_VERSION_CHECK:Bool=TRUE",
]
# LLVM directory containing all installed CMake files
# (e.g.: configs consumed by client projects)
llvm_cmake_dirs = find(spec["llvm"].prefix, "LLVMExports.cmake")
if len(llvm_cmake_dirs) != 1:
raise InstallError(
"concretized llvm dependency must provide "
"a unique directory containing CMake client "
"files, found: {0}".format(llvm_cmake_dirs)
)
args.append("-DLLVM_DIR:String={0}".format(os.path.dirname(llvm_cmake_dirs[0])))
# clang internal headers directory
llvm_clang_include_dirs = find(spec["llvm"].prefix, "__clang_cuda_runtime_wrapper.h")
if len(llvm_clang_include_dirs) != 1:
raise InstallError(
"concretized llvm dependency must provide a "
"unique directory containing clang internal "
"headers, found: {0}".format(llvm_clang_include_dirs)
)
args.append(
"-DCLANG_INCLUDE_PATH:String={0}".format(os.path.dirname(llvm_clang_include_dirs[0]))
)
# target clang++ executable
llvm_clang_bin = os.path.join(spec["llvm"].prefix.bin, "clang++")
if not is_exe(llvm_clang_bin):
raise InstallError(
"concretized llvm dependency must provide a "
"valid clang++ executable, found invalid: "
"{0}".format(llvm_clang_bin)
)
args.append("-DCLANG_EXECUTABLE_PATH:String={0}".format(llvm_clang_bin))
# explicit CUDA toolkit
if spec.satisfies("+cuda"):
args.append("-DCUDA_TOOLKIT_ROOT_DIR:String={0}".format(spec["cuda"].prefix))
if spec.satisfies("+rocm"):
args.append("-DWITH_ACCELERATED_CPU:STRING=OFF")
args.append("-DROCM_PATH:STRING={0}".format(os.environ.get("ROCM_PATH")))
# Work around HIP_CLANG_INCLUDE_PATH-NOTFOUND
args.append(
"-DHIP_CLANG_INCLUDE_PATH:String={0}".format(os.path.dirname(llvm_clang_include_dirs[0]))
)
if self.spec.satisfies("@24.02.0:"):
args.append("-DWITH_SSCP_COMPILER=OFF")
args.append("-DACPP_COMPILER_FEATURE_PROFILE=minimal")
return args
@run_after("install")
def filter_config_file(self):
def edit_config(filename, editor):
config_file_paths = find(self.prefix, filename)
if len(config_file_paths) != 1:
raise InstallError(
"installed hipSYCL must provide a unique compiler driver"
"configuration file ({0}), found: {1}".format(filename, config_file_paths)
)
config_file_path = config_file_paths[0]
with open(config_file_path) as f:
config = json.load(f)
config_modified = editor(config)
with open(config_file_path, "w") as f:
json.dump(config_modified, f, indent=2)
if self.spec.satisfies("@:23.10.0"):
configfiles = {"core": "syclcc.json", "cuda": "syclcc.json"}
else:
configfiles = {"core": "acpp-core.json", "cuda": "acpp-cuda.json"}
def adjust_core_config(config):
config["default-cpu-cxx"] = self.compiler.cxx
return config
edit_config(configfiles["core"], adjust_core_config)
if self.spec.satisfies("+cuda"):
# 1. Fix compiler: use the real one in place of the Spack wrapper
# 2. Fix stdlib: we need to make sure cuda-enabled binaries find
# the libc++.so and libc++abi.so dyn linked to the sycl
# ptx backend
rpaths = set()
if self.spec.satisfies("~rocm"):
so_paths = find_libraries(
"libc++", self.spec["llvm"].prefix, shared=True, recursive=True
)
if len(so_paths) != 1:
raise InstallError(
"concretized llvm dependency must provide a "
"unique directory containing libc++.so, "
"found: {0}".format(so_paths)
)
rpaths.add(os.path.dirname(so_paths[0]))
so_paths = find_libraries(
"libc++abi", self.spec["llvm"].prefix, shared=True, recursive=True
)
if len(so_paths) != 1:
raise InstallError(
"concretized llvm dependency must provide a "
"unique directory containing libc++abi, "
"found: {0}".format(so_paths)
)
rpaths.add(os.path.dirname(so_paths[0]))
def adjust_cuda_config(config):
config["default-cuda-link-line"] += " " + " ".join(
"-rpath {0}".format(p) for p in rpaths
)
return config
edit_config(configfiles["cuda"], adjust_cuda_config)
This diff is collapsed.
diff -ruN spack-src/core/unit_test/TestNumericTraits.hpp spack-src-patched/core/unit_test/TestNumericTraits.hpp
--- spack-src/core/unit_test/TestNumericTraits.hpp 2023-11-20 13:26:46.000000000 -0800
+++ spack-src-patched/core/unit_test/TestNumericTraits.hpp 2023-11-28 12:06:44.216150685 -0800
@@ -110,8 +110,8 @@
KOKKOS_FUNCTION void operator()(Epsilon, int, int& e) const {
using Kokkos::Experimental::epsilon;
- auto const eps = epsilon<T>::value;
- auto const one = T(1);
+ T const eps = epsilon<T>::value;
+ T const one = 1;
// Avoid higher precision intermediate representation
compare() = one + eps;
e += (int)!(compare() != one);
diff --git a/cmake/modules/FindBLIS.cmake b/cmake/modules/FindBLIS.cmake
index 3d6fb5d..2577598 100644
--- a/cmake/modules/FindBLIS.cmake
+++ b/cmake/modules/FindBLIS.cmake
@@ -52,7 +52,7 @@ endif()
find_library(
BLIS_LIBRARIES
- NAMES "blis"
+ NAMES "blis-mt" "blis"
HINTS ${_BLIS_PATHS}
PATH_SUFFIXES "blis/lib" "blis/lib64" "blis"
)
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack_repo.builtin.build_systems.cmake import CMakePackage
from spack.package import *
class Spla(CMakePackage):
"""Specialized Parallel Linear Algebra, providing distributed GEMM
functionality for specific matrix distributions with optional GPU
acceleration."""
homepage = "https://github.com/eth-cscs/spla"
url = "https://github.com/eth-cscs/spla/archive/v1.0.0.tar.gz"
git = "https://github.com/eth-cscs/spla.git"
maintainers("AdhocMan", "haampie")
license("BSD-3-Clause")
version("1.6.1", sha256="62b51e6ce05c41cfc1c6f6600410f9549a209c50f0331e1db41047f94493e02f")
version("1.6.0", sha256="917c24e2a768499967eba47b2cc2475df9fabee327b7821d24970b6a08055c09")
version("1.5.5", sha256="bc0c366e228344b1b2df55b9ce750d73c1165380e512da5a04d471db126d66ce")
version("1.5.4", sha256="de30e427d24c741e2e4fcae3d7668162056ac2574afed6522c0bb49d6f1d0f79")
version("1.5.3", sha256="527c06e316ce46ec87309a16bfa4138b1abad23fd276fe789c78a2de84f05637")
version("1.5.2", sha256="344c34986dfae182ec2e1eb539c9a57f75683aaa7a61a024fd0c594d81d97016")
version("1.5.1", sha256="2021a30b7cbb10bd660e5d94e1cc7bc6a428c87ea507e09d1e57e455685da421")
version("1.5.0", sha256="bea782d46ce615e1c40efc2bfb19d95e3b59f332fc9ca83ac7e6684b8ac2dd93")
version("1.4.0", sha256="364a9fe759fddec8a0839cf79f1cf0619fc36f4d4c15f1c2b1f437249d7840c6")
version("1.3.0", sha256="ff05a22bd655607ff941f3228ac8605a813e1eec6eaa49fbcf7b58a3a4cf5f00")
version("1.2.1", sha256="4d7237f752dc6257778c84ee19c9635072b1cb8ce8d9ab6e34a047f63a736b29")
version("1.2.0", sha256="96ddd13c155ef3d7e40f87a982cdb439cf9e720523e66b6d20125d346ffe8fca")
version("1.1.1", sha256="907c374d9c53b21b9f67ce648e7b2b09c320db234a1013d3f05919cd93c95a4b")
version("1.1.0", sha256="b0c4ebe4988abc2b3434e6c50e7eb0612f3f401bc1aa79ad58a6a92dc87fa65b")
version("1.0.0", sha256="a0eb269b84d7525b223dc650de12170bba30fbb3ae4f93eb2b5cbdce335e4da1")
version("develop", branch="develop")
version("master", branch="master")
variant("openmp", default=True, when="@:1.5.5", description="Build with OpenMP support")
variant("static", default=False, description="Build as static library")
variant("cuda", default=False, description="CUDA backend")
variant("rocm", default=False, description="ROCm backend")
variant("fortran", default=False, description="Build fortran module")
conflicts("+cuda", when="+rocm", msg="+cuda and +rocm are mutually exclusive")
conflicts(
"%gcc@13.0:",
when="@1.5.0:1.5.4",
msg="Version 1.5.0 to 1.5.4 is not compatible with GCC 13 and later.",
)
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("mpi")
depends_on("blas")
depends_on("cmake@3.10:", type="build")
depends_on("cmake@3.18:", type="build", when="@1.6.0:")
depends_on("cuda", when="+cuda")
depends_on("cuda@11:", when="@1.6.0: +cuda")
depends_on("llvm", when="+rocm")
depends_on("hip", when="+rocm")
depends_on("rocblas", when="+rocm")
conflicts("^rocblas@6.0.0:", when="@:1.5.5 +rocm")
conflicts("^hip@6.0.0:", when="@:1.6.0 +rocm") # v1.6.1 includes fix for hip 6.0
# Propagate openmp to blas
with when("+openmp"):
requires("^openblas threads=openmp", when="^[virtuals=blas] openblas")
requires("^amdblis threads=openmp", when="^[virtuals=blas] amdblis")
requires("^blis threads=openmp", when="^[virtuals=blas] blis")
requires("^intel-oneapi-mkl threads=openmp", when="^[virtuals=blas] intel-oneapi-mkl")
# Fix CMake find module for AMD BLIS,
# which uses a different library name for the multi-threaded version
patch("0001-amd_blis.patch", when="@1.3.0:1.4.0 ^amdblis")
def cmake_args(self):
spec = self.spec
args = [
self.define_from_variant("SPLA_FORTRAN", "fortran"),
self.define_from_variant("SPLA_STATIC", "static"),
]
if "+cuda" in spec:
args += ["-DSPLA_GPU_BACKEND=CUDA"]
elif "+rocm" in spec:
args += ["-DSPLA_GPU_BACKEND=ROCM"]
llvm_clang_include_dirs = find(spec["llvm"].prefix, "__clang_cuda_runtime_wrapper.h")
args.append(
"-DCLANG_INCLUDE_PATH:String={0}".format(os.path.dirname(llvm_clang_include_dirs[0]))
)
else:
args += ["-DSPLA_GPU_BACKEND=OFF"]
# v1.6.0: No longer has custom BLAS detection and only uses the FindBLAS CMake module.
if spec.satisfies("@:1.5.5"):
args += [self.define_from_variant("SPLA_OMP", "openmp")]
if spec["blas"].name == "openblas":
args += ["-DSPLA_HOST_BLAS=OPENBLAS"]
elif spec["blas"].name in ["amdblis", "blis"]:
args += ["-DSPLA_HOST_BLAS=BLIS"]
elif spec["blas"].name == "atlas":
args += ["-DSPLA_HOST_BLAS=ATLAS"]
elif spec["blas"].name == "intel-oneapi-mkl":
args += ["-DSPLA_HOST_BLAS=MKL"]
elif spec["blas"].name == "netlib-lapack":
args += ["-DSPLA_HOST_BLAS=GENERIC"]
elif spec["blas"].name == "cray-libsci":
args += ["-DSPLA_HOST_BLAS=CRAY_LIBSCI"]
else:
args += [self.define("BLAS_LIBRARIES", spec["blas"].libs.joined(";"))]
return args
repo:
namespace: 'hygon.tsoc'
api: v2.4
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment