LHAPDF path incorrectly set in 2.6.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MadGraph5_aMC@NLO |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hi,
In MadGraph5_aMC@NLO 2.6.0, in madgraph/
# check if the LHAPDF_DATA_PATH variable is defined
if 'LHAPDF_DATA_PATH' in os.environ.keys() and os.environ[
datadir = os.environ[
This path is allowed to be a colon-separated series of paths (just like any other $PATH in the environment). That causes crashes when running with certain environments. Ultimately this leads to a crash on L3930 of madgraph/
That needs to be able to handle the colon-separated path, and just search through for the first pdfsets.index file it finds.
Thanks,
Zach
Changed in mg5amcnlo: | |
status: | New → Fix Released |
Thanks,
I will push the following patch:
=== modified file 'madgraph/ interface/ common_ run_interface. py' interface/ common_ run_interface. py 2017-10-23 22:48:09 +0000 interface/ common_ run_interface. py 2017-11-09 16:26:15 +0000 version. startswith( '6.'):
datadir = subprocess. Popen([ self.options[ 'lhapdf' ], '--datadir'],
stdout = subprocess. PIPE).stdout. read(). strip() exists( pjoin(totry, 'pdfsets.index')):
--- madgraph/
+++ madgraph/
@@ -4041,7 +4041,14 @@
elif lhapdf_
-
+
+ if ':' in datadir:
+ for totry in datadir.split(':'):
+ if os.path.
+ return totry
+ else:
+ return None
+
return datadir
def get_lhapdf_ libdir( self):
Cheers,
Olivier
> On Nov 9, 2017, at 09:20, Zachary Marshall <email address hidden> wrote: interface/ common_ run_interface. py on L3963 the pdfsetsdir function is defined. This function includes: 'LHAPDF_ DATA_PATH' ]: 'LHAPDF_ DATA_PATH' ] interface/ common_ run_interface. py: pdfsets_ dir, 'pdfsets. index') ).read( ).split( '\n') if l.strip()] /bugs.launchpad .net/bugs/ 1731176 interface/ common_ run_interface. py on L3963 the pdfsetsdir function is defined. This function includes: 'LHAPDF_ DATA_PATH' ]: 'LHAPDF_ DATA_PATH' ] interface/ common_ run_interface. py: pdfsets_ dir, 'pdfsets. index') ).read( ).split( '\n') if l.strip()] /bugs.launchpad .n...
>
> Public bug reported:
>
> Hi,
>
> In MadGraph5_aMC@NLO 2.6.0, in
> madgraph/
> get_lhapdf_
>
> # check if the LHAPDF_DATA_PATH variable is defined
> if 'LHAPDF_DATA_PATH' in os.environ.keys() and os.environ[
> datadir = os.environ[
>
> This path is allowed to be a colon-separated series of paths (just like
> any other $PATH in the environment). That causes crashes when running
> with certain environments. Ultimately this leads to a crash on L3930 of
> madgraph/
>
> pdfsets_lines = \
> [l for l in open(pjoin(
>
> That needs to be able to handle the colon-separated path, and just
> search through for the first pdfsets.index file it finds.
>
> Thanks,
> Zach
>
> ** Affects: mg5amcnlo
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> MadGraph5_aMC@NLO.
> https:/
>
> Title:
> LHAPDF path incorrectly set in 2.6.0
>
> Status in MadGraph5_aMC@NLO:
> New
>
> Bug description:
> Hi,
>
> In MadGraph5_aMC@NLO 2.6.0, in
> madgraph/
> get_lhapdf_
>
> # check if the LHAPDF_DATA_PATH variable is defined
> if 'LHAPDF_DATA_PATH' in os.environ.keys() and os.environ[
> datadir = os.environ[
>
> This path is allowed to be a colon-separated series of paths (just
> like any other $PATH in the environment). That causes crashes when
> running with certain environments. Ultimately this leads to a crash
> on L3930 of madgraph/
>
> pdfsets_lines = \
> [l for l in open(pjoin(
>
> That needs to be able to handle the colon-separated path, and just
> search through for the first pdfsets.index file it finds.
>
> Thanks,
> Zach
>
> To manage notifications about this bug go to:
> https:/