Importing UFO from a configurable path

Asked by Zachary Marshall

There's a common case that I think it would be great for MG5_aMC to support. We have a bunch of UFO models that we want to keep central copies of for the users, and we want to use the MadGraph version provided by LCG if possible. At the moment that means I have to peek into the process card, check the model that will be imported, and try to sneak in a link to the process directory into the local working directory before the job gets started. Obviously that's rather clunky. It would be great if MadGraph allows us to specify a directory in the configuration that will be searched for additional UFO models. It'd be a couple of extra lines in find_ufo_path in models/import_ufo.py , and an extra option in the configuration.

Thanks very much,
Zach

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi Zach,

This is obviously something possible.
However I’m reluctant to add an option in the configuration file of madgraph for that.
The main reason is that some code like maddm/madspin (and some other) are using directly
the functions inside import_ufo.py and therefore might also requires such kind of change.

One solution is to define such path via a global variable like
export UFO_PATH=xxx:yyy:zzz
such that the modification is internal to import_ufo.py and the modification would directly applied
to all the code.

Would that be fine for you?

Cheers,

Olivier

> On Jun 7, 2016, at 12:32, Zachary Marshall <email address hidden> wrote:
>
> New question #295010 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/295010
>
> There's a common case that I think it would be great for MG5_aMC to support. We have a bunch of UFO models that we want to keep central copies of for the users, and we want to use the MadGraph version provided by LCG if possible. At the moment that means I have to peek into the process card, check the model that will be imported, and try to sneak in a link to the process directory into the local working directory before the job gets started. Obviously that's rather clunky. It would be great if MadGraph allows us to specify a directory in the configuration that will be searched for additional UFO models. It'd be a couple of extra lines in find_ufo_path in models/import_ufo.py , and an extra option in the configuration.
>
> Thanks very much,
> Zach
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Zachary Marshall (zach-marshall) said :
#2

Hi Olivier,

I would absolutely love it if that started with $PYTHONPATH ;-)

But yes, that'd be just fine, even with environmental variables that have a name of your choosing.

Best,
Zach

Revision history for this message
Best Olivier Mattelaer (olivier-mattelaer) said :
#3

Hi,

Just to point that this is part of 2.4.1.
(with PYTHONPATH)

Cheers,

Olivier

Revision history for this message
Zachary Marshall (zach-marshall) said :
#4

Thanks Olivier Mattelaer, that solved my question.