Overview
HH-suite uses CMake as its build system and supports various architectures and SIMD instruction sets. This guide covers advanced compilation options for optimal performance.Requirements
Compiler Requirements
GCC
Version 4.8 or later required
Clang
Version 3.6 or later supported
Intel ICC
Fully supported with optimizations
CMake
Version 2.8.12 or later required
System Requirements
- 64-bit system (x86_64, ARM64, or PPC64LE)
- At least SSE2 instruction set support (x86/x64)
- OpenMP support (recommended for multi-threading)
- MPI library (optional, for distributed computing)
Basic Compilation
The simplest way to compile HH-suite:CMake Build Options
SIMD Instruction Sets
HH-suite supports various SIMD instruction sets for performance optimization:- x86/x64
- ARM
- POWER
CMake Options
AVX2 is approximately 2x faster than SSE2. Use
-DHAVE_AVX2=1 if your CPU supports it.Core Build Options
| Option | Default | Description |
|---|---|---|
CHECK_MPI | 1 | Enable MPI availability check |
NATIVE_ARCH | 1 | Use native architecture for SIMD |
EXE_SUFFIX | "" | Optional executable suffix for SIMD builds |
ENABLE_SANITIZERS | 0 | Enable memory/thread sanitizers (debug) |
CMAKE_BUILD_TYPE | Release | Build type (Release/Debug) |
Example: Custom SIMD Build
Build for a specific architecture without native detection:hhblits_avx2, hhsearch_avx2, etc.
OpenMP Support
OpenMP is automatically detected and enabled if available. It provides:- Multi-threaded profile alignment
- Parallel database searches
- Additional
*_ompexecutables (hhblits_omp,hhsearch_omp,hhalign_omp,hhblits_ca3m)
MPI Compilation
Prerequisites
Install an MPI implementation:- Ubuntu/Debian
- RHEL/CentOS
- macOS
Build with MPI
hhblits_mpihhsearch_mpihhalign_mpicstranslate_mpi
Running MPI Programs
Example: Distributed Search
Platform-Specific Notes
macOS Compilation
Static Builds
For portable binaries:Advanced Compiler Flags
Intel Compiler Optimizations
-fp-model precise flag is automatically set for ICC to ensure consistent results.
Custom SIMD Flags
If auto-detection fails:Viterbi Algorithm Variants
HH-suite compiles multiple Viterbi algorithm variants for different scoring modes:CMakeLists.txt (src/)
- CELLOFF: Exclude regions from alignment
- SS_SCORE: Include secondary structure scoring
Troubleshooting
Error: 'Insufficient gcc version'
Error: 'Insufficient gcc version'
Update GCC to version 4.8 or later:
Error: 'At least SSE2 is needed to compile'
Error: 'At least SSE2 is needed to compile'
Your CPU is too old. Check SIMD support:
MPI not detected
MPI not detected
Ensure MPI is in your PATH:
Performance is slow
Performance is slow
Verify SIMD flags are applied:
Verification
After compilation, verify the build:Next Steps
Parameters
Learn about command-line parameters
Algorithms
Understand the underlying algorithms