Any chance of adding node choice capability?

Asked by TMartin

I run MG5_aMC on a cluster (PBS) in which I can otherwise choose the node and number of CPUs/RAM when I run my own programs. I keep getting complaints from other people who share the cluster that MG5_aMC is distributing its jobs randomly on the cluster, and it is interfering with their jobs (which are set up to use all CPUs of one specific node).

When I submit code that I have written, I use specific commands to choose the nodes. Can these be set up as options in mg5_configuration?

Thanks!

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

Please look at this topic:

https://answers.launchpad.net/mg5amcnlo/+faq/2249

Cheers,

Olivier

Revision history for this message
TMartin (tmartin-4) said :
#2

Okay. I will look at modifying MG5 to handle what I am interested in.

Of note, however, is that this isn't a "unique implementation of PBS". This is a standard feature of the PBS cluster queuing system that comes with a generic installation of PBS.

The command line option for this is: "-l nodes=#:ppn=#,walltime=#". I was primarily hoping for an option to be added to mg5_configuration.txt for this, since there are other similar options available in the file.

Revision history for this message
TMartin (tmartin-4) said :
#3

Also of note, when I modify the cluster.py file, I get this error (when running ./bin/mg5):

Traceback (most recent call last):
  File "./bin/mg5", line 116, in <module>
    import madgraph.interface.master_interface as interface
  File "/itch/tmartin/madgraph/madgraph/interface/master_interface.py", line 40, in <module>
    import madgraph.interface.madgraph_interface as MGcmd
  File "/itch/tmartin/madgraph/madgraph/interface/madgraph_interface.py", line 66, in <module>
    import madgraph.interface.launch_ext_program as launch_ext
  File "/itch/tmartin/madgraph/madgraph/interface/launch_ext_program.py", line 28, in <module>
    import madgraph.interface.madevent_interface as me_cmd
  File "/itch/tmartin/madgraph/madgraph/interface/madevent_interface.py", line 74, in <module>
    import internal.extended_cmd as cmd
ImportError: No module named internal.extended_cmd

The only file I have changed in cluster.py, and the only change I did was copying the PBS cluster and changing the names slightly (called it MyCluster, and added an entry for it in the function at the end of cluster.py). Removing the changes I made removes this error.

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

It means that you have introduce an syntax error.
To have more meaningful log you can comment temporarily the line of madevent_interface.py
around line 74 you should have:
try:
    # import from madgraph directory
    import madgraph.interface.extended_cmd as cmd
    import madgraph.iolibs.files as files
    import madgraph.iolibs.save_load_object as save_load_object
    import madgraph.various.banner as banner_mod
    import madgraph.various.cluster as cluster
    import madgraph.various.gen_crossxhtml as gen_crossxhtml
    import madgraph.various.sum_html as sum_html
    import madgraph.various.misc as misc
    import madgraph.various.combine_runs as combine_runs

    import models.check_param_card as check_param_card
    from madgraph import InvalidCmd, MadGraph5Error, MG5DIR, ReadWrite
    MADEVENT = False
except Exception, error:
    if __debug__:
        print error
    # import from madevent directory
    import internal.extended_cmd as cmd
    import internal.banner as banner_mod
    import internal.misc as misc
    from internal import InvalidCmd, MadGraph5Error, ReadWrite
    import internal.files as files
    import internal.gen_crossxhtml as gen_crossxhtml
    import internal.save_load_object as save_load_object
    import internal.cluster as cluster
    import internal.check_param_card as check_param_card
    import internal.sum_html as sum_html
    import internal.combine_runs as combine_runs
    MADEVENT = True
you can replace those line by:
if 1:
    # import from madgraph directory
    import madgraph.interface.extended_cmd as cmd
    import madgraph.iolibs.files as files
    import madgraph.iolibs.save_load_object as save_load_object
    import madgraph.various.banner as banner_mod
    import madgraph.various.cluster as cluster
    import madgraph.various.gen_crossxhtml as gen_crossxhtml
    import madgraph.various.sum_html as sum_html
    import madgraph.various.misc as misc
    import madgraph.various.combine_runs as combine_runs

    import models.check_param_card as check_param_card
    from madgraph import InvalidCmd, MadGraph5Error, MG5DIR, ReadWrite
    MADEVENT = False
else:
    if __debug__:
        print error
    # import from madevent directory
    import internal.extended_cmd as cmd
    import internal.banner as banner_mod
    import internal.misc as misc
    from internal import InvalidCmd, MadGraph5Error, ReadWrite
    import internal.files as files
    import internal.gen_crossxhtml as gen_crossxhtml
    import internal.save_load_object as save_load_object
    import internal.cluster as cluster
    import internal.check_param_card as check_param_card
    import internal.sum_html as sum_html
    import internal.combine_runs as combine_runs
    MADEVENT = True

Cheers,

Olivier

On Apr 2, 2014, at 7:26 PM, TMartin <email address hidden> wrote:

> Question #246359 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/246359
>
> TMartin posted a new comment:
> Also of note, when I modify the cluster.py file, I get this error (when
> running ./bin/mg5):
>
> Traceback (most recent call last):
> File "./bin/mg5", line 116, in <module>
> import madgraph.interface.master_interface as interface
> File "/itch/tmartin/madgraph/madgraph/interface/master_interface.py", line 40, in <module>
> import madgraph.interface.madgraph_interface as MGcmd
> File "/itch/tmartin/madgraph/madgraph/interface/madgraph_interface.py", line 66, in <module>
> import madgraph.interface.launch_ext_program as launch_ext
> File "/itch/tmartin/madgraph/madgraph/interface/launch_ext_program.py", line 28, in <module>
> import madgraph.interface.madevent_interface as me_cmd
> File "/itch/tmartin/madgraph/madgraph/interface/madevent_interface.py", line 74, in <module>
> import internal.extended_cmd as cmd
> ImportError: No module named internal.extended_cmd
>
> The only file I have changed in cluster.py, and the only change I did
> was copying the PBS cluster and changing the names slightly (called it
> MyCluster, and added an entry for it in the function at the end of
> cluster.py). Removing the changes I made removes this error.
>
> --
> 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 TMartin for more information if necessary.

To post a message you must log in.