Commit 344ef7a2 authored by Ewelina Maria Lobodzinska's avatar Ewelina Maria Lobodzinska
Browse files

Merge branch '21.6-Res-FixOpenLoopPaths' into '21.6'

Fix OpenLoop Path for Powheg-Box-Res processes ttbb and bblvlv

See merge request !27166
parents 1b2f19bf b4f24ffb
......@@ -19,6 +19,9 @@ class bblvlv(PowhegRES):
"""
super(bblvlv, self).__init__(base_directory, "b_bbar_4l", **kwargs)
# This is a hacky fix that's needed at the moment...
self.manually_set_openloops_paths()
# Add all keywords for this process, overriding defaults if required
self.add_keyword("allrad", 1)
self.add_keyword("alpha")
......
......@@ -8,27 +8,6 @@ from ..external import ExternalMadSpin
logger = Logging.logging.getLogger("PowhegControl")
def _manually_set_openloops_paths():
'''
Manual fix for OpenLoops libraries path, avoiding issues when /afs not available
This is NOT a viable long-term solution and should be made obsolete after the migration
away from AFS is more advanced.
'''
import os
logger.warning("Applying manual, hard-coded fixes for OpenLoops library paths")
logger.info("OpenLoopsPath (before) = {0}".format(os.getenv('OpenLoopsPath')))
logger.info("LD_LIBRARY_PATH (before) = {0}".format(os.getenv('LD_LIBRARY_PATH')))
OLPath = "/cvmfs/atlas.cern.ch/repo/sw/Generators/powheg/ATLASOTF-00-04-00/POWHEG-BOX-RES/ttbb/obj-gfortran"
os.environ['OpenLoopsPath'] = OLPath
ldpath = os.getenv('LD_LIBRARY_PATH')
ldpath_new = OLPath+ ":" + OLPath + "/proclib:" + ldpath
os.environ['LD_LIBRARY_PATH'] = ldpath_new
logger.info("OpenLoopsPath (after) = {0}".format(os.getenv('OpenLoopsPath')))
logger.info("LD_LIBRARY_PATH (after) = {0}".format(os.getenv('LD_LIBRARY_PATH')))
# Dictionary to convert the PowhegControl decay mode names to the appropriate
# decay mode numbers understood by Powheg
#
......@@ -65,7 +44,7 @@ class ttbb(PowhegRES):
super(ttbb, self).__init__(base_directory, "ttbb", **kwargs)
# This is a hacky fix that's needed at the moment...
_manually_set_openloops_paths()
self.manually_set_openloops_paths()
# This process' integration needs Athena to be set to run at least two parallel processes
# Advise the user about this here:
......
......@@ -19,6 +19,24 @@ class PowhegBase(Configurable):
@author Stefan Richter <stefan.richter@cern.ch>
"""
def manually_set_openloops_paths(self):
'''
Manual fix for OpenLoops libraries path, avoiding issues when /afs not available
This is NOT a viable long-term solution and should be made obsolete after the migration
away from AFS is more advanced.
'''
import os
logger.warning("Applying manual, hard-coded fixes for OpenLoops library paths")
logger.info("OpenLoopsPath (before) = {0}".format(os.getenv('OpenLoopsPath')))
logger.debug("LD_LIBRARY_PATH (before) = {0}".format(os.getenv('LD_LIBRARY_PATH')))
OLPath = os.path.dirname(self.executable)+"/obj-gfortran"
os.environ['OpenLoopsPath'] = OLPath
ldpath = os.getenv('LD_LIBRARY_PATH')
ldpath_new = OLPath+ ":" + OLPath + "/proclib:" + ldpath
os.environ['LD_LIBRARY_PATH'] = ldpath_new
logger.info("OpenLoopsPath (after) = {0}".format(os.getenv('OpenLoopsPath')))
logger.debug("LD_LIBRARY_PATH (after) = {0}".format(os.getenv('LD_LIBRARY_PATH')))
def __init__(self, base_directory, version, executable_name, cores, powheg_executable="pwhg_main", is_reweightable=True, **kwargs):
"""! Constructor.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment