CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
crabFunctions Namespace Reference

This module provides common functions for tasks with crab3. More...

Classes

class  CertInfo
 
class  CrabController
 The CrabController class. More...
 
class  CrabTask
 Class for a single CrabRequest e This class represents one crab3 task/request. More...
 
class  TaskStats
 Class holds job statistics for several Crab tasks. More...
 

Functions

def crabCommandProcess
 Function to run crab command in a new process. More...
 

Detailed Description

This module provides common functions for tasks with crab3.

This module provides common functions for tasks with crab3. You need no create a CrabController object in order to use the functions

Function Documentation

def crabFunctions.crabCommandProcess (   q,
  crabCommandArgs 
)

Function to run crab command in a new process.

Some CRAB commands (e.g. submit) create broken cmssw process objects when they are created in multiple calls of crabCommand via CRAB API Running them in a new process is a workaround, see https://twiki.cern.ch/twiki/bin/view/CMSPublic/CRAB3FAQ#Multiple_submission_fails_with_a

Definition at line 316 of file crabFunctions.py.

References print().

317 def crabCommandProcess(q,crabCommandArgs):
318  # give crab3 the chance for one server glitch
319  i=0
320  while True:
321  i+=1
322  try:
323  res = crabCommand(*crabCommandArgs)
324  break
325  except HTTPException as e:
326  print("crab error ---------------")
327  print(e)
328  print("end error ---------------")
329  print("will try again!")
330  import time
331  time.sleep(5)
332  except CachefileNotFoundException as e:
333  print("crab error ---------------")
334  print(e)
335  print("end error ---------------")
336  print(crabCommandArgs)
337  res={ 'status':"CachefileNotFound",'jobs':{}}
338  break
339  if i>5:
340  res={ 'status':"UnexpectedError",'jobs':{}}
341  break
342  q.put( res )
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def crabCommandProcess
Function to run crab command in a new process.