Skip to content

Releases: qcserestipy/gohpc

v0.2.0 – Context-Aware Worker Pool & Graceful Shutdown

21 May 19:45
4c6ab9d

Choose a tag to compare

This release adds full context-cancellation support across the WorkerPoolExecutor, enabling timeouts and clean interrupt handling.

🚀 Highlights

  • Context-Aware Dispatch & Workers
    Task dispatch, worker loops, and result collection are all now guarded with select on ctx.Done(), so cancellations and deadlines propagate immediately.

  • Graceful Shutdown
    Producer, workers, and collector all exit cleanly on context cancellation—no goroutine leaks or deadlocks.

  • Error Propagation
    Run returns context.Canceled or context.DeadlineExceeded when aborted, allowing callers to handle timeouts or interrupts.

  • Documentation Updates

    • Expanded README with a Quick Start example using signal.NotifyContext for Ctrl+C support.
    • Clarified best practices for preserving task order and adding cancellation checks.

Thank you for using GoHPC—enjoy safer, more responsive parallel execution!

Full Changelog: v0.1.0...v0.2.0

v0.1.0 – First Light

14 May 21:06
3a3e44a

Choose a tag to compare

Release v0.1.0 “First Light” 🚀

Release Date: 2025-05-14

🎉 Highlights

  • Generic WorkerPoolExecutor

    • Introduced a type-safe, generic WorkerPoolExecutor[T, R] in pkg/workerpool/pool.go.
    • Supports any input/output types via Go 1.18+ generics.
    • Arbitrary functions can be dispatched to NumWorkers goroutines and results are returned in input order.
  • Command-Line π Approximation Example

    • cmd/example/main.go (aliased as bin/pi in CI) now accepts a -n flag for total Monte Carlo trials.

    • Prints detailed run metadata:

      • Number of trials
      • CPU core count
      • Work distribution
      • Per-worker RNG seeding debug logs
      • Final π approximation, error w.r.t. math.Pi, elapsed time, and throughput.
  • Per-Worker Independent RNG

    • Each task/worker is seeded once at startup to avoid contention on the global RNG.
  • Structured Logging

  • GitHub CI Workflow

    • go.yml CI pipeline:

      1. Builds cmd/example/main.go as bin/pi
      2. Runs a smoke test: ./bin/pi -n 10000000000 on each push to main
    • Ensures performance regression checks on full-scale Monte Carlo runs.

🛠️ Installation

go get github.com/qcserestipy/gohpc

📦 Usage

# Build the CLI:
go build -o bin/pi cmd/example/main.go

# Run with your desired sample count:
./bin/pi -n 10000000000

🔭 Roadmap

  • v0.2.0

    • Add SIMD-accelerated random number generators
    • Implement parallel BLAS/LAPACK wrappers
  • v1.0.0

    • Introduce distributed task scheduling over multi-node clusters
    • Support GPU offloading for heavy‐compute kernels

❤️ Contributing

Contributions, issues, and feature requests are welcome!
Please open an issue or pull request on [GitHub](https://github.com/qcserestipy/gohpc).


Thank you for using GoHPC!

Full Changelog: https://github.com/qcserestipy/gohpc/commits/v0.1.0