Skip to contentSkip to Content
DocsGetting StartedInstallation

Installation

Prerequisites

SPIRES requires:

  • C compiler: GCC 9+ or Clang 12+
  • OpenBLAS: High-performance BLAS implementation
  • LAPACKE: C interface to LAPACK
  • OpenMP: For parallel reservoir operations (optional but recommended)

Install Dependencies

macOS (Homebrew)

brew install openblas lapack libomp

Ubuntu / Debian

sudo apt install libopenblas-dev liblapacke-dev libomp-dev

Fedora / RHEL

sudo dnf install openblas-devel lapack-devel libomp-devel

Clone and Build

git clone https://github.com/txmastin/spires.git cd spires make

The build produces libspires.a (static library) and libspires.so (shared library) in the build/ directory.

Add the following to your compiler invocation:

gcc -o my_program my_program.c \ -I/path/to/spires/include \ -L/path/to/spires/build \ -lspires -lopenblas -llapacke -lm -fopenmp

Verify Installation

#include <spires.h> #include <stdio.h> int main(void) { spires_reservoir_config cfg = { .num_neurons = 100, .num_inputs = 1, .num_outputs = 1, .spectral_radius = 0.9, .neuron_type = SPIRES_NEURON_LIF_DISCRETE, .connectivity_type = SPIRES_CONN_RANDOM, }; spires_reservoir *r = NULL; spires_status s = spires_reservoir_create(&cfg, &r); if (s == SPIRES_OK) { printf("SPIRES is working!\n"); spires_reservoir_destroy(r); } return 0; }

Next: Quickstart →

Last updated on