How dgruber/drmaa works
Project type and purpose
• This is an open-source Go library (“go-drmaa”) that wraps the DRMAA C API for job submission to cluster schedulers.
• Its goal is to provide Go applications with a native interface to the DRMAA standard, supporting Grid Engine, Torque, SLURM and others.
File structure
• Top-level Go files:
• drmaa.go / drmaa_test.go – core CGO wrapper and unit tests
• gestatus/ – subpackage with Grid-Engine-specific status utilities
• examples/ – sample Go programs demonstrating job submission, status checks, array jobs
• dockerfiles/ – helper images to build and test against Open Cluster Scheduler and SLURM C libraries
• build.sh, go.mod – build script and module definition
• README.md, LICENSE, COPYING – documentation and licensing
Key README insights
• Explains supported resource managers, compilation flags, environment setup
• Describes session lifecycle, job template allocation, job submission, waiting, termination
• Highlights C-Go boundary and need for CGO and LD_LIBRARY_PATH
Main components
a. Go-drmaa library:
– drmaa package (CGO bindings)
– gestatus subpackage
b. Example applications:
– simplesubmit, simplearrayjob, simplegestatus
c. External C DRMAA library (libdrmaa.so)
d. Cluster scheduler services:
– Univa/Grid Engine, Torque, SLURM, Open Cluster Scheduler
e. Build/packaging:
– Docker images under dockerfiles/ for each scheduler
Relationships & data flow
• Examples/apps → call Go-drmaa API
• Go-drmaa CGO layer → invokes C DRMAA functions
• C DRMAA library → communicates over network or IPC with scheduler daemons
• Scheduler → manages job lifecycle on compute nodes
Architectural patterns & design principles
• Adapter/Wrapper pattern: Go API adapts C library calls
• Separation of concerns:
• Core wrapper (drmaa) vs. scheduler-specific helpers (gestatus)
• Examples decoupled from library code
• Extensibility: Additional resource managers plugged in via build flags & CGO
Relevant technologies
• Go / CGO
• C DRMAA standard (libdrmaa.so)
• Docker for build/test environments
• Makefile / shell scripts for cross-platform builds
Final advice
• Be exhaustive: include every logical component (even small scripts) so reviewers see the full picture.