running-stata

Run Stata MP batch jobs on the Yale SOM HPC cluster via Slurm sbatch scripts.

5|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/yale-som-hpc/claude-code-marketplace --skill running-stata
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: running-stata
Source: https://github.com/yale-som-hpc/claude-code-marketplace/tree/main/plugins/hpc/skills/running-stata
Command: npx skills add https://github.com/yale-som-hpc/claude-code-marketplace --skill running-stata

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Run Stata batch jobs on the Yale SOM HPC cluster with proper logging, scratch hygiene, and core management to ensure reproducible results and clean resource usage.

Core Features & Use Cases

  • SBATCH template for Stata MP with cpus-per-task, memory, and output redirection to logs.
  • Do-file preamble and environment setup to align processors, threads, and library paths before execution.
  • Memory hygiene and data handling practices to minimize in-RAM usage and ensure clean temporary files on scratch.
  • License courtesy and job management guidelines to respect shared licenses and avoid idle sessions.
  • Scenario: Run a batch of Stata analyses in parallel via Slurm job arrays or sequential jobs while collecting per-task outputs.

Quick Start

Create a Stata MP sbatch script from the provided template and submit it with sbatch to launch the batch job.

Frequently Asked Questions about running-stata

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Stata batch jobs on an HPC cluster using Slurm?

A Stata MP sbatch template provides the structure for Slurm batch jobs by specifying cpus-per-task, memory limits, and output redirection to log files. This setup ensures proper logging, scratch usage, and core control for reproducible results on the HPC cluster.

How do I configure environment variables like OMP and OPENBLAS for Stata MP batch runs?

Configure OMP and OPENBLAS environment variables in your do-file preamble to align processors, threads, and library paths before execution. This environment setup ensures Stata MP utilizes allocated Slurm resources correctly and runs efficiently during batch processing.

Why does my Stata batch job fail due to shared license limits on the HPC cluster?

Stata batch jobs fail due to shared license limits when too many concurrent sessions are requested. Apply license courtesy guidelines by managing job arrays and avoiding idle sessions to respect shared HPC licenses and ensure job completion without conflicts.

What is the best way to handle memory and temporary files for Stata on HPC scratch storage?

The best way to handle memory and temporary files for Stata on HPC is to apply memory hygiene practices that minimize in-RAM usage and direct temporary files to scratch storage. This ensures clean resource usage and prevents scratch storage from filling up.

Can I use Slurm job arrays to run multiple Stata analyses in parallel?

Yes, you can use Slurm job arrays to run multiple Stata analyses in parallel. The sbatch template supports submitting sequential or parallel jobs via job arrays while collecting per-task outputs, ensuring each Stata batch run maintains proper logging and license compliance.