forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from mkandes/sdsc-0.17.3-gh-86-pkg-spec-pyscf
Add [email protected] % [email protected] to expanse/0.17.3/cpu/b
- Loading branch information
Showing
2 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
etc/spack/sdsc/expanse/0.17.3/cpu/b/specs/[email protected]/[email protected]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/usr/bin/env bash | ||
|
||
#SBATCH [email protected] | ||
#SBATCH --account=use300 | ||
#SBATCH --reservation=root_73 | ||
#SBATCH --partition=ind-shared | ||
#SBATCH --nodes=1 | ||
#SBATCH --ntasks-per-node=1 | ||
#SBATCH --cpus-per-task=16 | ||
#SBATCH --mem=32G | ||
#SBATCH --time=02:00:00 | ||
#SBATCH --output=%x.o%j.%N | ||
|
||
declare -xr LOCAL_TIME="$(date +'%Y%m%dT%H%M%S%z')" | ||
declare -xir UNIX_TIME="$(date +'%s')" | ||
|
||
declare -xr LOCAL_SCRATCH_DIR="/scratch/${USER}/job_${SLURM_JOB_ID}" | ||
declare -xr TMPDIR="${LOCAL_SCRATCH_DIR}" | ||
|
||
declare -xr SYSTEM_NAME='expanse' | ||
|
||
declare -xr SPACK_VERSION='0.17.3' | ||
declare -xr SPACK_INSTANCE_NAME='cpu' | ||
declare -xr SPACK_INSTANCE_VERSION='b' | ||
declare -xr SPACK_INSTANCE_DIR="/cm/shared/apps/spack/${SPACK_VERSION}/${SPACK_INSTANCE_NAME}/${SPACK_INSTANCE_VERSION}" | ||
|
||
declare -xr SLURM_JOB_SCRIPT="$(scontrol show job ${SLURM_JOB_ID} | awk -F= '/Command=/{print $2}')" | ||
declare -xr SLURM_JOB_MD5SUM="$(md5sum ${SLURM_JOB_SCRIPT})" | ||
|
||
declare -xr SCHEDULER_MODULE='slurm' | ||
|
||
echo "${UNIX_TIME} ${SLURM_JOB_ID} ${SLURM_JOB_MD5SUM} ${SLURM_JOB_DEPENDENCY}" | ||
echo "" | ||
|
||
cat "${SLURM_JOB_SCRIPT}" | ||
|
||
module purge | ||
module load "${SCHEDULER_MODULE}" | ||
module list | ||
. "${SPACK_INSTANCE_DIR}/share/spack/setup-env.sh" | ||
shopt -s expand_aliases | ||
source ~/.bashrc | ||
|
||
declare -xr SPACK_PACKAGE='[email protected]' | ||
declare -xr SPACK_COMPILER='[email protected]' | ||
declare -xr SPACK_VARIANTS='' | ||
declare -xr SPACK_DEPENDENCIES="^[email protected]/$(spack find --format '{hash:7}' [email protected] % ${SPACK_COMPILER} ~mpi) ^[email protected]/$(spack find --format '{hash:7}' [email protected] % ${SPACK_COMPILER})" | ||
declare -xr SPACK_SPEC="${SPACK_PACKAGE} % ${SPACK_COMPILER} ${SPACK_VARIANTS} ${SPACK_DEPENDENCIES}" | ||
|
||
printenv | ||
|
||
spack config get compilers | ||
spack config get config | ||
spack config get mirrors | ||
spack config get modules | ||
spack config get packages | ||
spack config get repos | ||
spack config get upstreams | ||
|
||
time -p spack spec --long --namespaces --types --reuse "${SPACK_SPEC}" | ||
if [[ "${?}" -ne 0 ]]; then | ||
echo 'ERROR: spack concretization failed.' | ||
exit 1 | ||
fi | ||
|
||
time -p spack install --jobs "${SLURM_CPUS_PER_TASK}" --fail-fast --yes-to-all --reuse "${SPACK_SPEC}" | ||
if [[ "${?}" -ne 0 ]]; then | ||
echo 'ERROR: spack install failed.' | ||
exit 1 | ||
fi | ||
|
||
spack module lmod refresh --delete-tree -y | ||
|
||
#sbatch --dependency="afterok:${SLURM_JOB_ID}" '[email protected]' | ||
|
||
sleep 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Copyright 2013-2023 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 PyPyscf(PythonPackage): | ||
"""PySCF is a collection of electronic structure programs powered | ||
by Python.""" | ||
|
||
homepage = "https://pyscf.org" | ||
pypi = "pyscf/pyscf-2.2.0.tar.gz" | ||
|
||
#maintainers("naromero77") | ||
|
||
version("2.2.0", sha256="8f65042cf7e86aa5088756988eb90418befcd18f07a6b8c597229a5f2ba4f644") | ||
version("2.1.1", sha256="608442171f5db106b02a95c878c65798fbbd87dc0ce50551a2e081e7d206adb0") | ||
version("2.1.0", sha256="45feecc9c9a0ce18dee73c5b178fb0faa3f0c0d3dd5f98b48dc2370c9e13d05b") | ||
version("2.0.1", sha256="b2f00330f98edf7c5b8272904fc11ca74f4677219ba6468aaa7154580efd9edd") | ||
version("1.7.5", sha256="52856b39f0ada2f6340757caa65dc5c1d9a3cdfceea2a6615ad8af92664a6c69") | ||
version("1.7.3", sha256="62a26146a222140395b276ea33182f87809a21989ddcf78e2dcb8e35ebc57af2") | ||
|
||
# dependencies | ||
depends_on("[email protected]:", type="build", when="@2.1:") | ||
depends_on("[email protected]:", type="build") | ||
depends_on("[email protected]:", type=("build", "run"), when="@2.1:") | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("py-setuptools", type="build") | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run"), when="@2:") | ||
conflicts("^[email protected]:1.17", when="@2:") | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run"), when="@2.1:") | ||
depends_on("py-scipy@:1.1.0", when="^python@:3.7 platform=darwin", type=("build", "run")) | ||
conflicts("^[email protected]:1.5.1", when="@2:") | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run"), when="@2:") | ||
depends_on("blas") | ||
depends_on("libcint+coulomb_erf+f12") | ||
depends_on("libxc") | ||
depends_on("xcfun") | ||
|
||
def setup_build_environment(self, env): | ||
# Tell PSCF where supporting libraries are located." | ||
spec = self.spec | ||
|
||
pyscf_search_dir = [] | ||
pyscf_search_dir.append(spec["blas"].prefix) | ||
pyscf_search_dir.append(spec["libcint"].prefix) | ||
pyscf_search_dir.append(spec["libcint"].prefix.lib64) | ||
pyscf_search_dir.append(spec["libxc"].prefix) | ||
pyscf_search_dir.append(spec["xcfun"].prefix) | ||
pyscf_search_dir.append(spec["xcfun"].prefix.include.XCFun) | ||
|
||
env.set("PYSCF_INC_DIR", ":".join(pyscf_search_dir)) |