DIRAC Distributed Computing Framework

9.1.6 · active · verified Tue Apr 14

DIRAC is an interware, a software framework for distributed computing, primarily used in scientific research for managing jobs, data, and resources across heterogeneous infrastructures like Grids and Clouds. As of version 9.1.6, it supports Python 3.11 and newer, with frequent patch releases addressing fixes and minor changes, and less frequent major updates introducing significant features and deployment considerations.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import and initialize the main DIRAC programmatic client interface and retrieve the locally installed framework version. Note that full interaction with a DIRAC Grid requires a running DIRAC configuration server and proper authentication (e.g., an X.509 VOMS proxy) in your environment.

from DIRAC.Interfaces.API.Dirac import Dirac
import os

try:
    # Initialize the main DIRAC client interface
    dirac_client = Dirac()

    # Get the framework version (this is a local check and does not require a DIRAC server)
    version = dirac_client.getFrameworkVersion()
    print(f"DIRAC client initialized successfully. Framework Version: {version}")

    # For operations that require connecting to a DIRAC server (e.g., job submission, status checks),
    # you would typically need:
    # 1. A valid X.509 VOMS proxy initialized (e.g., `voms-proxy-init`)
    # 2. The DIRAC Configuration Server (CS) URL configured, usually via an environment variable
    #    e.g., os.environ.get('DIRAC_CS_URL', 'https://example.com:8443/Configuration/Server')
    # Without a running CS and proper authentication, remote calls will fail.

except Exception as e:
    print(f"Error initializing DIRAC client or getting version: {e}")
    print("Ensure 'dirac' package is installed and Python >= 3.11 is used.")

view raw JSON →