Installation
Amigo uses C++ under the hood, so it needs a compiler and a few native libraries. The easiest way to get everything set up is with Conda — it handles the tricky parts (CMake, MPI, MKL) automatically.
Quick Start (Recommended)
1. Install Miniconda
If you don't have Conda yet, install Miniconda.
2. Platform Prerequisites
- Windows
- macOS
- Linux
Install Visual Studio Build Tools (free):
- Download Visual Studio Build Tools
- Run the installer and select "Desktop development with C++"
- Complete the installation
Install the Xcode Command Line Tools (provides the C++ compiler):
xcode-select --install
Install a C++ compiler and make (most distributions include these):
# Ubuntu/Debian
sudo apt install build-essential
# Fedora
sudo dnf install gcc-c++ make
3. Create the Conda Environment
Clone the repository and create the environment:
git clone https://github.com/smdogroup/amigo.git
cd amigo
conda env create -f environment.yml
conda activate amigo
4. Install Amigo
pip install -e .
That's it! You're ready to run the examples.
Verifying the Installation
Run a quick test to make sure everything works:
cd examples
python -c "import amigo; print('Amigo installed successfully!')"
Advanced Options
OpenMP Support
To enable OpenMP parallelization:
pip install -e . -v \
-Ccmake.args="-DCMAKE_CXX_COMPILER=mpicxx" \
-Ccmake.args="-DAMIGO_ENABLE_OPENMP=ON" \
-Ccmake.args="-DAMIGO_ENABLE_CUDA=OFF"
CUDA Support
For GPU acceleration (requires NVIDIA GPU and CUDA toolkit):
pip install -e . -v \
-Ccmake.args="-DCMAKE_CXX_COMPILER=mpicxx" \
-Ccmake.args="-DAMIGO_ENABLE_OPENMP=OFF" \
-Ccmake.args="-DAMIGO_ENABLE_CUDA=ON" \
-Ccmake.args="-DCUDSS_HOME=/path/to/cudss" \
-Ccmake.args="-DAMIGO_ENABLE_CUDSS=ON" \
-Ccmake.args="-DCMAKE_CUDA_ARCHITECTURES=native"
You cannot enable both CUDA and OpenMP at the same time.
OpenMDAO Integration
pip install amigo[openmdao]
Troubleshooting
CMake can't find BLAS/LAPACK (Windows)
Make sure the amigo conda environment is activated. Conda provides MKL which CMake detects automatically.
CMake can't find MPI
Conda installs MPI automatically via mpi4py. Ensure the conda environment is activated before running pip install.
Compiler not found (Windows)
Ensure Visual Studio Build Tools is installed with the "Desktop development with C++" workload. You may need to restart your terminal after installation.
Compiler not found (macOS)
Run xcode-select --install and accept the license agreement. If you already have Xcode installed, this step is not needed.