Skip to content

feat: Add macOS spack environment.#291

Merged
CusiniM merged 81 commits intomasterfrom
cusini-macOS-spack-build
Apr 7, 2025
Merged

feat: Add macOS spack environment.#291
CusiniM merged 81 commits intomasterfrom
cusini-macOS-spack-build

Conversation

@CusiniM
Copy link
Copy Markdown
Contributor

@CusiniM CusiniM commented Feb 6, 2025

Good news is that I managed to build through spack.

I had to remove a few things that were causing some issues. This is the last build command that worked for me.

python3 scripts/uberenv/uberenv.py --spack-env-file=scripts/spack_configs/macOS/spack.yaml --prefix=/Users/cusini1/geos/geos-tpls --spec "%apple-clang@16.0.0 ~trilinos ~openmp ~scotch ~addr2line"
  • ~trilinos: just because we don't really use it anyways and it takes long to build.
  • ~openmp: if this is not specified, the -fopenmp passed to the compiler and apple clang does not support it.
  • '~scotch' : this does not build on my mac. It's not a hard dependency but it may require a small patch.
  • ~addr2line: I am not sure why but a wrong path was added to the resulting host-config for this. I have now specified the correct path in the spack environment file but it also does not seem to be a hard requirement so maybe we can add this to the geos spack recipe.

This PR also upgrades the spack version used so that it supports MacOS sequoia.

corbett5 and others added 30 commits December 17, 2020 13:22
* Spack work.

* Working with existing LLNL host configs.

* SuiteSparse on Lassen progress.

* Trilinos working on Lassen.

* HYPRE finally working.

* Trilinos MKL TPL

* Fixed CHAI version.

* Initial commit MacOS spack support

* Travis host configs.

* Expanded VTK libraries.

Co-authored-by: Herve Gross <herve.gross@total.com>
* Add current GEOSX compilers to spack.

* Added python interface.

* Removed static variables.

* Python improvements.

* Removed std::string.

Co-authored-by: Randolph R. Settgast <settgast1@llnl.gov>
* Changes to Group and Wrapper to favor references.

* Added exceptions to harden the Python interface.

* Added a Spack and Uberenv guide.

* Changed getConstitutiveRelation and getConstitutiveManager.

* Changed getMeshBodies, getMeshBody and getMeshLevel.

* Changed getDomainPartition

* Changed getRegion and getSubRegion.

* Prevent MPI_Init from being called twice, (occurs with pygeosx).

* Changed getConstitutiveModel(s).

* Removing unnecessary uses of getGroupPointer.

* Changed Group::getParent and Wrapper constructor.

* Removed function input paths from restart.
* added option to specify inner radius of cartesian mapping

* fix error in silo output

* modifications to wellbore parallel mesh gen + addNeighbor changes to allow ranks to be mutual periodic neighbors (doubly-neighbored)

* add hard coded coordinatese in the radial direction

* bugfix for integer overflow with hypre int

* fixes for mgr on gpu

* - Add additional instrumentation for using MGR (make restrictor, compute Auu)
- Update hypre linear algebra interface to the latest hypre/mgr
- Update MGR recipes for GPU

* modified LAIHelperFunctions::separateComponentFilter to batch insert rows. Introduced MatrixBase::separateComponentFilter as a specialized filter, implemented HypreMatrix::separateComponentFilter.

* some cleanup for HypreMatrix::separateComponentFilter

Co-authored-by: Sy-Tuan Nguyen <45685596+sytuannguyen@users.noreply.github.com>

* implement single read variant of HypreMatrix::separateComponentFilter

* Use full matrix instead of SDC approximation for mechanics in hydrofrac solver.
Fix bug in setting options for mechanics block solver.

* Changes to run on Summit. (#1546)

Co-authored-by: Randolph R. Settgast <settgast1@llnl.gov>

* fix bug from summit update

* fix bug in SinglePhasePoromechanicsSolver::implicitStepComplete

* resolve host-device ghost index array inconsistency

* added annulus option to cylinder geometry. added error check for aperature table

* Changes for new compilers on summit/lassen (#1611)

* Updated hypre.

* Force uberenv to use python3.

* Added CUDA 11.0.3 on Summit.

* Added GCC 9.1.0 to Summit

* Added GCC 9.1.0 to Summit

* Changes to work with GCC 9.1.0 on Summit.

Co-authored-by: Benjamin Curtice Corbett <corbett5@llnl.gov>

* Updating function parCSRtoIJ required by latest hypre version

Co-authored-by: wrtobin <tobin6@llnl.gov>
Co-authored-by: Quan Bui <mquan.bui@gmail.com>
Co-authored-by: Sy-Tuan Nguyen <45685596+sytuannguyen@users.noreply.github.com>
Co-authored-by: Ben Corbett <32752943+corbett5@users.noreply.github.com>
Co-authored-by: Benjamin Curtice Corbett <corbett5@llnl.gov>
Co-authored-by: Nicola Castelletto <castelletto1@llnl.gov>
Enabling yapf formatting of python files
This patch aims at shrinking `GEOSX` into `GEOS`.
- The `geosx` namespace is renamed `geos`.
- All the `GEOSX_ASSERT`, `GEOSX_LOG`, … are renamed `GEOS_…`
- All the include guards are modified.
- All the paths to the old `http://gihub.com/GEOSX/GEOSX` are renamed appropriately
- Mention to `GEOSX` in the text of the documentation is changed to `GEOS`
Meanwhile, `GEOSX` is kept for the following cases
- The executable is still named `geosx`, the examples in the doc still reflect the current naming.
- All the tools named after `geosx` kept their `geosx` (_e.g._ `pygeox`, `geosx_xml_tools`)
- All the `cmake` configuration flags (_e.g._ `GEOSX_TPL_DIR`, `GEOSX_USE_CUDA`) are unchanged.
- The `host-config` files are not changed.
- The variables names, classes or files containing `GEOSX` are not modified.
* Add geos-specific option to suppress/enable unit tests, active by default.
* Add mesa to packages.yaml, vtk issues

* modify, add fmt recipe

* remove cxx flags from blueos (consistent with RADIUSS and Axom)

* Add specific uncrustify version, remove optimization flags from toss3

* Move spack configs and package recipes to separate folders; delete uberenv directory

* Add uberenv as a submodule. Add uberenv config file

* Bump conduit, add libtools external package

* Bill's Conduit/HDF5 changes + switcharoo, try building latest pugixml

* Add vtk patches + Try replace hypre-cuda with +hypre+cuda and caliper variant changes

* Add camp dependency for RAJA path

* make suite-sparse mandatory (spack is not always adding it to spec otherwise)

* Change clang@upstream for blueos to clang@9 so clingo doesn't yell

* gmpr fix

* Use more accurate caliper version and correct readline version

* Cleanup vtk script, vtk now builds on lassen

* Update to spack 0.18.0

* Update hypre/silo/hdf5/conduit and use older trilinos recipe

* Can build all blueos libraries - compilation errors - use netlib-lapack instead of essl

* first pass at spack environments

* Add spack.yaml for lassen; modify spack.yaml install_tree path to blueos_3_ppc64le_ib_p9_package

* Generalize HDF5 and pugixml configuration so both thirdPartyLibs and spack builds work

* Update umpire/raja/chai/hypre - only quartz re-tested so far

* blueos config - set CUDA 11 as default

* Cuda 11 explicit spec

* Update CMake version; add gcc-toolchain flag for quartz

* Update caliper, adiak, trilinos, cmake requirement, camp version in spack recipe

* Update adiak namespace

* Add cxx flags (std:: errors), disable hwloc dependency (runtime MPI error) for trilinos recipe

* Guard adiak or adiak::adiak target

* Add FESAPI spack recipe

* pugixml and fmt changes for toss 3 quartz

* Update CUDA to 11.2.2, update hypre, add -fPIC flag for hypre~shared, add missing libcublasLt path

* use intel-oneapi-mkl instead of intel-mkl; use magic mvapich2; use mpi fortran in superlu-dist; disable fesapi default; update hypre; update cmake

* Update CMake to 3.26.3; CMake fortran/CXX error with 3.23.1

* Missing fmt dependency

* Upgrade to uberenv spack environments - update uberenv submodule, move to spack.yaml config files, comment out unused recipe patches

* Move pygeosx dependencies to a separate spack recipe; update to latest spack release; use older hdf5 recipe; small trilinos change due to spack cmakepackage reorg; add spack environment files for pygeosx; adjust spec check for HYPRE cuda/hip enabled; add project json file for uberenv to build pygeosx; delete old python spec files

* Mandate CMake >=3.23

* Spack environment file for toss 3 (rzgenie)

* Remove cp unused

* Omit uberenv from submodule check

* Lock blt version to bypass raja/chai/camp blt::stub error

* Make python required dependency; make pygeosx variant toggle

* Generate separate host-config for LvArray

* Update hypre and umpire versions, Remove some package recipes using git version specifiers where possible
… python3 using Linux package manager > spack
@CusiniM CusiniM requested review from bmhan12 and rrsettgast February 7, 2025 00:53
Comment thread scripts/spack_configs/macOS/spack.yaml Outdated
Comment on lines +131 to +135
# py-sphinx:
# buildable: False
# externals:
# - spec: sphinx
# prefix: /Users/cusini1/pythonVenv/geosxEnv/
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# py-sphinx:
# buildable: False
# externals:
# - spec: sphinx
# prefix: /Users/cusini1/pythonVenv/geosxEnv/

Comment thread scripts/spack_configs/macOS/spack.yaml Outdated
@CusiniM CusiniM changed the base branch from feature/han12/docker_spack to master February 12, 2025 20:47
@CusiniM CusiniM marked this pull request as ready for review February 12, 2025 20:49
Comment thread .uberenv_config.json
"spack_configs_path": "scripts/spack_configs",
"spack_packages_path": "scripts/spack_packages/packages",
"spack_concretizer": "clingo"
"spack_packages_path": "scripts/spack_packages/packages"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@CusiniM CusiniM self-assigned this Apr 7, 2025
@CusiniM CusiniM merged commit e4eb2d6 into master Apr 7, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants