-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from zacharyjbaker/main
ENH: Added yaml workflow files for testing installation of Fierro via anaconda and some example input, for the purpose of CI
- Loading branch information
Showing
9 changed files
with
353 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ dependencies: | |
- boa # For building | ||
- conda-build | ||
- anaconda-client # For uploading | ||
- python=3.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Fierro Test (No Implicit) | ||
|
||
# Workflow runs on following successful conda distribution | ||
on: | ||
workflow_run: | ||
workflows: [Publish Test, Publish All, Publish Elements, Publish EVPFFT-CPU, Publish EVPFFT-dev, Publish EVPFFT-GPU, Publish FIERRO GUI, Publish Fierro-CPU, Publish Fierro-dev, Publish Heffte, Publish Heffte CUDA, Publish Trilinos-CPU] | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: print trigger event | ||
run: | | ||
echo "::workflow triggering event name is::" ${{ github.event_name }} | ||
- name: update the package list | ||
run: | ||
sudo apt-get update | ||
shell: bash | ||
- name: Install build tools | ||
run: | ||
sudo apt-get install build-essential | ||
shell: bash | ||
- name: Install LaPack | ||
run: | ||
sudo apt-get install libblas-dev liblapack-dev | ||
shell: bash | ||
- name: Install MPI | ||
run: | | ||
sudo apt-get install libopenmpi-dev openmpi-bin | ||
echo "MPI_OPTS=--oversubscribe" >> $GITHUB_ENV | ||
- name: Install cmake | ||
run: | ||
sudo apt-get -y install cmake | ||
shell: bash | ||
- name: Install python | ||
run: | ||
sudo apt-get install python3.6 | ||
shell: bash | ||
|
||
- name: Set up Miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
python-version: 3.8 | ||
|
||
- name: Create conda environment | ||
run: conda env create -f ./.etc/conda_build_environment.yaml | ||
|
||
- name: Initialize conda | ||
run: conda init bash | ||
|
||
- name: Activate conda environment, install Fierro anaconda packages | ||
run: | | ||
source ~/.bashrc | ||
conda activate build-env | ||
conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive | ||
conda install -c conda-forge -c fierromechanics fierro-cpu | ||
conda install -c conda-forge -c fierromechanics evpfft | ||
conda install -c conda-forge -c fierromechanics fierro_gui | ||
- name: Verify package dependencies | ||
run: | | ||
conda info --envs | ||
conda list | ||
- name: Test fierro-parallel-explicit | ||
run: | | ||
source ~/.bashrc | ||
conda activate build-env | ||
fierro-parallel-explicit ./src/Parallel-Solvers/Parallel-Explicit/Example_Yaml_Scripts/example_simple.yaml | ||
shell: bash | ||
|
||
- name: Test fierro-mesh-builder | ||
run: | | ||
source ~/.bashrc | ||
conda activate build-env | ||
fierro-mesh-builder ./src/Mesh-Builder/examples/mesh_Box_16_p3.yaml | ||
shell: bash | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
name: Fierro Test | ||
|
||
# Workflow runs on following successful conda distribution | ||
on: | ||
workflow_run: | ||
workflows: [Publish Test, Publish All, Publish Elements, Publish EVPFFT-CPU, Publish EVPFFT-dev, Publish EVPFFT-GPU, Publish FIERRO GUI, Publish Fierro-CPU, Publish Fierro-dev, Publish Heffte, Publish Heffte CUDA, Publish Trilinos-CPU] | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: update the package list | ||
run: | ||
sudo apt-get update | ||
shell: bash | ||
- name: Install build tools | ||
run: | ||
sudo apt-get install build-essential | ||
shell: bash | ||
- name: Install LaPack | ||
run: | ||
sudo apt-get install libblas-dev liblapack-dev | ||
shell: bash | ||
- name: Install MPI | ||
run: | | ||
sudo apt-get install libopenmpi-dev openmpi-bin | ||
echo "MPI_OPTS=--oversubscribe" >> $GITHUB_ENV | ||
- name: Install cmake | ||
run: | ||
sudo apt-get -y install cmake | ||
shell: bash | ||
- name: Install python | ||
run: | ||
sudo apt-get install python3.6 | ||
shell: bash | ||
- name: Install dos2unix | ||
run: | ||
sudo apt-get install dos2unix | ||
shell: bash | ||
|
||
- name: Set up Miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
python-version: 3.8 | ||
|
||
- name: Create conda environment | ||
run: conda env create -f ./.etc/conda_build_environment.yaml | ||
|
||
- name: Initialize conda | ||
run: conda init bash | ||
|
||
- name: Activate conda environment, install Fierro anaconda packages | ||
run: | | ||
source ~/.bashrc | ||
conda activate build-env | ||
conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive | ||
conda install -c conda-forge -c fierromechanics fierro-cpu | ||
conda install -c conda-forge -c fierromechanics evpfft | ||
conda install -c conda-forge -c fierromechanics fierro_gui | ||
- name: Verify package dependencies | ||
run: | | ||
conda info --envs | ||
conda list | ||
- name: Test fierro-parallel-explicit | ||
run: | | ||
source ~/.bashrc | ||
conda activate build-env | ||
export OMP_PROC_BIND=spread | ||
export OMP_NUM_THREADS=1 | ||
export OMP_PLACES=threads | ||
mpirun -np 1 --bind-to core fierro-parallel-explicit ./src/Parallel-Solvers/Parallel-Explicit/Example_Yaml_Scripts/example_simple.yaml | ||
shell: bash | ||
|
||
- name: Test fierro-mesh-builder | ||
run: | | ||
source ~/.bashrc | ||
conda activate build-env | ||
fierro-mesh-builder ./src/Mesh-Builder/examples/mesh_Box_16_p3.yaml | ||
shell: bash | ||
|
||
- name: Test fierro-parallel-implicit | ||
run: | | ||
source ~/.bashrc | ||
conda activate build-env | ||
dos2unix ./Example_Yaml_Scripts/example_implicit_basic.yaml | ||
export OMP_PROC_BIND=spread | ||
export OMP_NUM_THREADS=1 | ||
export OMP_PLACES=threads | ||
mpirun -np 1 --bind-to core fierro-parallel-implicit ./Example_Yaml_Scripts/example_implicit_basic.yaml | ||
working-directory: ./src/Parallel-Solvers/Implicit-Lagrange | ||
shell: bash | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Publish All | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
elements: | ||
uses: ./.github/workflows/publish-elements.yml | ||
|
||
evpfft-cpu: | ||
uses: ./.github/workflows/publish-evpfft-cpu.yml | ||
|
||
evpfft-dev: | ||
uses: ./.github/workflows/publish-evpfft-dev.yml | ||
|
||
evpfft-gui: | ||
uses: ./.github/workflows/publish-evpfft-gui.yml | ||
|
||
fierro-cpu: | ||
uses: ./.github/workflows/publish-fierro-cpu.yml | ||
|
||
fierro-dev: | ||
uses: ./.github/workflows/publish-fierro-dev.yml | ||
|
||
fierro-gui: | ||
uses: ./.github/workflows/publish-fierro-gui.yml | ||
|
||
heffte-cpu: | ||
uses: ./.github/workflows/publish-heffte-cpu.yml | ||
|
||
heffte-cuda: | ||
uses: ./.github/workflows/publish-heffte-cuda.yml | ||
|
||
trilinos: | ||
uses: ./.github/workflows/publish-trillinos.yml | ||
|
||
voxelizer: | ||
uses: ./.github/workflows/publish-voxelizer.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,6 @@ jobs: | |
with: | ||
recipe_dir: .conda/fierro/cpu | ||
secrets: inherit | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Publish Test | ||
on: | ||
workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: update the package list | ||
run: | ||
sudo apt-get update | ||
shell: bash | ||
|
||
|
99 changes: 99 additions & 0 deletions
99
src/Parallel-Solvers/Implicit-Lagrange/Example_Yaml_Scripts/example_implicit_basic.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# input file | ||
num_dims: 3 | ||
|
||
mesh_generation_options: | ||
type: Box | ||
origin: [0, 0, 0] | ||
length: [10, 10, 100] | ||
num_elems: [5, 5, 50] | ||
|
||
materials: | ||
- id: 0 | ||
elastic_modulus: 200000000000 | ||
poisson_ratio: 0.3 | ||
density: 7850 | ||
thermal_conductivity: 10 | ||
specific_internal_energy_rate: 1.0 | ||
initial_temperature: 293 | ||
|
||
fea_module_parameters: | ||
- type: Inertial | ||
material_id: 0 | ||
inertia_center_x: 0 | ||
inertia_center_y: 0 | ||
inertia_center_z: 0 | ||
|
||
- type: Elasticity | ||
material_id: 0 | ||
# Dirichlet conditions | ||
boundary_conditions: | ||
- surface: | ||
type: z_plane | ||
plane_position: 0.0 | ||
type: displacement | ||
value: 0.0 | ||
|
||
# Loading/Neumann Conditions | ||
loading_conditions: | ||
- surface: | ||
type: z_plane | ||
plane_position: 100.0 | ||
type: surface_traction | ||
component_x: 500 | ||
component_y: 0 | ||
component_z: 0 | ||
|
||
- type: Heat_Conduction | ||
material_id: 0 | ||
# Dirichlet conditions | ||
boundary_conditions: | ||
- surface: | ||
type: z_plane | ||
plane_position: 0.0 | ||
type: temperature | ||
value: 293.0 | ||
|
||
# Loading/Neumann Conditions | ||
loading_conditions: | ||
- surface: | ||
type: z_plane | ||
plane_position: 100.0 | ||
type: surface_heat_flux | ||
#can be normal (q dot n) or coordinated (vector q) for curved surfaces | ||
specification: normal | ||
flux_value: -0.1 | ||
|
||
optimization_options: | ||
optimization_process: topology_optimization | ||
method_of_moving_asymptotes: false | ||
density_epsilon: 0.001 | ||
simp_penalty_power: 3 | ||
rol_params: | ||
subproblem_algorithm: trust_region | ||
initial_constraint_penalty: 1.e1 | ||
step_tolerance: 1.e-5 | ||
gradient_tolerance: 1.e-5 | ||
constraint_tolerance: 1.e-5 | ||
iteration_limit: 5 | ||
optimization_objective: multi_objective | ||
#Weight coefficients should add up to 1 | ||
multi_objective_structure: linear | ||
multi_objective_modules: | ||
- type: minimize_thermal_resistance | ||
weight_coefficient: 0.25 | ||
- type: minimize_compliance | ||
weight_coefficient: 0.75 | ||
|
||
constraints: | ||
- type: mass | ||
relation: equality | ||
value: 0.25 | ||
- type: moment_of_inertia | ||
relation: equality | ||
component: yy | ||
value: 0.35 | ||
- type: moment_of_inertia | ||
relation: equality | ||
component: xy | ||
value: 0.0 | ||
|