Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build helper, take 2 #3021

Merged
merged 89 commits into from Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
3e06d03
loud pcm
loriab May 28, 2023
04db56b
fix plugin doccpi_
loriab Jun 23, 2023
3d643a8
build stuff
loriab Jul 26, 2023
b2181c8
more
loriab Jul 26, 2023
0fcd561
full linux
loriab Aug 9, 2023
f2f0704
patchup
loriab Aug 9, 2023
4b04ad6
more cmake vars, ipi, gdma manual
loriab Aug 11, 2023
6f1e3b6
better output notation
loriab Nov 4, 2023
5dac4ab
start ecosys
loriab Nov 4, 2023
f2833bf
d4
loriab Nov 4, 2023
208b72a
pyyaml
loriab Nov 4, 2023
32a6e36
offline conda
loriab Nov 5, 2023
cdfdfae
other arch
loriab Nov 5, 2023
b47c1c8
another
loriab Nov 5, 2023
6ac31fc
iter
loriab Nov 6, 2023
5e2f3ef
iter 2
loriab Nov 6, 2023
9689137
iter 3
loriab Nov 6, 2023
a9403f7
iter 4
loriab Nov 6, 2023
2a9f623
iter 5
loriab Nov 6, 2023
b46cc72
iter 6
loriab Nov 6, 2023
f1d8d2a
iter 7
loriab Nov 6, 2023
ffd69d2
iter 8
loriab Nov 6, 2023
cb12747
iter 9
loriab Nov 6, 2023
2f2980c
iter 10
loriab Nov 6, 2023
bae3070
iter 11
loriab Nov 6, 2023
4e4c954
iter 12
loriab Nov 6, 2023
d624964
iter 13
loriab Nov 6, 2023
99aeb2f
iter 14
loriab Nov 6, 2023
e02acc6
iter 15
loriab Nov 7, 2023
1788504
iter 16
loriab Nov 7, 2023
d6d7d5b
iter 17
loriab Nov 7, 2023
f02f4af
iter 18
loriab Nov 7, 2023
e15664c
iter 19
loriab Nov 7, 2023
d83c560
iter 20
loriab Nov 7, 2023
462cf28
iter 21
loriab Nov 7, 2023
5af6a4f
iter 22
loriab Nov 8, 2023
db6f973
iter 23
loriab Nov 8, 2023
2af2d80
iter 24
loriab Nov 8, 2023
d34b467
iter 25
loriab Nov 8, 2023
aa3c7cf
iter 26
loriab Nov 8, 2023
8288225
iter 27
loriab Nov 8, 2023
7a3b8ca
iter 28
loriab Nov 8, 2023
5b810ee
iter 29
loriab Nov 8, 2023
acba99a
iter 30
loriab Nov 8, 2023
2349683
init 31
loriab Nov 8, 2023
aab6182
init 32
loriab Nov 8, 2023
893213b
init 33
loriab Nov 8, 2023
7c1301c
init 34
loriab Nov 8, 2023
7f3d4a8
init 35
loriab Nov 8, 2023
7e4ebd0
init 36
loriab Nov 8, 2023
3b81f73
init 37
loriab Nov 8, 2023
6bbcdbf
init 38
loriab Nov 8, 2023
48944f3
init 39
loriab Nov 9, 2023
c3154f3
init 40
loriab Nov 9, 2023
df5f2ca
init 41
loriab Nov 9, 2023
f69e5e9
init 42
loriab Nov 9, 2023
90e76d7
init 43
loriab Nov 9, 2023
ab80356
iter 44
loriab Nov 9, 2023
b3ec03e
iter 45
loriab Nov 9, 2023
f79019c
iter 46
loriab Nov 9, 2023
9fec70e
iter 47
loriab Nov 9, 2023
cdd06f1
iter 48
loriab Nov 9, 2023
0803480
iter 49
loriab Nov 9, 2023
b16a9d5
iter 50
loriab Nov 9, 2023
0f0ffa3
iter 51
loriab Nov 9, 2023
ed4fc00
iter 52
loriab Nov 9, 2023
68a3efe
iter 53
loriab Nov 10, 2023
05d8059
Merge branch 'master' into interim_misc_July2023_rb1
loriab Nov 10, 2023
a03ca11
iter 54
loriab Nov 10, 2023
eab2d09
iter 55
loriab Nov 10, 2023
d242cf9
iter 56
loriab Nov 10, 2023
5653f5c
iter 57
loriab Nov 10, 2023
9caeed1
iter 58
loriab Nov 10, 2023
ab39c21
iter 59 mac
loriab Nov 11, 2023
060363b
iter 60
loriab Nov 11, 2023
c0b46ee
iter 61
loriab Nov 11, 2023
3256cb8
iter 62
loriab Nov 11, 2023
9c26874
iter 63
loriab Nov 11, 2023
59cdc2d
iter 64
loriab Nov 12, 2023
709978c
iter 65
loriab Nov 12, 2023
3e73200
iter 66
loriab Nov 12, 2023
ede9c1e
iter 67
loriab Nov 12, 2023
8421e67
iter 68
loriab Nov 12, 2023
535e80d
iter 69
loriab Nov 12, 2023
729788d
iter 70
loriab Nov 13, 2023
4302e92
iter 71
loriab Nov 13, 2023
9534120
info from group debugging
loriab Nov 16, 2023
937ae74
Update run_psi4.py
loriab Nov 22, 2023
7f1bc88
Update azure-pipelines-linux.yml
loriab Nov 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
88 changes: 42 additions & 46 deletions .azure-pipelines/azure-pipelines-linux.yml
Expand Up @@ -17,6 +17,7 @@ jobs:
BUILD_TYPE: 'release'
APT_INSTALL: 'gfortran gcc-7 g++-7'
vmImage: 'ubuntu-20.04'
PYTEST_MARKER_EXPR: "quick"

gcc_latest:
CXX_COMPILER: 'g++'
Expand All @@ -25,7 +26,8 @@ jobs:
F_COMPILER: 'gfortran'
BUILD_TYPE: 'release'
APT_INSTALL: 'gfortran'
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-latest'
PYTEST_MARKER_EXPR: 'api and not stdsuite and not (smoke or quick or medlong or long)'

clang_latest:
CXX_COMPILER: 'clang++'
Expand All @@ -35,6 +37,7 @@ jobs:
BUILD_TYPE: 'release'
APT_INSTALL: 'gfortran clang-6.0'
vmImage: 'ubuntu-20.04'
PYTEST_MARKER_EXPR: 'cli and not (smoke or quick or medlong or long)'

pool:
vmImage: $(vmImage)
Expand Down Expand Up @@ -79,61 +82,54 @@ jobs:
- bash: |
echo "##vso[task.prependpath]$CONDA/bin"
conda config --set always_yes yes
conda config --set solver libmamba
displayName: "Add Conda to PATH"

- bash: |
conda create -q \
-n p4env \
python=$PYTHON_VER \
psi4/label/dev::gau2grid \
psi4/label/testing::libint2=2.7.2=h2fe1556_0 \
psi4/label/dev::libxc=5 \
psi4/label/dev::dftd3 \
psi4/label/dev::gcp \
psi4/label/dev::pybind11-headers \
blas=*=mkl \
mkl-include \
networkx \
conda-forge::pytest>=7.0.1 \
eigen \
libboost-headers \
conda-forge::pytest-xdist \
msgpack-python \
conda-forge::qcelemental \
conda-forge::qcengine \
conda-forge::optking \
scipy
conda install pyyaml -c conda-forge
conda/psi4-path-advisor.py \
env \
--name p4env \
--python $PYTHON_VER \
--disable compilers addons docs
echo "\n<<< env_p4env.yaml >>>\n"
cat env_p4env.yaml
# test some alternative packages
if [[ "${PYTHON_VER}" != "3.12" ]]; then
echo " - psi4::gcp" >> env_p4env.yaml
echo " - psi4::dftd3" >> env_p4env.yaml
fi
sed -i "s;- libxc-c;- psi4::libxc=5;g" env_p4env.yaml
sed -i "s;- conda-forge/label/libint_dev;#- conda-forge/label/libint_dev;g" env_p4env.yaml
sed -i "s;#- psi4/label/testing::libint2;- psi4/label/testing::libint2;g" env_p4env.yaml
echo "\n<<< env_p4env.yaml >>>\n"
cat env_p4env.yaml
conda env create -n p4env -f env_p4env.yaml
source activate p4env
which python
conda info
conda list
displayName: 'Build Environment'

- bash: |
source activate p4env
python -V
python -c 'import numpy; print(numpy.version.version)'
export CXX=${CXX_COMPILER}
export CC=${C_COMPILER}
export FC=${F_COMPILER}
# * can't use conda dist of the more complicated lib pkgs (e.g., CheMPS2, PCMSolver, v2rdm)
# b/c their c++ symbols don't mix with the different Travis compilers. for other
# reasons, pkgs are being compiled less statically, sad for CI.
# * can't enable trivial plugins b/c no psi4 for them to detect at start (e.g., snsmp2)
cmake -Bbuild -S. \
-DCMAKE_CXX_COMPILER=${CXX_COMPILER} \
-DCMAKE_C_COMPILER=${C_COMPILER} \
-DCMAKE_Fortran_COMPILER=${F_COMPILER} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DMAX_AM_ERI=5 \
-DCMAKE_PREFIX_PATH=${CONDA}/envs/p4env \
-DPython_EXECUTABLE="${CONDA}/envs/p4env/bin/python" \
-DMPFR_ROOT=${CONDA}/envs/p4env \
-DCMAKE_INSIST_FIND_PACKAGE_gau2grid=ON \
-DCMAKE_INSIST_FIND_PACKAGE_Libint2=ON \
-DCMAKE_INSIST_FIND_PACKAGE_Libxc=ON \
-DENABLE_PLUGIN_TESTING=ON \
-DBUILD_Libint2_GENERATOR=OFF \
-DCMAKE_INSTALL_PREFIX=$(Agent.BuildDirectory)/Install
conda/psi4-path-advisor.py \
cmake \
--objdir build \
--insist
echo "\n<<< cache_p4env@build.cmake >>>\n"
cat cache_p4env@build.cmake
cmake \
-S. \
-B build \
-C $(Build.SourcesDirectory)/cache_p4env@build.cmake \
-D CMAKE_CXX_COMPILER=${CXX_COMPILER} \
-D CMAKE_C_COMPILER=${C_COMPILER} \
-D CMAKE_Fortran_COMPILER=${F_COMPILER} \
-D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
-D ENABLE_PLUGIN_TESTING=ON \
-D CMAKE_INSTALL_PREFIX=$(Agent.BuildDirectory)/Install
displayName: 'Configure Build'

- bash: |
Expand All @@ -160,5 +156,5 @@ jobs:
- bash: |
cd build
source activate p4env
PYTHONPATH=stage/lib/ pytest -v -rws --durations=15 -n 2 -m 'quick' stage/lib/psi4/tests/
PYTHONPATH=stage/lib/ pytest -v -rws --durations=15 --durations-min=40 --strict-markers --color yes -n 2 -m "$PYTEST_MARKER_EXPR" stage/lib/psi4/tests/
displayName: 'PyTest Tests'
3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-windows.yml
Expand Up @@ -107,11 +107,13 @@ jobs:

# Configure Miniconda
# conda config --append channels conda-forge
# conda=23.10 forced a bugfix at conda-build stage
- script: |
conda config --set always_yes yes
conda config --add channels conda-forge/label/libint_dev
conda config --set channel_priority strict
conda config --set solver libmamba
conda install conda=23.10 -n base -c conda-forge
conda info
conda list
displayName: "Configure Miniconda"
Expand All @@ -123,6 +125,7 @@ jobs:
conda install cmake ^
anaconda-project ^
conda-build ^
m2-sed ^
eigen ^
libboost-headers ^
conda-verify ^
Expand Down
75 changes: 46 additions & 29 deletions .github/workflows/docs-pr.yml
Expand Up @@ -7,8 +7,13 @@ on:
jobs:

docs:
runs-on: ubuntu-latest
strategy:
matrix:
cfg:
- runs-on: ubuntu-latest
python-version: "3.10"
name: Propose Docs
runs-on: ${{ matrix.cfg.runs-on }}
defaults:
run:
shell: bash -l {0}
Expand All @@ -31,17 +36,37 @@ jobs:
path: docs
ref: master

- name: Write Conda environment files
run: |
echo "::group::Prepare OS Python"
which python
python --version
pip install PyYAML
echo "::endgroup::"
#
code/conda/psi4-path-advisor.py \
env \
--name p4docs \
--python ${{ matrix.cfg.python-version }} \
--disable addons \
--offline-conda
#
echo "::group::View Env Spec File for Conda"
printf "\n<<< env_p4docs.yaml >>>\n"
pygmentize -g -O style=friendly,linenos=1 env_p4docs.yaml
echo "::endgroup::"

- name: Create Conda Environment
if: ${{ github.repository == 'psi4/psi4' }}
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
use-mamba: true
activate-environment: test
activate-environment: p4docs
add-pip-as-python-dependency: true
auto-activate-base: false
channels: conda-forge
environment-file: code/devtools/conda-envs/docs-cf.yaml
environment-file: env_p4docs.yaml
show-channel-urls: true

- name: Environment Information
Expand All @@ -51,47 +76,39 @@ jobs:
conda list
which conda python cmake $CXX

# This patch and the jinja2<3 restriction were needed as recently as March 2023, but when I try a py311 env with newest everything, both can be released.
#- name: Patch Sphinx for Pybind11
# if: ${{ github.repository == 'psi4/psi4' }}
# run: sed -i "s/app\.add_autodoc_attrgetter/# app.add_autodoc_attrgetter/g" ${CONDA_PREFIX}/lib/python3.10/site-packages/sphinx_automodapi/autodoc_enhancements.py

# docs are not Ninja ready
# docs are finally Ninja ready
- name: Configure with CMake (Conda Gnu + MKL)
if: ${{ github.repository == 'psi4/psi4' }}
working-directory: ./code
run: |
conda/psi4-path-advisor.py \
cache \
--objdir objdir \
--insist
echo "::group::View Cache File for CMake"
printf "\n<<< cache_p4docs@objdir.cmake >>>\n"
pygmentize -g -O style=colorful,linenos=1 cache_p4docs@objdir.cmake
echo "::endgroup::"
#
cmake \
-S. \
-Bobjdir \
-G"Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=${CC} \
-DCMAKE_CXX_COMPILER=${CXX} \
-DCMAKE_CXX_FLAGS="-O0" \
-DCMAKE_PREFIX_PATH="${CONDA_PREFIX}" \
-DCMAKE_INSIST_FIND_PACKAGE_gau2grid=ON \
-DCMAKE_INSIST_FIND_PACKAGE_Libint2=ON \
-DCMAKE_INSIST_FIND_PACKAGE_pybind11=ON \
-DCMAKE_INSIST_FIND_PACKAGE_Libxc=ON \
-DENABLE_ecpint=ON \
-DCMAKE_INSIST_FIND_PACKAGE_ecpint=ON \
-DCMAKE_INSIST_FIND_PACKAGE_optking=ON \
-DCMAKE_INSIST_FIND_PACKAGE_qcelemental=ON \
-DCMAKE_INSIST_FIND_PACKAGE_qcengine=ON \
-DSPHINXMAN_STRICT=ON \
-DSPHINX_ROOT=${CONDA_PREFIX}
-B objdir \
-G Ninja \
-C ${{ github.workspace }}/code/cache_p4docs@objdir.cmake \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_CXX_FLAGS="-O0" \
-D SPHINXMAN_STRICT=ON

- name: Compile Psi4
if: ${{ github.repository == 'psi4/psi4' }}
working-directory: ./code
run: cmake --build objdir -j`getconf _NPROCESSORS_ONLN`
run: cmake --build objdir

- name: Compile & Pack Docs
if: ${{ github.repository == 'psi4/psi4' }}
working-directory: ./code
run: |
cmake --build objdir --target sphinxman -j`getconf _NPROCESSORS_ONLN`
cmake --build objdir --target sphinxman
cd objdir/doc/sphinxman
tar -zcf sphinxman.tar.gz html/

Expand Down