Getting Started¶
Prerequisites¶
- Python 3.10+
- Google Cloud SDK (gcloud CLI)
- A GCP project with billing enabled
Installation¶
From source¶
git clone https://github.com/odakan/ops-hpc.git
cd ops-hpc
pip install ".[gui]" # with GUI
pip install . # CLI only
From PyPI (future)¶
pip install "ops-hpc[gui]"
First-time Setup¶
1. Authenticate with GCP¶
gcloud auth application-default login
gcloud config set project <YOUR_PROJECT_ID>
2. Enable OS Login¶
OS Login maps your Google account to a consistent POSIX username across all VMs. This is required for reliable SSH access.
gcloud compute project-info add-metadata --project=<YOUR_PROJECT_ID> --metadata enable-oslogin=TRUE
Your SSH username will be your email with special characters replaced by underscores (e.g. user_example_com). You'll need this when creating your profile.
3. Create a profile¶
ops-hpc config create my-profile
This prompts for your GCP project ID, zone, and SSH username (the OS Login username from step 2).
4. Run setup¶
ops-hpc setup
This automatically:
- Verifies authentication
- Checks OS Login is enabled
- Creates the GCS results bucket
- Grants the VM service account storage write access
- Checks H3 CPU quota
H3 Quota
H3 quota defaults to 0. If setup reports insufficient quota:
- Go to IAM & Admin > Quotas
- Filter for
H3_CPUSin your region (e.g.,us-central1) - Request limit of 88
- Also request
PREEMPTIBLE_CPUS= 88 for spot VMs
Google usually approves within a few hours to a couple days.
5. Build the OpenSees image¶
ops-hpc build
This creates a spot VM, builds OpenSees with Intel oneAPI (~30 min), saves a reusable image, and deletes the VM.
- Estimated cost: ~$1.50 (spot)
- Image stored at ~$2.50/mo (archive to ~$0.65/mo when not in use)
6. Run your first analysis¶
Create a jobs file jobs.txt:
# directory analysis_min upload_min
opsmp_analysis 120 30
Test with a spot VM:
ops-hpc run --jobs jobs.txt --spot
For real analyses, omit --spot to use standard (non-preemptible) VMs:
ops-hpc run --jobs jobs.txt
7. Download results¶
Results are automatically downloaded if the GUI is running. For CLI:
ops-hpc results
8. Check status anytime¶
ops-hpc status # quick check
ops-hpc status --usage # include compute cost breakdown