run MG5 using script

Asked by vaborla

Hello developers,

          I would like to write a script to run MG5 using specific run_card and param_card. I read the website:
         https://answers.launchpad.net/mg5amcnlo/+faq/2186, but it does not work. My script is

          import model mssm
          generate pp > *** #(my process)
           output GOGO
          launch
          ../Cards/param_cardnew.dat ## my specific card which is in Template/Cards
         ../ Cards/run_cardnew.dat ## my specific card which is in Template/Cards

        However, MG5 does not use both new cards. I don't know where I am wrong.

Cheers,
Vaborla

Question information

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

Dear Vaborla,

1) Did you launch the script like ./bin/mg5 PATH or ./bin_mg5_aMC PATH?
If you did ./bin/mg5 < PATH or ./bin_mg5_aMC < PATH? This is normal that this doesn’t work!

2) If it is not the problem above, could you copy-paste what appear on the screen?

They are two potential problem that can appear
a) the path that you provide is not found.
In that case at the end of the run (so after the completion of the command), you should have a line
Command "../Cards/param_cardnew.dat " not recognized, please try again

b) the input file that you provide is not recognized by MadGraph as a valid input file.
in that case you should have the following line:
WARNING: Fail to determine the type of the file. Not copied
INFO: copy ../Cards/param_cardnew.dat as unknown

If it works correctly you should have the line
INFO: copy "../Cards/param_cardnew.dat as param_card.dat
INFO: copy ../Cards/run_cardnew.dat as run_card.dat

Cheers,

Olivier

On Sep 9, 2014, at 4:09 PM, vaborla <email address hidden> wrote:

> New question #254260 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/254260
>
> Hello developers,
>
> I would like to write a script to run MG5 using specific run_card and param_card. I read the website:
> https://answers.launchpad.net/mg5amcnlo/+faq/2186, but it does not work. My script is
>
> import model mssm
> generate pp > *** #(my process)
> output GOGO
> launch
> ../Cards/param_cardnew.dat ## my specific card which is in Template/Cards
> ../ Cards/run_cardnew.dat ## my specific card which is in Template/Cards
>
> However, MG5 does not use both new cards. I don't know where I am wrong.
>
> Cheers,
> Vaborla
>
>
>
>
>
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
vaborla (vaborla-tt) said :
#2

Hi Olivier,

     The problem is the path. There is a line on the screen,
      Command "../Cards/param_cardnew.dat " not recognized, please try again.

    I have tried to reset path in different ways, but it also can not recognized. I really want to know what kind of path I should set.

Cheers,
Vaborla

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

Hi Vaborla,

The path should be from your current local directory. (i.e. the one from which you submit the code)
If you want to be 100% sure, you can always put an absolute path.

Cheers,

Olivier

On Sep 9, 2014, at 4:57 PM, vaborla <email address hidden> wrote:

> Question #254260 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/254260
>
> Status: Answered => Open
>
> vaborla is still having a problem:
> Hi Olivier,
>
> The problem is the path. There is a line on the screen,
> Command "../Cards/param_cardnew.dat " not recognized, please try again.
>
> I have tried to reset path in different ways, but it also can not
> recognized. I really want to know what kind of path I should set.
>
>
> Cheers,
> Vaborla
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
vaborla (vaborla-tt) said :
#4

Hi Olivier,

    I have used the relative path and absolute path. Both paths can not work. I don't know what's the matter. My version is MadGraph5_v1_5_11. Would you think the version is too old or other problem ?

Cheers,
Vaborla

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

Hi Vaborla,

> I have used the relative path and absolute path. Both paths can not
> work. I don't know what's the matter. My version is MadGraph5_v1_5_11.
> Would you think the version is too old or other problem ?

Maybe a problem of that old version, I do not know.
The latest version is working and this is the only point which matters to me.

Cheers,

Olivier

On Sep 9, 2014, at 9:47 PM, vaborla <email address hidden> wrote:

> Question #254260 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/254260
>
> Status: Answered => Open
>
> vaborla is still having a problem:
> Hi Olivier,
>
> I have used the relative path and absolute path. Both paths can not
> work. I don't know what's the matter. My version is MadGraph5_v1_5_11.
> Would you think the version is too old or other problem ?
>
>
> Cheers,
> Vaborla
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Can you help with this problem?

Provide an answer of your own, or ask vaborla for more information if necessary.

To post a message you must log in.