Skip to content

Commit

Permalink
update uberenv and related configs (#1164)
Browse files Browse the repository at this point in the history
* wip: update uberenv and related configs

* add missing file

* update to use ub with fix

* fix editor undermine

* recipe woes, try newer spack (bleeding edge)

* avoid system hdf5

* fix for mult externals

* build the world

* no more python 2 :-( back to spack v0.21.0 release

* fix for more complex specs

* try python view path fix

* updates

* path fix

* spack build mpi is sad

* typo

* fix

* one bite at a time

* docker recipe fix

* python path fix needed for standalone

* ...

* docker use spack env file (spack built mpi does not work)

* ub env use external lapack

* yaml vs cyrus

* docs updates

* more docs updates

* fix config

* side quest to get docs working

* upate

* different strategy

* add new cfg

* heal rtd settings

* updates

* update uberenv

* fix ci test python path loc

* more path adj

* more fun
  • Loading branch information
cyrush committed Nov 8, 2023
1 parent 77ccff2 commit 972d627
Show file tree
Hide file tree
Showing 51 changed files with 110 additions and 5,238 deletions.
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ sphinx:
python:
install:
- requirements: src/docs/sphinx/requirements.txt

26 changes: 7 additions & 19 deletions .uberenv_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,12 @@
"spack_build_mode" : "uberenv-pkg",
"spack_configs_path": "scripts/uberenv_configs/spack_configs",
"spack_packages_path": "scripts/uberenv_configs/packages",
"spack_skip_externals": "true",
"spack_url": "https://github.com/spack/spack",
"spack_commit": "6983d520fa64d8c7343dcc627197b0e6c621d1a6",
"spack_activate" : {"py-numpy" : ["+python"],
"py-sphinx": ["+python","+doc"],
"py-docutils": ["+python","+doc"],
"py-pygments": ["+python","+doc"],
"py-babel": ["+python","+doc"],
"py-jinja2": ["+python","+doc"],
"py-packaging": ["+python","+doc"],
"py-snowballstemmer": ["+python","+doc"],
"py-imagesize": ["+python","+doc"],
"py-sphinxcontrib-htmlhelp": ["+python","+doc"],
"py-sphinxcontrib-serializinghtml": ["+python","+doc"],
"py-sphinxcontrib-applehelp": ["+python","+doc"],
"py-sphinxcontrib-devhelp": ["+python","+doc"],
"py-sphinxcontrib-qthelp": ["+python","+doc"],
"py-alabaster": ["+python","+doc"],
"py-requests": ["+python","+doc"],
"py-mpi4py" : ["+python", "+mpi"],
"py-sphinx-rtd-theme": ["+python","+doc"] }
"spack_commit": "6812713cf470b473a607f0de0e8e1cf53f804fb7",
"spack_host_config_patches":
{
"PYTHON_EXECUTABLE": "spack_view/bin/python3",
"SPHINX_EXECUTABLE": "spack_view/bin/sphinx-build"
}
}
82 changes: 23 additions & 59 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,40 +79,11 @@ stages:
ENABLE_ADIOS: OFF
ENABLE_PARMETIS: OFF
ENABLE_PYTHON: OFF
ENABLE_PYTHON2: OFF
CMAKE_VERSION: 3.14.2
BLT_CXX_STD: c++11
BLT_ENABLE_FIND_MPI: ON

ub_18_shared_py27_cmake_3_14:
containerImage: ${{ variables.ubuntu_18_tag }}
COMPILER_CC: gcc
COMPILER_CXX: g++
COMPILER_FC: gfortran
COMPILER_SPEC: gcc
FORCE_COMPILERS: OFF
BUILD_SHARED_LIBS: ON
CMAKE_BUILD_TYPE: Debug
ENABLE_COVERAGE: ON
ENABLE_MPI: ON
ENABLE_DOCS: OFF
ENABLE_RELAY_WEBSERVER: ON
ENABLE_OPENMP: ON
ENABLE_HDF5: ON
ENABLE_HDF5_COMPAT: ON
HDF5_SPEC: "hdf5~mpi"
ENABLE_SILO: ON
ENABLE_ADIOS: OFF
ENABLE_PYTHON: ON
ENABLE_PARMETIS: ON
ENABLE_PYTHON2: ON
PYTHON2_CONSTRAINTS: " ^py-setuptools@44.1.0 ^py-numpy@1.16.5"
PYTHON_VERSION: 2.7.18
CMAKE_VERSION: 3.14.2
BLT_CXX_STD: c++11
BLT_ENABLE_FIND_MPI: ON

ub_18_static_py27_cmake_3_14:
ub_18_static_py37_cmake_3_14:
containerImage: ${{ variables.ubuntu_18_tag }}
COMPILER_CC: gcc
COMPILER_CXX: g++
Expand All @@ -133,9 +104,7 @@ stages:
ENABLE_ADIOS: OFF
ENABLE_PARMETIS: ON
ENABLE_PYTHON: ON
ENABLE_PYTHON2: ON
PYTHON2_CONSTRAINTS: " ^py-setuptools@44.1.0 ^py-numpy@1.16.5"
PYTHON_VERSION: 2.7.18
PYTHON_VERSION: 3.7.16
CMAKE_VERSION: 3.14.2
BLT_CXX_STD: c++11
BLT_ENABLE_FIND_MPI: ON
Expand All @@ -161,8 +130,7 @@ stages:
ENABLE_ADIOS: OFF
ENABLE_PARMETIS: ON
ENABLE_PYTHON: ON
ENABLE_PYTHON2: OFF
PYTHON_VERSION: 3.7.6
PYTHON_VERSION: 3.7.16
CMAKE_VERSION: 3.14.2
BLT_CXX_STD: c++11
BLT_ENABLE_FIND_MPI: ON
Expand All @@ -188,8 +156,7 @@ stages:
ENABLE_ADIOS: OFF
ENABLE_PARMETIS: ON
ENABLE_PYTHON: ON
ENABLE_PYTHON2: OFF
PYTHON_VERSION: 3.8.8
PYTHON_VERSION: 3.8.16
CMAKE_VERSION: 3.21.1
BLT_CXX_STD: c++11
BLT_ENABLE_FIND_MPI: ON
Expand All @@ -215,8 +182,7 @@ stages:
ENABLE_ADIOS: OFF
ENABLE_PARMETIS: ON
ENABLE_PYTHON: ON
ENABLE_PYTHON2: OFF
PYTHON_VERSION: 3.8.8
PYTHON_VERSION: 3.8.16
CMAKE_VERSION: 3.21.1
BLT_CXX_STD: c++11
BLT_ENABLE_FIND_MPI: ON
Expand Down Expand Up @@ -244,8 +210,7 @@ stages:
ENABLE_ADIOS: OFF
ENABLE_PARMETIS: ON
ENABLE_PYTHON: ON
ENABLE_PYTHON2: OFF
PYTHON_VERSION: 3.8.8
PYTHON_VERSION: 3.8.16
CMAKE_VERSION: 3.20.0
BLT_CXX_STD: c++11
BLT_ENABLE_FIND_MPI: ON
Expand Down Expand Up @@ -273,8 +238,7 @@ stages:
ENABLE_ADIOS: OFF
ENABLE_PARMETIS: ON
ENABLE_PYTHON: ON
ENABLE_PYTHON2: OFF
PYTHON_VERSION: 3.10.6
PYTHON_VERSION: 3.10.10
CMAKE_VERSION: 3.24.2
BLT_CXX_STD: c++11
BLT_ENABLE_FIND_MPI: ON
Expand Down Expand Up @@ -302,8 +266,7 @@ stages:
ENABLE_ADIOS: OFF
ENABLE_PARMETIS: ON
ENABLE_PYTHON: ON
ENABLE_PYTHON2: OFF
PYTHON_VERSION: 3.10.6
PYTHON_VERSION: 3.10.10
CMAKE_VERSION: 3.26.0
BLT_CXX_STD: c++11
BLT_ENABLE_FIND_MPI: ON
Expand Down Expand Up @@ -332,7 +295,6 @@ stages:
# ENABLE_ADIOS: OFF
# ENABLE_PARMETIS: ON
# ENABLE_PYTHON: ON
# ENABLE_PYTHON2: OFF
# PYTHON_VERSION: 3.11.2
# CMAKE_VERSION: 3.26.0
# BLT_CXX_STD: c++11
Expand Down Expand Up @@ -383,8 +345,7 @@ stages:
ENABLE_ADIOS: OFF
ENABLE_PARMETIS: ON
ENABLE_PYTHON: ON
ENABLE_PYTHON2: OFF
PYTHON_VERSION: 3.8.8
PYTHON_VERSION: 3.8.16
CMAKE_VERSION: 3.21.1
BLT_CXX_STD: c++11
BLT_ENABLE_FIND_MPI: ON
Expand Down Expand Up @@ -443,7 +404,6 @@ stages:
export SPACK_SPEC="${SPACK_SPEC} ^cmake@${CMAKE_VERSION}"
# python constraints
if [ $ENABLE_PYTHON = 'ON' ]; then export SPACK_SPEC="${SPACK_SPEC} ^python@${PYTHON_VERSION}"; fi
if [ $ENABLE_PYTHON2 = 'ON' ]; then export SPACK_SPEC="${SPACK_SPEC} ${PYTHON2_CONSTRAINTS}"; fi
# hdf5 constraints
if [ $ENABLE_HDF5 = 'ON' ]; then export SPACK_SPEC="${SPACK_SPEC} ^${HDF5_SPEC}"; fi
# silo constraints
Expand All @@ -452,7 +412,7 @@ stages:
echo "SPACK SPEC:"
echo $SPACK_SPEC
# run uber to build tpls
python3 scripts/uberenv/uberenv.py -k --spack-allow-deprecated --spec "${SPACK_SPEC}" --spack-config-dir=scripts/uberenv_configs/spack_configs/configs/alpinedav/ubuntu_18.04_devel/
python3 scripts/uberenv/uberenv.py -k --spec "${SPACK_SPEC}" --spack-env-file=scripts/uberenv_configs/spack_configs/envs/alpinedav-ubuntu_18.04_devel/spack.yaml
displayName: 'Spack Build Tpls'
- script: |
Expand All @@ -467,25 +427,22 @@ stages:
# capture current path
export ROOT_DIR=`pwd`
# find spack generated host config file
export HOST_CONFIG=`ls ${ROOT_DIR}/uberenv_libs/*.cmake`
export HOST_CONFIG=`ls ${ROOT_DIR}/uberenv_libs/*-patch.cmake`
echo $HOST_CONFIG
# find spack installed cmake
export CMAKE_BIN_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/cmake*/bin`
export PATH=${CMAKE_BIN_DIR}:$PATH
echo $PATH
which cmake
cmake --version
# prepare build dir
mkdir build
cd build
# setup cmake options
export CMAKE_OPTS="-C ${HOST_CONFIG}"
export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
export CMAKE_OPTS="${CMAKE_OPTS} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}"
export CMAKE_OPTS="${CMAKE_OPTS} -DENABLE_COVERAGE=${ENABLE_COVERAGE}"
export CMAKE_OPTS="${CMAKE_OPTS} -DBLT_CXX_STD=${BLT_CXX_STD}"
export CMAKE_OPTS="${CMAKE_OPTS} -DENABLE_FIND_MPI=${BLT_ENABLE_FIND_MPI}"
export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_INSTALL_PREFIX=../install"
export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/install"
# this is now getting set to the uberenv-pkg loc by spack, ignore for ci
export CMAKE_OPTS="${CMAKE_OPTS} -DPYTHON_MODULE_INSTALL_PREFIX=IGNORE"
if [ $FORCE_COMPILERS = 'ON' ]; then export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_C_COMPILER=${COMPILER_CC}"; fi
Expand All @@ -495,7 +452,7 @@ stages:
# configure
echo "CMAKE OPTIONS:"
echo ${CMAKE_OPTS}
cmake ${CMAKE_OPTS} ../src
cmake ${CMAKE_OPTS} -B build -S src
displayName: 'Configure with CMake'
- script: |
Expand Down Expand Up @@ -648,13 +605,20 @@ stages:
ls -l
# find spack installed cmake
export ROOT_DIR=`pwd`
export CMAKE_BIN_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/cmake*/bin`
export CMAKE_BIN_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/cmake*/bin/`
export PATH=${CMAKE_BIN_DIR}:$PATH
echo $PATH
# find spack installed python
export PYTHON_EXE=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/python*/bin/python`
# find spack installed python (use spack view dir)
export PYTHON_EXE=`ls ${ROOT_DIR}/uberenv_libs/spack_view/bin/python3`
# add conduit module to python path
export PYTHONPATH=${ROOT_DIR}/install/python-modules/
# NOTE:
# also add spack's python view dir to python path env var
# this wasn't needed with older spack.
# I think embedded linking logic is resolving symlinks and therefore
# not using view layout that wires up dependent python modules
py_site_pkgs_dir=`ls -d ${ROOT_DIR}/uberenv_libs/spack_view/lib/python*/site-packages`
export PYTHONPATH=${PYTHONPATH}:${py_site_pkgs_dir}
echo $PYTHONPATH
# CI LD_LIB FIX
# NOTE:
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 972d627

Please sign in to comment.