Building from Source
macOS (Apple Silicon — recommended for development)
cmake -B build \
-DMETAL_COMPUTE=ON \
-DBUILD_FORGEVIEW=ON \
-DMPISupport=OFF
cmake --build build -j$(sysctl -n hw.logicalcpu)
Linux (NVIDIA GPU via NVIDIA HPC SDK)
cmake -B build \
-DCMAKE_CXX_COMPILER=nvc++ \
-DOPENACC_GPU=ON \
-DMPISupport=ON
cmake --build build -j$(nproc)
Linux (CPU only)
cmake -B build -DOPENACC_GPU=OFF -DMPISupport=OFF
cmake --build build -j$(nproc)
CMake Options
| Option |
Default |
Effect |
-DMETAL_COMPUTE=ON |
ON (macOS only) |
Apple Metal GPU backend |
-DOPENACC_GPU=ON |
ON |
NVIDIA CUDA/OpenACC GPU backend |
-DOPENACC_MP=ON |
OFF |
OpenACC multi-threading on CPU (PGI only) |
-DMPISupport=ON |
ON |
MPI-distributed executables |
-DBUILD_FORGEVIEW=ON |
ON |
forgeview TUI monitor |
-DENABLE_DOUBLE_PRECISION=ON |
OFF |
Double precision throughout |
Docker (Linux GPU)
docker pull mechneurolab/forge
docker run --gpus all -it mechneurolab/forge
Build Your Own Image
# Base image (NVIDIA HPC SDK + dependencies)
docker build -t forge-hpcsdk docker/forge-hpcsdk/
# Runtime image (clones and builds forge)
docker build -t forge docker/forge/
Testing
# CPU tests
./build/cpu_tests
# Metal GPU tests (macOS)
./build/metal_tests