Installation and Dependencies
Dependencies
Core Framework Dependencies
The framework requires tools developed by NASA (OpenMDAO
and MPhys
) and
the MDO Lab (MACH-Aero framework). The
MACH-Aero
framework houses all the core packages needed to run CFD simulations.
Below is the list of software required:
TACS>=3.8.0
(Required for aerostructural simulations)funtofem>=0.3.9
(Required for aerostructural simulations)
These software packages may have additional third-party dependencies like PETSc and OpenMPI. A detailed guide on the additional dependencies required is available here.
Python Libraries
The following Python libraries are also required:
numpy>=1.21
scipy>=1.7
mpi4py>=3.1.4
petsc4py
pyyaml
matplotlib
pandas
pydantic
niceplots
Getting Started
To begin using this framework, follow these steps:
- Create a DirectorySet up a directory on your machine where you want to store this framework along with the necessary software packages.
$ mkdir <directory-path> $ cd <directory-path>
- Install DependenciesFollow the Installation of Dependencies section to ensure all required dependencies are installed on your system.
- Install the PackageComplete the setup by following the steps outlined in the Package Installation section.
By completing these steps, you’ll have the framework ready for use.
Installation of Dependencies
There are two types of installation methods available - from scratch and through Docker. If you are on a local machine, we recommend using Docker as it is the easiest option. If you are on an HPC machine, only the scratch installation method is available. Singularity support will be added later. Please follow the appropriate link.
Local machine
Using Docker (Recommended)
Docker is highly recommended for ease of installation:
Setup Docker: If you do not have Docker installed in your system, follow the Docker Guide to set it up.
Pull a Docker image: Official images for GCC and INTEL compilers are available here. Follow the instructions in the link to pull an image compatible to your systems’ architecture.
Initialize and start a container, follow the instructions mentioned here to initialize and start a container. Mount the directory
<directory-path>
into the folder mentioned in here.Inside the container, navigate to the
mount
directory and clone this repository following the instructions in the Package Installation section.Run the testcase (TBD)
Note
If you are referencing any paths inside the container, they must be with respect to the container’s folder architecture, not your host machine.
From Scratch
To manually install all dependencies, we will refer to the instructions found in the Scratch Installation Guide.
(Sanjan needs to fix the local install bash file, unable to identify issue with petsc. Will do soon.)
HPC Systems (Great Lakes)
Singularity
TBD
Scratch
These instructions assume that you are on the Great Lakes HPC at UMich.
Add the following lines to your
~/.bashrc
file:# Load required modules module load gcc # GNU Compiler module load openmpi # MPI Libraries module load python/3.9.12 # Python 3.9.12 module load cmake # CMake for build systems # PETSc Installation export PETSC_ARCH=real-opt export PETSC_DIR=<directory-path>/packages/petsc-3.15.3 # CGNS Installation export CGNS_HOME=<directory-path>/packages/CGNS-4.4.0/opt-gfortran export PATH=$PATH:$CGNS_HOME/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CGNS_HOME/lib
Replace
<directory-path>
with your installation directory path. Do not forget tosource ~/.bashrc
after editing.Clone the repository:
$ git clone https://github.com/gorodetsky-umich/mdss.git
Copy and execute the installation script:
$ cd mdss $ cp mdss/install_packages_gl.sh <directory-path>/ $ chmod +x install_packages_gl.sh $ ./install_packages_gl.sh
Package Installation
The following steps are common for personal computers and HPC systems:
Clone the repository:
$ git clone https://github.com/gorodetsky-umich/mdss.git
Navigate into the directory:
$ cd mdss
Install the package:
Without dependencies:
$ pip install .
With dependencies:
$ pip install . -r requirements.txt
Editable installation:
$ pip install -e .
Editable installation with dependencies:
$ pip install -e . -r requirements.txt
Verification
To verify the installation of packages, run a MACH-Aero tutorial available available on the MDO lab website. The files required to run the tutprial can be obtained from the the MACH-Aero github repo.
Follow the steps to run a MACH-Aero tutorial:
Clone the MACH-Aero repo
$ git clone https://github.com/mdolab/MACH-Aero.git
Create a new directory to run the tutorial
$ mkdir <path-to-tutorial-directory>
$ cd <path-to-tutorial-directory>
Copy the necessary files
$ cp <path-to-mach-aero-directory>/tutorial/aero/analysis/wing_vol.cgns .
$ cp <path-to-mach-aero-directory>/tutorial/aero/analysis/aero_run.py
Run the python file To run using one processor:
python aero_run.py
To run using multiple processors:
mpirun -np <nproc> python aero_run.py
Note
Running using multiple processors helps to identify the problems with openmpi
and petsc
installations.