Skip to content

Compute partner integration

This page is for the developers of a partner site, such as compute.nemar.org, that launches batch jobs or interactive sessions on behalf of NEMAR users. It states the principles NEMAR compute follows and the requirements a partner must meet to connect, and then how to meet them: how the partner signs people in through NEMAR, and how it reserves, reports and releases compute time through the NEMAR application programming interface (API), so that every job lands in NEMAR’s ledger. The sign-in protocol itself is on Sign in with NEMAR. Read that page first; this one adds what is specific to compute.

NEMAR compute is designed around three principles, and every requirement below comes from one of them. They describe the design; Where this stands says which parts are built.

  1. Portability. Processing is designed to run in the same nemar-process containers, under the same launcher and launch specification, on any compute endpoint: NEMAR’s own workstations, the San Diego Supercomputer Center (SDSC) supercomputers through Tapis under the National Science Foundation’s research computing program, Advanced Cyberinfrastructure Coordination Ecosystem: Services & Support (ACCESS) (planned), and partner-run sites (planned). A new endpoint is meant to be connected, not rebuilt for.
  2. NEMAR is the system of record. Accounting (the ledger, kept in the supercomputer’s service units), job records, job management (reserve, report, cancel and release) and limits are designed to stay within NEMAR, whatever endpoint runs the job. Endpoints execute; NEMAR accounts and manages.
  3. One account, one profile. A person has exactly one account, their NEMAR account. A partner signs people in with Sign in with NEMAR, and nobody needs a separate supercomputer or partner account. A person’s settings live in their NEMAR profile: affiliation, mail preferences and API keys today, and compute access and its status once compute opens. All of their jobs, from whichever front door and on whichever endpoint, will be tracked in that profile, on the website’s compute page and with nemar compute (built, not released), with the same progress and results reports (planned): the pipeline contract’s declared checkpoints, live progress and signalJourney results.

To connect as a compute partner, a site meets these requirements. Must marks a requirement that NEMAR enforces, or checks before the contract opens; a must marked commitment binds the same, but NEMAR can neither enforce nor check it, so it rests on the partner’s word; should marks what NEMAR expects unless the partner and NEMAR agree otherwise in writing. The sections after Where this stands say how to meet each one.

One account: Sign in with NEMAR.

  • The partner must use Sign in with NEMAR as the only way its users sign in, and turn off every other sign-in method on the site, its own local accounts included.
  • It must not create or require a separate partner or supercomputer account for compute. A person’s NEMAR sub is their identity at the partner and their username on the job platform, Tapis (Registration).
  • It must register as a NEMAR client with the settings below, and ask for the six scopes listed there and nothing else.

The NEMAR profile holds the person’s settings and jobs.

  • The partner must show NEMAR’s state, never a copy of its own: the person’s compute access and its status, balances and limits from GET /compute/me, and their jobs from GET /compute/me/jobs.
  • It must send a person to their NEMAR profile to request compute access or change a setting, and keep no parallel profile, balance or job ledger: NEMAR checks this before the contract opens, and afterwards it is a commitment.
  • It must mint a job platform token for a person only while access.state is active, and read it again before every launch.
  • It should honor back-channel logout, if its sign-in module supports it.

NEMAR keeps accounting, records, limits and job management.

  • The partner must reserve through NEMAR before every launch, with an Idempotency-Key, and launch nothing on a refusal: no reservation, no launch.
  • It must put the returned tag on every job, make the job match its reservation, and report the job platform’s job id as soon as the job platform accepts the job.
  • It must release the reservation when a launch fails.
  • It should declare and upload the submitted files of every batch job. NEMAR cannot enforce this, because files is optional in a report: a report without it is accepted and neither refused nor flagged, and the job’s record then holds no submitted files. Declared files enter the record only once they are uploaded and the same report is sent again.
  • It must honor every refusal and limit, including the caps NEMAR sets for the client, and accept that NEMAR cancels a job that skipped its reservation or does not match it.
  • It must not report usage to an external allocation program unless NEMAR and the partner agree it (commitment): NEMAR reports every job in the tenant itself, and two reports for one job would double-count a person. NEMAR cannot see a report the partner sends, so this one rests on the partner’s word, not on a check.

NEMAR reads each job’s status and log from the job platform itself, so the partner relays neither, and what NEMAR reads is the job’s record.

Portable jobs.

  • Where the partner launches a job that follows NEMAR’s pipeline contract, it must run it unchanged: in a nemar-process container or an image built from one, under the launcher and its launch specification, with its declared checkpoints and signalJourney results, so that, once progress reporting is built, the job reports the same progress and results as on any other endpoint. How a partner-launched job receives its launch specification is planned and not built; until it is, a partner’s jobs report job-level states only.

Interactive sessions.

  • The partner must serve interactive sessions so that their pages cannot set cookies for nemar.org, and should serve them from a host outside nemar.org, because a notebook page runs code its user writes.

As of 2026-11-22:

  • Sign in with NEMAR is released and answers in production. NEMAR registers each client by hand.
  • Accounting, job records and NEMAR’s own processing jobs are released and switched off in production: no compute job can be created there yet.
  • NEMAR’s own workstations as an endpoint are released and switched off in production. They run NEMAR’s own processing only, not a person’s or a partner’s jobs.
  • Compute access, nemar compute and this partner contract are built and tested on NEMAR’s development branch, and not released. The contract is closed: a new reservation is refused with partner_not_enabled.
  • The website’s compute pages (the compute page, job pages, and compute access in account settings) are on NEMAR’s staging site, not in production.
  • nemar-process (the launcher, the runtime image, the nemar-floor and nemar-ica recipes and the workstation runner) is public and in development, with no release yet.
  • Checkpoints, live progress and quality plugins are designed and not built.
  • Waiting for NEMAR’s tenant on the job platform at SDSC: submitting jobs to SDSC; opening this contract, which also needs the answers below and one real job record; the first real job’s measurements; and the first checks of how NEMAR reads the queue and the supercomputer’s own accounting.
  • The compute terms are published (2026-11-23); compute access cannot be requested in production until compute opens.
  • The job platform is Tapis, the job-submission service on which NEMAR runs compute. A tenant is NEMAR’s own separate space of users, applications and jobs on it. A job platform job has an id, written tapis_job_id in the API, which is a universally unique identifier (UUID).
  • The scheduler is the queueing system of the cluster, which allocates nodes from a named queue. A partition is one such queue that NEMAR offers.
  • A reservation (also called a hold) is NEMAR’s promise of compute time for one person, taken before a job is launched.
  • A graphics processing unit (GPU) partition needs at least one GPU, and a central processing unit (CPU) partition takes none.

A person signs in at the partner site through NEMAR. Before every launch, the partner asks NEMAR to reserve the time, using that person’s access token. The partner then submits the job to the job platform as that person, tells NEMAR which job it started, and NEMAR reads the job back, follows it and charges what it used. NEMAR never acts on an account number that another server supplies, and it does not trust a job’s owner or tags alone.

NEMAR registers a partner client by hand. The partner provides, and NEMAR sets:

Setting Value
Redirect addresses Exact https addresses, character for character, up to ten.
Back-channel logout address An https address on a named host, called when a person’s access ends.
Grants authorization_code and refresh_token.
Scopes openid profile orcid offline_access compute.read compute.reserve, and nothing else.
Who may sign in Only a person whose Open Researcher and Contributor identifier (ORCID iD) was proven by signing in with ORCID.
Audience Set by NEMAR at registration to the NEMAR API origin, https://api.nemar.org. The partner has nothing to send for it.
Consent screen Shown to every person, once per set of scopes unless NEMAR sets it to every sign-in; never skipped. A partner client is never first-party.
Client authentication client_secret_basic, with Proof Key for Code Exchange (PKCE) method S256 on the authorization request.
Limits NEMAR sets a cap on open reservations and a cap on the amount reserved per day for the client.

NEMAR gives the partner a client identifier and a client secret. The secret is shown once, so store it on the server and never in a browser. Rotation keeps the previous secret valid for an agreed grace period.

Every person who signs in is identified by the sub claim, nmu_ followed by 32 hexadecimal digits. It never changes and carries no personal information. Use it as the person’s username when minting their job platform token, unless the partner and NEMAR agree a fixed, reversible transform in writing. Do not use an email address or an ORCID iD as the key.

The partner contract is closed until NEMAR opens it. Until then every new valid reservation is refused with partner_not_enabled (503). NEMAR opens it only after it has confirmed that its service identity can search the tenant’s jobs by tag and read a job that another user owns.

The three write routes, POST /compute/holds, POST /compute/jobs/<job_id>/report and DELETE /compute/holds/<hold_id>, accept one credential: Authorization: Bearer <token>. The token must be a person’s authorization code token with the scope compute.reserve. Its audience must be the NEMAR API, which NEMAR set at registration. A command-line key, a session cookie or a client credentials token (a machine token that names no person) is refused with forbidden_credential.

The read routes under /compute/me accept the same kind of token with the scope compute.read. They also accept a command-line key or a session cookie of the caller’s own account, and they do not check the audience. Aggregate statistics are not part of this contract and need a separate machine registration.

Before a launch: read the person’s standing

Section titled “Before a launch: read the person’s standing”

GET /compute/me (scope compute.read) answers in every state. The field access.state says whether the person’s compute access is active: it is one of none, requested, active, suspended, denied or revoked. The answer also carries the person’s balances, limits and queue estimates. Mint a job platform token for a person only while access.state is active. Calling this route before each launch is the control that matters even if the partner cannot honor back-channel logout.

GET /compute/me/usage and GET /compute/me/jobs (scope compute.read) give the person’s usage and their jobs from every front door.

POST /compute/holds, scope compute.reserve, header Idempotency-Key.

{
"app_id": "jupyter",
"app_version": "1.0.0",
"kind": "interactive",
"partition": "<a partition NEMAR offers>",
"nodes": 1,
"cores": 4,
"gpus": 0,
"minutes": 120
}

The body is strict: an unknown field is refused, not ignored. cores and memory_mb are per node. memory_mb is optional and may be null. A GPU partition needs at least one GPU and a CPU partition takes none. The answer is 201:

{
"job_id": "job_<24 hex digits>",
"hold_id": "hold_<24 hex digits>",
"tag": "nemar_job:job_<24 hex digits>",
"expires_at": "2026-11-10 18:30:00",
"state": "created"
}

state is created while no job has been reported under the reservation, and the job’s current state after that. On the answer to a repeated key, replayed: true is added. expires_at is the time after which NEMAR looks for a job under the tag and, finding none, releases the reservation, so report the job before it.

expires_at is a Coordinated Universal Time (UTC) time written YYYY-MM-DD HH:MM:SS, with no zone marker and a space where ISO 8601 has T. A parser must be told that it is UTC. This format may change before the contract opens.

No reservation, no launch.

The order of the checks matters, because the first one that fails is the answer and a refusal writes nothing:

  1. The person’s standing: no_compute_access or suspended.
  2. The body: invalid_spec, with the field.
  3. A repeat of a key that was already used replays the earlier reservation, whether or not the contract is open. If that reservation has ended with no job reported under it, the answer is hold_released or hold_cancelled instead of a live reservation.
  4. For a new reservation only, partner_not_enabled (503) while the contract is closed.
  5. The owner’s ceilings (partition_not_offered, over_job_limit), then the person’s live jobs (over_concurrency).
  6. The reservation itself: the balances (insufficient_balance, then platform_budget_exhausted), then the person’s live jobs (over_concurrency) and this client’s limits (client_cap_reached), and last NEMAR’s share of the cluster (platform_busy). platform_busy is not a queue: nothing is held for a later slot, so ask again shortly.
Field Bound
kind batch or interactive.
app_id 1 to 80 characters from A-Za-z0-9._-.
app_version 1 to 64 characters from A-Za-z0-9._+-.
nodes An integer, 1 to 64.
cores An integer, 0 to 256.
memory_mb Optional, may be null; an integer, 1 to 16777216.
gpus An integer, 0 to 8.
minutes An integer, 1 to 10080.
Hold body At most 8192 bytes, and valid UTF-8 text.
Report tapis_job_id 1 to 64 characters, letters, digits and hyphens, starting with a letter or digit.
Report files Optional; if present, at least 1 and at most 500 entries.
File path 1 to 512 characters. A path that tries to leave the job’s own directory is refused.
File size An integer, 0 or more.
File sha256 The Secure Hash Algorithm 256 (SHA-256) digest of the file as 64 lowercase hexadecimal digits; uppercase is refused.
Report body At most 1,204,096 bytes.

The owner may set lower ceilings than these for a partition, and a request above them is refused with over_job_limit. A body or a field outside a bound is invalid_spec, with field naming the field and never a value. File entries are strict too: an entry with any field besides path, size and sha256 is refused.

Submit the job as the person, with the returned tag on the job. NEMAR matches the job by the identifier you report next, not by the tag, because a job’s owner can edit its tags.

NEMAR reads the job back from the job platform itself and compares it with the reservation. A job that differs is refused as report_mismatch. The job must have:

  • the queue equal to the reserved partition, and, if NEMAR has pinned an execution system for partner jobs, that system;
  • the application and version of the reservation;
  • no scheduler options beyond one --gpus=N with N within the reserved GPUs, plus any options the owner has explicitly allowed; an option such as --exclusive or --mem is resources_mismatch;
  • nodes, cores per node, memory and minutes not above the reservation; a figure the job does not carry fails the check, and so does memory when the job states none;
  • a price, computed from the job’s own resources for every minute it may run, not above the amount held;
  • the owner equal to the person’s sub exactly.

Report before expires_at. After the reservation has ended the answer is hold_released. After the person’s access has ended it is suspended or no_compute_access.

POST /compute/jobs/<job_id>/report, scope compute.reserve, header Idempotency-Key, as soon as the job platform accepts the job.

{
"tapis_job_id": "<the job platform's job id>",
"files": [{ "path": "run.py", "size": 120, "sha256": "<64 lowercase hex digits>" }]
}

files is optional and lists what was submitted (scripts, notebooks, parameter files) for the person’s record. The first accepted list is pinned to the job: a different list in a later report is invalid_spec with the field files. The answer, 200 or 202, is:

{
"job_id": "job_<24 hex digits>",
"verification": "verified",
"state": "submitted",
"files": {
"state": "awaiting_upload",
"uploads": [
{ "path": "run.py", "url": "<address>", "method": "PUT", "headers": {} }
],
"expires_at": "<an ISO 8601 time with T and Z>"
}
}

verification is verified or pending. state is the job’s state. files is present only when the report declared files: its state is awaiting_upload or recorded, and uploads and expires_at appear only for awaiting_upload. Upload each file to its address with a PUT and exactly the headers given, before the address expires, then send the same report again. The upload addresses are secrets. On the answer to a repeated key, replayed: true is added. Unlike the reservation’s expires_at, the upload expires_at is an ISO 8601 time with T and Z.

For an interactive session the record is the session itself: application, resources, times and outcome. NEMAR does not capture what a person does inside a session.

  • 200 verified: NEMAR read the job back and it matches the reservation. From now on it is an ordinary job that NEMAR follows and charges for what it uses. Files are copied into the record only after the match.
  • 202 pending: NEMAR could not read the job back just now. Nothing is charged beyond the reservation meanwhile; repeat the same report to learn the outcome.
  • 409 report_mismatch: the job does not match the reservation. The refusal carries job_id and mismatch, which says why: owner_mismatch, app_mismatch, resources_mismatch or unverifiable. NEMAR cancels the job, flags it for its administrators, and records its use against a pool for the partner site, not the person. This is NEMAR’s own accounting and not an invoice to the partner.

Two refusals look alike and differ in what happened. tapis_job_unreadable (422) means NEMAR’s own credential was refused when it tried to read the job, or the answer was not usable; the job is not bound, so fix the cause and report again. unverifiable means the job is bound but NEMAR could not read it for about two hours, and it is refused as a report_mismatch. tapis_job_not_found (422) means the job platform has no such job.

A second job cannot be reported under one reservation (already_bound). Repeating the same report is allowed and is how the partner learns a pending outcome. tapis_job_in_use means the job is already bound to another reservation or is NEMAR’s own.

DELETE /compute/holds/<hold_id>, scope compute.reserve, header Idempotency-Key (without it the answer is idempotency_key_required, 400), when a launch fails before the job platform accepts the job. The answer is 200:

{ "job_id": "job_<24 hex digits>", "hold_id": "hold_<24 hex digits>", "released": true, "state": "cancelled" }

Releasing a reservation that is already released answers 200 again. A reservation with a reported job cannot be released (hold_bound).

A reservation that has no reported job by expires_at is not simply dropped: NEMAR first searches the tenant for the tag, binds the job if one exists, and releases the reservation only if none does.

All three write routes need an Idempotency-Key of 1 to 64 letters, digits and . _ : -. The same request means a byte-identical one: NEMAR hashes the method, the path, the person and the exact body text, so a body that was re-serialized, even to the same meaning, is a different request and is refused with idempotency_conflict (422). A repeated key with the same request returns the earlier answer, with the header Idempotent-Replayed: true. A key with a different request writes nothing. NEMAR keeps keys for a limited time, so never reuse a key for a new request.

A refusal is { "error": "<sentence>", "code": "<word>" }, with field for invalid_spec, mismatch and job_id for report_mismatch, and Cache-Control: no-store. For reserve, report and release the words are a closed list:

Group Words (status)
Credential missing_credential (401), invalid_token (401), forbidden_credential (403), insufficient_scope (403), wrong_audience (403)
Request idempotency_key_required (400), invalid_spec (400), idempotency_conflict (422)
The person and the balances no_compute_access (403), suspended (403), partition_not_offered (422), over_job_limit (422), over_concurrency (409), insufficient_balance (409), platform_budget_exhausted (409), client_cap_reached (409), platform_busy (409)
A reservation job_not_found (404), already_bound (409), tapis_job_in_use (409), tapis_job_not_found (422), tapis_job_unreadable (422), hold_released (409), hold_cancelled (409), hold_bound (409), report_mismatch (409)
Files bundle_too_many_files (413), bundle_too_large (413)
The platform partner_not_enabled (503), compute_disabled (503), policy_unavailable (503), storage_unavailable (503)

The read routes have their own words. A job that is another person’s, another client’s or does not exist is always job_not_found. Do not launch on any refusal.

While compute is on in production, NEMAR also searches the tenant on a schedule for jobs it has no reservation for. It cancels such a job if it is still live, flags it for NEMAR’s administrators, and records its use against a pool for the partner site, not a person, because a job’s owner is not proof of who ran it. This is NEMAR’s accounting and not an invoice to the partner. NEMAR can move the charge once it is established who ran the job.

NEMAR records each job’s reservation, its report, what was submitted, the job’s log and its output listing. Records are kept for the retention periods set out in the compute terms. For an interactive session, NEMAR does not capture what you do inside the session; the record of a session is its application, resources, times and outcome. NEMAR keeps the person’s usage current and charges the person’s pool, or the partner site’s pool, as described above. The compute terms and the compute sections of the privacy policy that govern this are separate documents and apply once compute opens.

These are the open questions that decide whether the contract can be opened. Each one comes from a requirement above.

  1. Can NEMAR’s service identity search the tenant’s jobs by tag, list every person’s jobs including hidden ones, read any job’s record, status, log and outputs, and subscribe to any job’s events? NEMAR reads status and logs from the job platform itself, so this is what keeps the record in NEMAR. Can the same identity also submit with an owner set to a person?
  2. Which characters and what length does the job platform accept in a username, so that the 36-character sub is valid?
  3. Does the sign-in module support PKCE with S256, client_secret_basic, refresh tokens and back-channel logout, and can the site turn off every other sign-in method, its own local accounts included?
  4. How short can job platform token lifetimes be set, and can the partner’s token-minting credential be limited to this tenant without an administrator role?
  5. How does a person’s job platform username get permission to run NEMAR’s applications and use the execution system: tenant-wide sharing, or sharing at approval?
  6. Can interactive sessions be served from a host outside nemar.org?
  7. Do the partner’s applications already report usage to an external allocation program?
  8. Can the site’s pages show a person’s access, balances, limits and jobs from NEMAR’s API in place of records of its own?
  9. Can the site’s application forms launch NEMAR’s launcher application with a launch specification, so that a job following NEMAR’s pipeline contract runs as it does on NEMAR’s other endpoints?