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

[WIP] Version 0.8.0 release aka ECMech v0.4.0 compatibility #58

Open
wants to merge 25 commits into
base: exaconstit-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
16d0954
Add a rust-based version of the light_up python scripts to greatly sp…
rcarson3 Jul 28, 2024
093c518
Add insitu light up capabilities
rcarson3 Jul 28, 2024
5de45ae
Forgot to delete some old code from the Rust port in the C++ code...
rcarson3 Jul 28, 2024
f64299a
Fix some small issues with the voxel_coarsen crate
rcarson3 Jul 28, 2024
ea69ad5
Lots of changes to get things to compile...
rcarson3 Jul 28, 2024
181b22a
Fixed lattice strain computations and added option features
rcarson3 Jul 28, 2024
d0889dc
Merge branch 'exaconstit-dev' into insitu_lightup
rcarson3 Dec 10, 2024
99c8d30
Breaking changes: updates to be compatible with ECMech v0.4.0
rcarson3 Dec 13, 2024
678dc60
Bug fix where the wrong copy of test suite wasn't fixed...
rcarson3 Dec 13, 2024
f922352
Wide range of bug / warning fixes and adding a new experimental feature
rcarson3 Dec 13, 2024
f9dadd8
small fix to option parser
rcarson3 Dec 17, 2024
9e5bde5
Changes required to build on GPU systems with new ECMech v0.4.0
rcarson3 Feb 6, 2025
6aac428
rename gpu install script to be *_gpu_cuda_*
rcarson3 Feb 6, 2025
654d495
Fix a number of compiler warnings from the HIP compiler
rcarson3 Feb 6, 2025
9050e4e
Add GPU HIP install example for users based on El Cap system builds
rcarson3 Feb 6, 2025
2ca8d88
Update README
rcarson3 Feb 6, 2025
fb39792
Tick version to v0.8.0
rcarson3 Feb 6, 2025
09c9d16
update github ci trial 1...
rcarson3 Feb 6, 2025
ae3c12d
update github ci trial 2...
rcarson3 Feb 6, 2025
916c2c8
Merge branch 'exaconstit-dev' into insitu_lightup
rcarson3 Feb 6, 2025
91963e5
update github ci trial 3...
rcarson3 Feb 6, 2025
ae98f80
small bug fix to work with later versions of mfem > 4.5
rcarson3 Feb 8, 2025
eae3533
Various cmake fixes...
rcarson3 Feb 9, 2025
934f5f6
A few build / bug fixes to get things running...
rcarson3 Feb 9, 2025
ea17214
Various fixes to get the CI pipelines actually working...
rcarson3 Feb 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-ecmech/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
steps:
- name: Install ECMech
run: |
git clone --single-branch --branch v0.3.4 --depth 1 ${{ inputs.ecmech-repo }} ${{ inputs.ecmech-dir }};
git clone --single-branch --branch v0.4.1 --depth 1 ${{ inputs.ecmech-repo }} ${{ inputs.ecmech-dir }};
cd ${{ inputs.ecmech-dir }};
git submodule init;
git submodule update;
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-raja/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
steps:
- name: Install RAJA
run: |
git clone --single-branch --branch v2022.10.5 --depth 1 ${{ inputs.raja-repo }} ${{ inputs.raja-dir }};
git clone --single-branch --branch v2024.07.0 --depth 1 ${{ inputs.raja-repo }} ${{ inputs.raja-dir }};
cd ${{ inputs.raja-dir }};
git submodule init;
git submodule update;
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
# Note the SNLS top dir is no longer where SNLS's source is located within ecmech
# rather it's the top directory of ecmech.
env:
HYPRE_ARCHIVE: v2.26.0.tar.gz
HYPRE_TOP_DIR: hypre-2.26.0
HYPRE_ARCHIVE: v2.30.0.tar.gz
HYPRE_TOP_DIR: hypre-2.30.0
METIS_ARCHIVE: metis-5.1.0.tar.gz
METIS_TOP_DIR: metis-5.1.0
MFEM_TOP_DIR: mfem-exaconstit
Expand All @@ -30,7 +30,7 @@ jobs:
builds-and-tests:
strategy:
matrix:
os: [ubuntu-20.04]
os: [ubuntu-latest]
target: [release]
mpi: [parallel]
build-system: [cmake]
Expand All @@ -40,15 +40,15 @@ jobs:

steps:
- name: checkout exaconstit
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ${{ env.EXACONSTIT_TOP_DIR }}
fetch-depth: 0
# Our tests require python so install it and numpy
- name: Set up Python 3.8
uses: actions/setup-python@v2
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -58,7 +58,7 @@ jobs:
# TODO: It would be nice to have only one step, e.g. with a dedicated
# action, but I (@adrienbernede) don't see how at the moment.
- name: get MPI (Linux)
if: matrix.mpi == 'parallel' && matrix.os == 'ubuntu-20.04'
if: matrix.mpi == 'parallel' && matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install mpich libmpich-dev
export MAKE_CXX_FLAG="MPICXX=mpic++"
Expand All @@ -68,10 +68,10 @@ jobs:
- name: cache raja
id: raja-cache
if: matrix.mpi == 'parallel'
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ env.RAJA_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.RAJA_TOP_DIR }}-v2.01
key: ${{ runner.os }}-build-${{ env.RAJA_TOP_DIR }}-v2.02

- name: get raja
if: matrix.mpi == 'parallel' && steps.raja-cache.outputs.cache-hit != 'true'
Expand All @@ -84,10 +84,10 @@ jobs:
- name: cache ecmech
id: ecmech-cache
if: matrix.mpi == 'parallel'
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ env.ECMECH_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.ECMECH_TOP_DIR }}-v2.01
key: ${{ runner.os }}-build-${{ env.ECMECH_TOP_DIR }}-v2.02

- name: get ecmech
if: matrix.mpi == 'parallel' && steps.ecmech-cache.outputs.cache-hit != 'true'
Expand All @@ -101,10 +101,10 @@ jobs:
- name: cache hypre
id: hypre-cache
if: matrix.mpi == 'parallel'
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ env.HYPRE_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.HYPRE_TOP_DIR }}-v2.01
key: ${{ runner.os }}-build-${{ env.HYPRE_TOP_DIR }}-v2.02

- name: get hypre
if: matrix.mpi == 'parallel' && steps.hypre-cache.outputs.cache-hit != 'true'
Expand All @@ -118,7 +118,7 @@ jobs:
- name: cache metis
id: metis-cache
if: matrix.mpi == 'parallel'
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ env.METIS_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.METIS_TOP_DIR }}-v2.01
Expand All @@ -136,10 +136,10 @@ jobs:
- name: cache mfem
id: mfem-cache
if: matrix.mpi == 'parallel'
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ env.MFEM_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.MFEM_TOP_DIR }}-v2.03
key: ${{ runner.os }}-build-${{ env.MFEM_TOP_DIR }}-v2.04

- name: install mfem
if: matrix.mpi == 'parallel' && steps.mfem-cache.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif()

enable_language(C)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ExaConstit App

Updated: June. 10, 2022
Updated: Feb. 6, 2025

Version 0.7.0
Version 0.8.0

# Description:
A principal purpose of this code app is to probe the deformation response of polycrystalline materials; for example, in homogenization to obtain bulk constitutive properties of metals. This is a nonlinear quasi-static, implicit solid mechanics code built on the MFEM library based on an updated Lagrangian formulation (velocity based).
Expand Down Expand Up @@ -50,7 +50,7 @@ Several small examples that you can run are found in the ```test/data``` directo

The ```scripts/postprocessing``` directory contains several useful post-processing tools. The ```macro_stress_strain_plot.py``` file can be used to generate macroscopic stress strain plots. An example script ```adios2_example.py``` is provided as example for how to make use of the ```ADIOS2``` post-processing files if ```MFEM``` was compiled with ```ADIOS2``` support. It's highly recommended to install ```MFEM``` with this library if you plan to be doing a lot of post-processing of data in python.

A set of scripts to perform lattice strain calculations similar to those found in powder diffraction type experiments can be found in the ```scripts/postprocessing``` directory. The appropriate python scripts are: `adios2_extraction.py`, `strain_Xtal_to_Sample.py`, and `calc_lattice_strain.py`. In order to use these scripts, one needs to run with the `light_up=true` option set in the `Visualization` table of your simulation option file.
A set of scripts to perform lattice strain calculations similar to those found in powder diffraction type experiments can be found in the ```scripts/postprocessing``` directory. The appropriate python scripts are: `adios2_extraction.py`, `strain_Xtal_to_Sample.py`, and `calc_lattice_strain.py`. In order to use these scripts, one needs to run with the `light_up=true` option set in the `Visualization` table of your simulation option file. Alternatively, if you just use the `light_up` option and provide the necessary parameters as defined in the `src/options.toml` file you a set of insitu lattice strain calculations will be done. The cost of these insitu calculations is fairly nominal and are generally advisable to use when performing large scale simulations where this data is desireable.

# Workflow Examples

Expand All @@ -65,17 +65,20 @@ The other workflow is based on a UQ workflow for metal additive manufacturing th
* Conduit and ADIOS2 supply output support. ZLIB allows MFEM to read in gzip mesh files or save data as being compressed.
* You'll need to use the exaconstit-dev branch of MFEM found on this fork of MFEM: https://github.com/rcarson3/mfem.git
* We do plan on upstreaming the necessary changes needed for ExaConstit into the master branch of MFEM, so you'll no longer be required to do this
* Version 0.8.0 of ExaConstit is compatible with the following mfem hash
29a8e15382682babe0f5c993211caa3008e1ec96
* Version 0.7.0 of Exaconstit is compatible with the following mfem hash 78a95570971c5278d6838461da6b66950baea641
* Version 0.6.0 of ExaConstit is compatible with the following mfem hash 1b31e07cbdc564442a18cfca2c8d5a4b037613f0
* Version 0.5.0 of ExaConstit required 5ebca1fc463484117c0070a530855f8cbc4d619e
* ExaCMech is required for ExaConstit to be built and can be obtained at https://github.com/LLNL/ExaCMech.git and now requires the develop branch. ExaCMech depends internally on SNLS, from https://github.com/LLNL/SNLS.git. We depend on v0.3.4 of ExaCMech as of this point in time.
* ExaCMech is required for ExaConstit to be built and can be obtained at https://github.com/LLNL/ExaCMech.git and now requires the develop branch. ExaCMech depends internally on SNLS, from https://github.com/LLNL/SNLS.git. We depend on v0.4.1 of ExaCMech as of this point in time.
* GPU-builds of ExaCMech >= v0.4.1 and thus ExaConstit now require the RAJA Portability Suite (RAJA, Umpire, and CHAI) to compile and run on the GPU. We currently leverage the `v2024.07.0` tag for all of the RAJA Portability Suite repos.
* For versions of ExaCMech >= 0.3.3, you'll need to add `-DENABLE_SNLS_V03=ON` to the cmake commands as a number of cmake changes were made to that library and SNLS.
* RAJA is required for ExaConstit to be built and should be the same one that ExaCMech and MFEM are built with. It can be obtained at https://github.com/LLNL/RAJA. Currently, RAJA >= 2022.10.x is required for ExaConstit due to a dependency update in MFEMv4.5.
* An example install bash script for unix systems can be found in ```scripts/install/unix_install_example.sh```. This is provided as an example of how to install ExaConstit and its dependencies, but it is not guaranteed to work on every system. A CUDA version of that script is also included in that folder, and only minor modifications are required if using a version of Cmake >= 3.18.*. In those cases ```CUDA_ARCH``` has been changed to ```CMAKE_CUDA_ARCHITECTURES```. You'll also need to look up what you're CUDA architecture compute capability is set to and modify that within the script. Currently, it is set to ```sm_70``` which is associated with the Volta architecture.
* An example install bash script for unix systems can be found in ```scripts/install/unix_install_example.sh```. This is provided as an example of how to install ExaConstit and its dependencies, but it is not guaranteed to work on every system. A CUDA version of that script is also included in that folder (`unix_gpu_cuda_install_example.sh`), and only minor modifications are required if using a version of Cmake >= 3.18.*. In those cases ```CUDA_ARCH``` has been changed to ```CMAKE_CUDA_ARCHITECTURES```. You'll also need to look up what you're CUDA architecture compute capability is set to and modify that within the script. Currently, it is set to ```sm_70``` which is associated with the Volta architecture. We also have a HIP version included in that folder (`unix_gpu_cuda_install_example.sh`). It's based on a LLNL El Capitan-like system build of things so things might need tweaking for other AMD GPU machines.


* Create a build directory and cd into there
* Run ```cmake .. -DENABLE_MPI=ON -DENABLE_FORTRAN=ON -DMFEM_DIR{mfem's installed cmake location} -DBLT_SOURCE_DIR=${BLT cloned location if not located in cmake directory} -DECMECH_DIR=${ExaCMech installed cmake location} -DRAJA_DIR={RAJA installed location} -DSNLS_DIR={SNLS installed cmake location}```
* Run ```cmake .. -DENABLE_MPI=ON -DENABLE_FORTRAN=OFF -DMFEM_DIR{mfem's installed cmake location} -DBLT_SOURCE_DIR=${BLT cloned location if not located in cmake directory} -DECMECH_DIR=${ExaCMech installed cmake location} -DRAJA_DIR={RAJA installed location} -DSNLS_DIR={SNLS installed cmake location}```
* Run ```make -j 4```


Expand Down
4 changes: 2 additions & 2 deletions cmake/CMakeBasics.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set(PACKAGE_BUGREPORT "[email protected]")

set(EXACONSTIT_VERSION_MAJOR 0)
set(EXACONSTIT_VERSION_MINOR 7)
set(EXACONSTIT_VERSION_MINOR 8)
set(EXACONSTIT_VERSION_PATCH \"0\")

set(HEADER_INCLUDE_DIR
Expand Down Expand Up @@ -51,7 +51,7 @@ macro(exaconstit_fill_depends_list)
foreach( _dep ${arg_DEPENDS_ON})
string(TOUPPER ${_dep} _ucdep)

if (ENABLE_${_ucdep} OR ${_ucdep}_FOUND)
if (ENABLE_${_ucdep} OR ${_ucdep}_FOUND OR ${_dep}_FOUND)
list(APPEND ${arg_LIST_NAME} ${_dep})
endif()
endforeach()
Expand Down
62 changes: 0 additions & 62 deletions cmake/thirdpartylibraries/FindRAJA.cmake

This file was deleted.

46 changes: 0 additions & 46 deletions cmake/thirdpartylibraries/FindSNLS.cmake

This file was deleted.

Loading