Skip to content

Commit

Permalink
start ecosys
Browse files Browse the repository at this point in the history
  • Loading branch information
loriab committed Nov 4, 2023
1 parent d0bf8a2 commit 4e8ade7
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 26 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ecosystem.yml
Expand Up @@ -105,6 +105,13 @@ jobs:
#
# Buildtime (L, M, W)
#
conda/psi4-path-advisor.py env \
--lapack mkl \
--name p4build \
--python ${{ matrix.cfg.python-version }} \
--disable docs
printf "\n<<< env_p4build.yaml >>>\n"
cat env_p4build.yaml
cat > build.yaml <<EOF
name: baseenv
channels:
Expand Down Expand Up @@ -261,7 +268,7 @@ jobs:
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: baseenv
environment-file: build.yaml
environment-file: env_p4build.yaml
show-channel-urls: true
python-version: ${{ matrix.cfg.python-version }}
auto-activate-base: false
Expand Down Expand Up @@ -414,6 +421,7 @@ jobs:
# psi4 and base channel dependencies and addons. This is created at the same environment
# name (so same location on disk as the build env) for non-relocatability reasons.
- name: Runtime Conda environment(s)
if: false
run: |
echo "::group::Prepare Environment"
conda deactivate
Expand Down
41 changes: 37 additions & 4 deletions codedeps.yaml
Expand Up @@ -449,7 +449,7 @@ data:
constraint_note: "v2.7.3dev1 provides rt-switchable ordering (src) and derivative integrals (build)."
aux_build_names:
- //psi4/label/testing::libint2
- boost-cpp
- libboost-headers
- eigen
aux_build_names_note:
"//psi4/label/testing::libint2": "Optionally for linux-64, an AM=7 build is available here."
Expand Down Expand Up @@ -922,7 +922,7 @@ data:
- openfermion=1
- pydantic=1
aux_run_names_note:
- "openfermion=1": "Shouldn't need to specify but do for the pydantic transition."
"openfermion=1": "Shouldn't need to specify but do for the pydantic transition."
cmake: null
cmake_note: "Primarily OTF runtime detected."

Expand All @@ -938,7 +938,7 @@ data:
host: github
account: MolSSI
name: QCElemental
commit: v0.26.0
commit: v0.27.1
#cmake:
# name:
# constraint: ATLEAST 0.24.0
Expand Down Expand Up @@ -1128,7 +1128,7 @@ data:
host: github
account: MolSSI
name: QCEngine
commit: v0.27.0
commit: v0.29.0
#cmake:
# name: qcengine
# constraint: ATLEAST 0.26.0
Expand Down Expand Up @@ -1322,3 +1322,36 @@ data:
ENABLE_bse: true
cmake_note: "Primarily OTF runtime detected. With package present, CMake enabling only relevant for CTest."

- project: einsums
use:
added: 1.9
required: false
required_note: "Allow using the Einsums tensor library."
buildable: true
buildtime: true
cms: true
repository:
host: github
account: Einsums
name: Einsums
commit: v0.3
#cmake:
# name:
# constraint: 0.3
# target: Einsums::einsums
# components:
# ENABLE_Einsums
conda:
channel: conda-forge
name: einsums
constraint: "=*=mkl*"
aux_build_names:
- range-v3
- zlib
skip_win: true
cmake:
ENABLE_Einsums: true
Einsums_DIR: ${CONDA_PREFIX}/share/cmake/Einsums
//CMAKE_INSIST_FIND_PACKAGE_Einsums: true
//CMAKE_DISABLE_FIND_PACKAGE_Einsums: true

44 changes: 23 additions & 21 deletions conda/psi4-path-advisor.py
Expand Up @@ -306,7 +306,7 @@ def __add_whitespace(self, idx, iWSpace, text):
def _split_lines(self, text, width):
textRows = text.splitlines()
for idx,line in enumerate(textRows):
search = re.search('\s*[0-9\-]{0,}\.?\s*', line)
search = re.search(r'\s*[0-9\-]{0,}\.?\s*', line)
if line.strip() == "":
textRows[idx] = " "
elif search:
Expand All @@ -322,39 +322,40 @@ def _split_lines(self, text, width):
parser = argparse.ArgumentParser(
prog="psi4-path-advisor",
formatter_class=PreserveWhiteSpaceWrapRawTextHelpFormatter,
#description="""Build and Run path advisor for Psi4"
description="""Run env subcommand. Conda env create and activate. Run cmake subcommand. Build.
Run env subcommand. Conda env create and activate. Run cmake subcommand. Build.
#(Command Default) Generates a minimal CMake command for building Psi4 against
# this psi4-dev conda metapackage.
# <<< black-box usage (copy/paste-able)
# get code from GitHub
description="""Dependency, Build, and Run path advisor for Psi4.
Mediates file https://github.com/psi4/psi4/blob/master/codedeps.yaml
Run env subcommand. Conda env create and activate. Run cmake subcommand. Build.
# =======================================
# (A) black-box usage (copy/paste-able)
# =======================================
# (1) get code from GitHub
git clone https://github.com/psi4/psi4.git && cd psi4
# generate env spec file from codedeps.yaml. "eval $(...)" creates and activates conda env.
# (2) generate env spec file from codedeps.yaml. "eval $(...)" creates and activates conda env.
eval $(conda/psi4-path-advisor.py env)
# generate cmake cache file from conda env. "eval $(...)" configures and builds with cmake.
# (3) generate cmake cache file from conda env. "eval $(...)" configures and builds with cmake.
eval $(conda/psi4-path-advisor.py cmake)
shows up in p4dev
# <<< flexible usage
# get code from GitHub
# =======================================
# (B) flexible usage
# =======================================
# (1) get code from GitHub
git clone https://github.com/psi4/psi4.git && cd psi4
# generate env spec file from codedeps.yaml.
# (2) generate env spec file from codedeps.yaml.
conda/psi4-path-advisor.py env -n p4dev310 --python 3.10 --disable addons --lapack openblas
#> conda env create -n p4dev310 -f /home/psi4/env_p4dev310.yaml --solver libmamba && conda activate p4dev310
# edit env_p4dev310.yaml to customize software packages.
# issue suggested or customized command to create and activate conda env.
# (3) edit env_p4dev310.yaml to customize software packages.
# (4) issue suggested or customized command to create and activate conda env.
conda env create -n p4dev310 -f /home/psi4/env_p4dev310.yaml --solver libmamba && conda activate p4dev310
# generate cmake cache file from conda env.
# (5) generate cmake cache file from conda env.
./conda/psi4-path-advisor.py cmake
#> cmake -S. -GNinja -C/home/psi4/cache_p4dev310.cmake -Bobjdir_p4dev310 && cmake --build objdir_p4dev310
# edit cache_p4dev310.cmake to customize build configuration.
# issues suggested or customized command to configure and build with cmake.
# (6) edit cache_p4dev310.cmake to customize build configuration.
# (7) issue suggested or customized command to configure and build with cmake.
cmake -S. -GNinja -C/home/psi4/cache_p4dev310.cmake -Bobjdir_p4dev310 -DCMAKE_INSTALL_PREFIX=/path/to/install-psi4 && cmake --build objdir_p4dev310
conda/psi4-path-advisor.py env -n p4dev310 --python 3.10 --disable addons --lapack openblas
Expand Down Expand Up @@ -402,7 +403,8 @@ def _split_lines(self, text, width):
nargs="+",
choices=["compilers", "lapack", "addons", "test", "docs"],
help=f"""Categories of dependencies to not include in env file.
Can instead edit generated env spec file by hand.""")
Can instead edit generated env spec file by hand.
For example, '--disable compilers lapack addons test docs' for minimal.""")
parser_env.add_argument("--solver",
default="mamba-as-possible",
choices=solver_choices,
Expand Down

0 comments on commit 4e8ade7

Please sign in to comment.