iLCDirac - DIRAC extension for ILC/CLIC/FCC

35.0.11 · active · verified Wed Apr 15

iLCDirac is the iLC/CLIC/FCC extension of DIRAC, providing tools and services for distributed computing within the International Linear Collider, CLIC, and Future Circular Collider communities. It is currently at version 35.0.11 and follows the release schedule of the main DIRAC project, with frequent updates.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to define a basic iLCDirac job using the `LCJob` class and append a `Marlin` application. It covers setting job properties, application details, and output specifications. Note that actual job submission to the grid requires a fully configured DIRAC client environment and a valid VOMS proxy, which are not covered in this minimal code snippet.

from ILCDIRAC.Interfaces.API.NewInterface.LCJob import LCJob
from ILCDIRAC.Interfaces.API.NewInterface.Applications import Marlin

# Note: A full DIRAC environment (with configuration and a valid VOMS proxy)
# is required for actual job submission. This example focuses on API object creation.

# 1. Create an LCJob instance
job = LCJob()
job.setName('MyILCDiracJob')
job.setPlatform('x86_64-slc6-gcc44-opt') # Example platform, choose one appropriate for your grid
job.setCPUTime(3600) # Example: 1 hour CPU time limit

# 2. Define an application, e.g., Marlin
marlin_app = Marlin()
marlin_app.setVersion('v01-08-01') # Specify a valid Marlin version available on the grid
marlin_app.setSteeringFile('my_steering_file.xml') # Path to a steering file
marlin_app.setInputData(['LFN:/ilc/user/exampleuser/input.slcio']) # Logical File Name for input data

# 3. Add the application to the job
job.appendApplication(marlin_app)

# 4. Define output data and where to store it
job.setOutputData(['output.root'], OutputSE='CERN-USER') # Store output.root in CERN-USER Storage Element
job.setOutputSandbox(['stdout.log', 'stderr.log']) # Files to retrieve to local sandbox

# Print job definition summary
print(f"Created ILCDIRAC Job '{job.getName()}'")
print(f"  Platform: {job.getPlatform()}")
print(f"  CPU Time: {job.getCPUTime()} seconds")
if job.applications:
    print(f"  Application: {job.applications[0].__class__.__name__} (Version: {job.applications[0].version})")
print(f"  Output Data: {job.outputData}")
print(f"  Output Sandbox: {job.outputSandbox}")

# To submit this job to the DIRAC grid, you would typically use:
# from DIRAC.Core.Base.Script import parseCommandLine
# parseCommandLine() # This initializes the DIRAC environment
# result = job.submit()
# if result['OK']:
#     print(f"Job submitted with ID: {result['Value']}")
# else:
#     print(f"Submission failed: {result['Message']}")

view raw JSON →