-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for CRAB3_CACHE_FILE=/dev/null #5337
Comments
Hi @belforte, It seems like there is still some trouble when using [aakhmets@lxplus917 CMSSWWithCrab]$ crab resubmit -d /afs/cern.ch/work/a/aakhmets/private/htt_data_crab_nanoaod_submission_25-11-2024_prodreleasev12/crab/crab_data_2018UL_tau_Tau_Run2018A --maxmemory 4000
Rucio client intialized for account aakhmets
Found no jobs to resubmit. Only jobs in status failed can be resubmitted. Jobs in status finished can also be resubmitted, but only if the jobids are specified and the force option is set.
[aakhmets@lxplus917 CMSSWWithCrab]$ export CRAB3_CACHE_FILE=/dev/null
[aakhmets@lxplus917 CMSSWWithCrab]$ crab resubmit -d /afs/cern.ch/work/a/aakhmets/private/htt_data_crab_nanoaod_submission_25-11-2024_prodreleasev12/crab/crab_data_2018UL_tau_Tau_Run2018A --maxmemory 4000
Error: Please indicate the CRAB project directory with --dir=<project-directory>. I think this is somewhat related to the following lines of code: CRABClient/src/python/CRABClient/Commands/SubCommand.py Lines 666 to 691 in da79107
It seems like when not using the variable being set tu Would you please have a closer look? |
Submission and status query work fine with |
thanks @ArturAkh for reporting. I guess I did not test all use cases :-( |
I can easily reproduce, so should be able to fix. |
Thanks a lot, @belforte! |
the problem is that I could easily fix @ArturAkh let me know if you want a recipe for running your own version of CRABClient with just resubmit fixed. |
Ok thanks for the clarification, @belforte! I agree that having the project directory properly propagated would be the solution to go for. The issue is not urgent, so there is no need to rush :) Just wanted to bring it up since I 've stumbled across that. In any case, I'd appreciate it very much if you would provide me with a recipe to run custom crab client to try thing out :) |
happy to do ! diff --git a/src/python/CRABClient/Commands/resubmit.py b/src/python/CRABClient/Commands/resubmit.py
index 9178495..940a42e 100644
--- a/src/python/CRABClient/Commands/resubmit.py
+++ b/src/python/CRABClient/Commands/resubmit.py
@@ -31,7 +31,7 @@ class resubmit(SubCommand):
def __call__(self):
- statusDict = getMutedStatusInfo(self.logger)
+ statusDict = getMutedStatusInfo(logger=self.logger, projdir=self.options.projdir)
jobList = statusDict['jobList']
if self.splitting == 'Automatic' and statusDict['dbStatus'] == 'KILLED':
diff --git a/src/python/CRABClient/UserUtilities.py b/src/python/CRABClient/UserUtilities.py
index f6fd71d..47125dc 100644
--- a/src/python/CRABClient/UserUtilities.py
+++ b/src/python/CRABClient/UserUtilities.py
@@ -193,7 +193,7 @@ def setConsoleLogLevel(lvl):
for h in logging.getLogger('CRAB3.all').handlers:
h.setLevel(lvl)
-def getMutedStatusInfo(logger=None, proxy=None):
+def getMutedStatusInfo(logger=None, proxy=None, projdir=None):
"""
Mute the status console output before calling status and change it back to normal afterwards.
"""
@@ -202,6 +202,9 @@ def getMutedStatusInfo(logger=None, proxy=None):
if proxy:
cmdargs.append("--proxy")
cmdargs.append(proxy)
+ if projdir:
+ cmdargs.append("-d")
+ cmdargs.append(projdir)
cmdobj = getattr(mod, 'status')(logger=logger, cmdargs=cmdargs)
loglevel = getConsoleLogLevel()
setConsoleLogLevel(LOGLEVEL_MUTE)
|
Interestingly Because it already passed
so:
not so bad ! |
Thanks a lot, Stefano, sounds like a good plan :) I'll try the instructions for a customized client out. |
logging in CRABClient is more tricky than I thought. Mostly if I put my hands in there I could not resist making larger chances to make things clear and flush to file more frequently. I better leave it alone and just add |
ref. https://cms-talk.web.cern.ch/t/adapting-usage-of-crab3-file-in-case-multiple-processes-trying-to-access-it/54334/4
current code does
The text was updated successfully, but these errors were encountered: