Skip to content
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 CentOS7 option in FCCAnalysisRun so older version still runs. #329

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion python/FCCAnalysisRun.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,24 @@ def sendToBatch(rdfModule, chunkList, process, analysisFile):
LOGGER.warning('I/O error(%i): %s', e.errno, e.strerror)
time.sleep(10)
frun_condor = open(frunfull_condor, 'w')
makeConfig = open(localDir+'/build/CMakeFiles/CMakeConfigureLog.yaml', 'r')
zuoxunwu marked this conversation as resolved.
Show resolved Hide resolved
make_content = makeConfig.read()
sysVer_str = ''
if 'centos7' in make_content:
sysVer_str = '(OpSysAndVer =?= "CentOS7")'
if 'almalinux9' in make_content:
sysVer_str = '(OpSysAndVer =?= "AlmaLinux9")'
if sysVer_str == '':
LOGGER.warning('FCCAnalysis was compiled in an environment not available in lxplus HTcondor. Please check.'
'Submitting jobs to default operating system. There may be compatibility issues.')
subprocess.getstatusoutput('chmod 777 {}'.format(frunfull_condor))
frun_condor.write('executable = $(filename)\n')
frun_condor.write('Log = {}/condor_job.{}.$(ClusterId).$(ProcId).log\n'.format(logDir,process))
frun_condor.write('Output = {}/condor_job.{}.$(ClusterId).$(ProcId).out\n'.format(logDir,process))
frun_condor.write('Error = {}/condor_job.{}.$(ClusterId).$(ProcId).error\n'.format(logDir,process))
frun_condor.write('getenv = False\n')
frun_condor.write('environment = "LS_SUBCWD={}"\n'.format(logDir)) # not sure
frun_condor.write('requirements = ( (Machine =!= LastRemoteHost) && (TARGET.has_avx2 =?= True) )\n')
frun_condor.write('requirements = ({} && (Machine =!= LastRemoteHost) && (TARGET.has_avx2 =?= True) )\n'.format(sysVer_str))
frun_condor.write('on_exit_remove = (ExitBySignal == False) && (ExitCode == 0)\n')
frun_condor.write('max_retries = 3\n')
frun_condor.write('+JobFlavour = "{}"\n'.format(getElement(rdfModule, "batchQueue")))
Expand Down